From 633691fe2a7f69986989e1ea290a21aa35477a4c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 15 Jan 2026 22:07:53 +0000 Subject: [PATCH 1/2] feat: updated v3 dialogflow client libraries docs: updated v3 dialogflow client libraries fix!: An existing field `start_flow` is moved in to oneof in message `.google.cloud.dialogflow.cx.v3.Agent` fix!: An existing field `webhook_ids` is removed from message `.google.cloud.dialogflow.cx.v3.QueryResult` fix!: An existing field `webhook_display_names` is removed from message `.google.cloud.dialogflow.cx.v3.QueryResult` fix!: An existing field `webhook_latencies` is removed from message `.google.cloud.dialogflow.cx.v3.QueryResult` fix!: An existing field `webhook_tags` is removed from message `.google.cloud.dialogflow.cx.v3.QueryResult` PiperOrigin-RevId: 856725401 Source-Link: https://github.com/googleapis/googleapis/commit/b8d149138be9552543ed2ad7700d2d0bc1a0045d Source-Link: https://github.com/googleapis/googleapis-gen/commit/e575c14c05589e4033626c61405641d38e2a7c06 Copy-Tag: eyJwIjoiRGlhbG9nZmxvd0N4Ly5Pd2xCb3QueWFtbCIsImgiOiJlNTc1YzE0YzA1NTg5ZTQwMzM2MjZjNjE0MDU2NDFkMzhlMmE3YzA2In0= --- .../Dialogflow/Cx/V3/AdvancedSettings.php | 55 + .../Google/Cloud/Dialogflow/Cx/V3/Agent.php | Bin 0 -> 9210 bytes .../Cloud/Dialogflow/Cx/V3/AudioConfig.php | Bin 0 -> 3413 bytes .../Cloud/Dialogflow/Cx/V3/Changelog.php | 60 + .../Cloud/Dialogflow/Cx/V3/CodeBlock.php | 30 + .../Dialogflow/Cx/V3/DataStoreConnection.php | Bin 0 -> 3798 bytes .../Cloud/Dialogflow/Cx/V3/Deployment.php | Bin 0 -> 2810 bytes .../Cloud/Dialogflow/Cx/V3/EntityType.php | Bin 0 -> 6225 bytes .../Cloud/Dialogflow/Cx/V3/Environment.php | Bin 0 -> 7377 bytes .../Google/Cloud/Dialogflow/Cx/V3/Example.php | 77 + .../Cloud/Dialogflow/Cx/V3/Experiment.php | Bin 0 -> 6922 bytes .../Google/Cloud/Dialogflow/Cx/V3/Flow.php | Bin 0 -> 7914 bytes .../Cloud/Dialogflow/Cx/V3/Fulfillment.php | Bin 0 -> 2676 bytes .../Google/Cloud/Dialogflow/Cx/V3/Gcs.php | 30 + .../Dialogflow/Cx/V3/GenerativeSettings.php | 55 + .../Cloud/Dialogflow/Cx/V3/Generator.php | Bin 0 -> 4119 bytes .../Cloud/Dialogflow/Cx/V3/ImportStrategy.php | Bin 0 -> 1045 bytes .../Google/Cloud/Dialogflow/Cx/V3/Inline.php | 32 + .../Google/Cloud/Dialogflow/Cx/V3/Intent.php | Bin 0 -> 5936 bytes .../Google/Cloud/Dialogflow/Cx/V3/Page.php | Bin 0 -> 5916 bytes .../Dialogflow/Cx/V3/ParameterDefinition.php | Bin 0 -> 1634 bytes .../Cloud/Dialogflow/Cx/V3/Playbook.php | Bin 0 -> 10042 bytes .../Dialogflow/Cx/V3/ResponseMessage.php | Bin 0 -> 2959 bytes .../Cloud/Dialogflow/Cx/V3/SafetySettings.php | Bin 0 -> 2220 bytes .../Dialogflow/Cx/V3/SecuritySettings.php | Bin 0 -> 5496 bytes .../Google/Cloud/Dialogflow/Cx/V3/Session.php | Bin 0 -> 14351 bytes .../Dialogflow/Cx/V3/SessionEntityType.php | Bin 0 -> 4806 bytes .../Cloud/Dialogflow/Cx/V3/TestCase.php | Bin 0 -> 12146 bytes .../Google/Cloud/Dialogflow/Cx/V3/Tool.php | Bin 0 -> 8611 bytes .../Cloud/Dialogflow/Cx/V3/ToolCall.php | Bin 0 -> 1452 bytes .../Google/Cloud/Dialogflow/Cx/V3/Trace.php | Bin 0 -> 2925 bytes .../Dialogflow/Cx/V3/TransitionRouteGroup.php | 70 + .../Dialogflow/Cx/V3/ValidationMessage.php | Bin 0 -> 1579 bytes .../Google/Cloud/Dialogflow/Cx/V3/Version.php | Bin 0 -> 5015 bytes .../Google/Cloud/Dialogflow/Cx/V3/Webhook.php | Bin 0 -> 9112 bytes .../Google/Cloud/Dialogflow/Cx/V3/Action.php | 285 ++++ .../Dialogflow/Cx/V3/AdvancedSettings.php | 289 ++++ .../Cx/V3/AdvancedSettings/DtmfSettings.php | 246 +++ .../V3/AdvancedSettings/LoggingSettings.php | 146 ++ .../Cx/V3/AdvancedSettings/SpeechSettings.php | 206 +++ .../Google/Cloud/Dialogflow/Cx/V3/Agent.php | 1141 ++++++++++++++ .../Cx/V3/Agent/AnswerFeedbackSettings.php | 82 + .../Cx/V3/Agent/ClientCertificateSettings.php | 162 ++ .../Cx/V3/Agent/GenAppBuilderSettings.php | 78 + .../Cx/V3/Agent/GitIntegrationSettings.php | 78 + .../GitIntegrationSettings/GithubSettings.php | 210 +++ .../Cx/V3/Agent/PersonalizationSettings.php | 108 ++ .../Cloud/Dialogflow/Cx/V3/AgentUtterance.php | 67 + .../Cx/V3/AgentValidationResult.php | 110 ++ .../Cloud/Dialogflow/Cx/V3/AnswerFeedback.php | 157 ++ .../Cx/V3/AnswerFeedback/Rating.php | 64 + .../Cx/V3/AnswerFeedback/RatingReason.php | 116 ++ .../Cloud/Dialogflow/Cx/V3/AudioEncoding.php | 126 ++ .../Cloud/Dialogflow/Cx/V3/AudioInput.php | 143 ++ .../Cloud/Dialogflow/Cx/V3/BargeInConfig.php | 143 ++ .../Cx/V3/BatchDeleteTestCasesRequest.php | 125 ++ .../Cx/V3/BatchRunTestCasesMetadata.php | 69 + .../Cx/V3/BatchRunTestCasesRequest.php | 148 ++ .../Cx/V3/BatchRunTestCasesResponse.php | 80 + .../Cloud/Dialogflow/Cx/V3/BoostSpec.php | 82 + .../Cx/V3/BoostSpec/ConditionBoostSpec.php | 228 +++ .../ConditionBoostSpec/BoostControlSpec.php | 206 +++ .../BoostControlSpec/AttributeType.php | 73 + .../BoostControlSpec/ControlPoint.php | 130 ++ .../BoostControlSpec/InterpolationType.php | 59 + .../Cloud/Dialogflow/Cx/V3/BoostSpecs.php | 113 ++ .../Cx/V3/CalculateCoverageRequest.php | 106 ++ .../CalculateCoverageRequest/CoverageType.php | 71 + .../Cx/V3/CalculateCoverageResponse.php | 180 +++ .../Cloud/Dialogflow/Cx/V3/Changelog.php | 323 ++++ .../Cx/V3/CloudConversationDebuggingInfo.php | 750 ++++++++++ .../Cloud/Dialogflow/Cx/V3/CodeBlock.php | 67 + .../Cx/V3/CompareVersionsRequest.php | 198 +++ .../Cx/V3/CompareVersionsResponse.php | 146 ++ .../Dialogflow/Cx/V3/ContinuousTestResult.php | 187 +++ .../AggregatedTestResult.php | 64 + .../Dialogflow/Cx/V3/ConversationTurn.php | 122 ++ .../Cx/V3/ConversationTurn/UserInput.php | 212 +++ .../ConversationTurn/VirtualAgentOutput.php | 356 +++++ .../Dialogflow/Cx/V3/CreateAgentRequest.php | 133 ++ .../Cx/V3/CreateEntityTypeRequest.php | 199 +++ .../Cx/V3/CreateEnvironmentRequest.php | 138 ++ .../Dialogflow/Cx/V3/CreateExampleRequest.php | 138 ++ .../Cx/V3/CreateExperimentRequest.php | 138 ++ .../Dialogflow/Cx/V3/CreateFlowRequest.php | 203 +++ .../Cx/V3/CreateGeneratorRequest.php | 175 +++ .../Dialogflow/Cx/V3/CreateIntentRequest.php | 191 +++ .../Dialogflow/Cx/V3/CreatePageRequest.php | 240 +++ .../Cx/V3/CreatePlaybookRequest.php | 133 ++ .../Cx/V3/CreatePlaybookVersionRequest.php | 138 ++ .../Cx/V3/CreateSecuritySettingsRequest.php | 137 ++ .../Cx/V3/CreateSessionEntityTypeRequest.php | 158 ++ .../Cx/V3/CreateTestCaseRequest.php | 133 ++ .../Dialogflow/Cx/V3/CreateToolRequest.php | 133 ++ .../Cx/V3/CreateToolVersionRequest.php | 140 ++ .../V3/CreateTransitionRouteGroupRequest.php | 219 +++ .../Cx/V3/CreateVersionOperationMetadata.php | 76 + .../Dialogflow/Cx/V3/CreateVersionRequest.php | 138 ++ .../Dialogflow/Cx/V3/CreateWebhookRequest.php | 133 ++ .../Dialogflow/Cx/V3/DataStoreConnection.php | 156 ++ .../Cx/V3/DataStoreConnectionSignals.php | 394 +++++ .../AnswerGenerationModelCallSignals.php | 142 ++ .../DataStoreConnectionSignals/AnswerPart.php | 104 ++ .../CitedSnippet.php | 114 ++ .../GroundingSignals.php | 104 ++ .../GroundingSignals/GroundingDecision.php | 64 + .../GroundingSignals/GroundingScoreBucket.php | 85 ++ .../RewriterModelCallSignals.php | 142 ++ .../SafetySignals.php | 138 ++ .../SafetySignals/BannedPhraseMatch.php | 71 + .../SafetySignals/SafetyDecision.php | 66 + .../SearchSnippet.php | 182 +++ .../Cloud/Dialogflow/Cx/V3/DataStoreType.php | 70 + .../Cloud/Dialogflow/Cx/V3/DataType.php | 80 + .../Dialogflow/Cx/V3/DeleteAgentRequest.php | 87 ++ .../Cx/V3/DeleteEntityTypeRequest.php | 166 +++ .../Cx/V3/DeleteEnvironmentRequest.php | 92 ++ .../Dialogflow/Cx/V3/DeleteExampleRequest.php | 92 ++ .../Cx/V3/DeleteExperimentRequest.php | 92 ++ .../Dialogflow/Cx/V3/DeleteFlowRequest.php | 158 ++ .../Cx/V3/DeleteGeneratorRequest.php | 150 ++ .../Dialogflow/Cx/V3/DeleteIntentRequest.php | 92 ++ .../Dialogflow/Cx/V3/DeletePageRequest.php | 158 ++ .../Cx/V3/DeletePlaybookRequest.php | 92 ++ .../Cx/V3/DeletePlaybookVersionRequest.php | 92 ++ .../Cx/V3/DeleteSecuritySettingsRequest.php | 96 ++ .../Cx/V3/DeleteSessionEntityTypeRequest.php | 112 ++ .../Dialogflow/Cx/V3/DeleteToolRequest.php | 146 ++ .../Cx/V3/DeleteToolVersionRequest.php | 146 ++ .../V3/DeleteTransitionRouteGroupRequest.php | 161 ++ .../Dialogflow/Cx/V3/DeleteVersionRequest.php | 92 ++ .../Dialogflow/Cx/V3/DeleteWebhookRequest.php | 158 ++ .../Dialogflow/Cx/V3/DeployFlowMetadata.php | 69 + .../Dialogflow/Cx/V3/DeployFlowRequest.php | 118 ++ .../Dialogflow/Cx/V3/DeployFlowResponse.php | 120 ++ .../Cloud/Dialogflow/Cx/V3/Deployment.php | 286 ++++ .../Dialogflow/Cx/V3/Deployment/Result.php | 120 ++ .../Dialogflow/Cx/V3/Deployment/State.php | 71 + .../Dialogflow/Cx/V3/DetectIntentRequest.php | 297 ++++ .../Dialogflow/Cx/V3/DetectIntentResponse.php | 305 ++++ .../V3/DetectIntentResponse/ResponseType.php | 70 + .../Cx/V3/DetectIntentResponseView.php | 73 + .../Cx/V3/DocumentProcessingMode.php | 63 + .../Cloud/Dialogflow/Cx/V3/DtmfInput.php | 101 ++ .../Cloud/Dialogflow/Cx/V3/EntityType.php | 371 +++++ .../Cx/V3/EntityType/AutoExpansionMode.php | 60 + .../Dialogflow/Cx/V3/EntityType/Entity.php | 148 ++ .../Cx/V3/EntityType/ExcludedPhrase.php | 70 + .../Dialogflow/Cx/V3/EntityType/Kind.php | 75 + .../Cloud/Dialogflow/Cx/V3/Environment.php | 336 +++++ .../Cx/V3/Environment/TestCasesConfig.php | 162 ++ .../Cx/V3/Environment/VersionConfig.php | 94 ++ .../Cx/V3/Environment/WebhookConfig.php | 86 ++ .../Cloud/Dialogflow/Cx/V3/EventHandler.php | 297 ++++ .../Cloud/Dialogflow/Cx/V3/EventInput.php | 67 + .../Google/Cloud/Dialogflow/Cx/V3/Example.php | 481 ++++++ .../Cloud/Dialogflow/Cx/V3/Experiment.php | 685 +++++++++ .../Cx/V3/Experiment/Definition.php | 124 ++ .../Dialogflow/Cx/V3/Experiment/Result.php | 119 ++ .../Experiment/Result/ConfidenceInterval.php | 181 +++ .../Cx/V3/Experiment/Result/CountType.php | 71 + .../Cx/V3/Experiment/Result/Metric.php | 235 +++ .../Cx/V3/Experiment/Result/MetricType.php | 86 ++ .../V3/Experiment/Result/VersionMetrics.php | 150 ++ .../Dialogflow/Cx/V3/Experiment/State.php | 78 + .../Dialogflow/Cx/V3/ExportAgentRequest.php | 296 ++++ .../Cx/V3/ExportAgentRequest/DataFormat.php | 64 + .../V3/ExportAgentRequest/GitDestination.php | 104 ++ .../Dialogflow/Cx/V3/ExportAgentResponse.php | 160 ++ .../Cx/V3/ExportEntityTypesMetadata.php | 35 + .../Cx/V3/ExportEntityTypesRequest.php | 321 ++++ .../ExportEntityTypesRequest/DataFormat.php | 64 + .../Cx/V3/ExportEntityTypesResponse.php | 121 ++ .../Dialogflow/Cx/V3/ExportFlowRequest.php | 176 +++ .../Dialogflow/Cx/V3/ExportFlowResponse.php | 115 ++ .../Cx/V3/ExportIntentsMetadata.php | 35 + .../Dialogflow/Cx/V3/ExportIntentsRequest.php | 251 ++++ .../Cx/V3/ExportIntentsRequest/DataFormat.php | 71 + .../Cx/V3/ExportIntentsResponse.php | 121 ++ .../Cx/V3/ExportPlaybookRequest.php | 180 +++ .../V3/ExportPlaybookRequest/DataFormat.php | 64 + .../Cx/V3/ExportPlaybookResponse.php | 115 ++ .../Cx/V3/ExportTestCasesMetadata.php | 35 + .../Cx/V3/ExportTestCasesRequest.php | 234 +++ .../V3/ExportTestCasesRequest/DataFormat.php | 64 + .../Cx/V3/ExportTestCasesResponse.php | 115 ++ .../Cloud/Dialogflow/Cx/V3/FilterSpecs.php | 121 ++ .../Google/Cloud/Dialogflow/Cx/V3/Flow.php | 670 +++++++++ .../Cx/V3/Flow/MultiLanguageSettings.php | 140 ++ .../Dialogflow/Cx/V3/FlowImportStrategy.php | 80 + .../Cloud/Dialogflow/Cx/V3/FlowInvocation.php | 143 ++ .../Cloud/Dialogflow/Cx/V3/FlowTransition.php | 110 ++ .../Dialogflow/Cx/V3/FlowValidationResult.php | 154 ++ .../Google/Cloud/Dialogflow/Cx/V3/Form.php | 72 + .../Cloud/Dialogflow/Cx/V3/Form/Parameter.php | 402 +++++ .../Cx/V3/Form/Parameter/FillBehavior.php | 222 +++ .../Dialogflow/Cx/V3/FulfillIntentRequest.php | 169 +++ .../Cx/V3/FulfillIntentResponse.php | 229 +++ .../Cloud/Dialogflow/Cx/V3/Fulfillment.php | 445 ++++++ .../Cx/V3/Fulfillment/ConditionalCases.php | 71 + .../Fulfillment/ConditionalCases/PBCase.php | 125 ++ .../ConditionalCases/PBCase/CaseContent.php | 111 ++ .../Cx/V3/Fulfillment/GeneratorSettings.php | 182 +++ .../Cx/V3/Fulfillment/SetParameterAction.php | 114 ++ .../Cloud/Dialogflow/Cx/V3/GcsDestination.php | 76 + .../Dialogflow/Cx/V3/GenerativeSettings.php | 281 ++++ .../GenerativeSettings/FallbackSettings.php | 108 ++ .../FallbackSettings/PromptTemplate.php | 150 ++ .../KnowledgeConnectorSettings.php | 263 ++++ .../Cloud/Dialogflow/Cx/V3/Generator.php | 302 ++++ .../Cx/V3/Generator/ModelParameter.php | 257 ++++ .../Cx/V3/Generator/Placeholder.php | 104 ++ .../Dialogflow/Cx/V3/GetAgentRequest.php | 87 ++ .../Cx/V3/GetAgentValidationResultRequest.php | 126 ++ .../Dialogflow/Cx/V3/GetChangelogRequest.php | 92 ++ .../Dialogflow/Cx/V3/GetDeploymentRequest.php | 92 ++ .../Dialogflow/Cx/V3/GetEntityTypeRequest.php | 162 ++ .../Cx/V3/GetEnvironmentRequest.php | 92 ++ .../Dialogflow/Cx/V3/GetExampleRequest.php | 92 ++ .../Dialogflow/Cx/V3/GetExperimentRequest.php | 92 ++ .../Cloud/Dialogflow/Cx/V3/GetFlowRequest.php | 166 +++ .../Cx/V3/GetFlowValidationResultRequest.php | 126 ++ .../Cx/V3/GetGenerativeSettingsRequest.php | 124 ++ .../Dialogflow/Cx/V3/GetGeneratorRequest.php | 126 ++ .../Dialogflow/Cx/V3/GetIntentRequest.php | 154 ++ .../Cloud/Dialogflow/Cx/V3/GetPageRequest.php | 198 +++ .../Dialogflow/Cx/V3/GetPlaybookRequest.php | 92 ++ .../Cx/V3/GetPlaybookVersionRequest.php | 92 ++ .../Cx/V3/GetSecuritySettingsRequest.php | 92 ++ .../Cx/V3/GetSessionEntityTypeRequest.php | 112 ++ .../Dialogflow/Cx/V3/GetTestCaseRequest.php | 92 ++ .../Cx/V3/GetTestCaseResultRequest.php | 92 ++ .../Cloud/Dialogflow/Cx/V3/GetToolRequest.php | 92 ++ .../Cx/V3/GetToolVersionRequest.php | 92 ++ .../Cx/V3/GetTransitionRouteGroupRequest.php | 177 +++ .../Dialogflow/Cx/V3/GetVersionRequest.php | 92 ++ .../Dialogflow/Cx/V3/GetWebhookRequest.php | 92 ++ .../Google/Cloud/Dialogflow/Cx/V3/Handler.php | 109 ++ .../Dialogflow/Cx/V3/Handler/EventHandler.php | 149 ++ .../Cx/V3/Handler/LifecycleHandler.php | 166 +++ .../Cx/V3/ImportEntityTypesMetadata.php | 35 + .../Cx/V3/ImportEntityTypesRequest.php | 264 ++++ .../ImportEntityTypesRequest/MergeOption.php | 90 ++ .../Cx/V3/ImportEntityTypesResponse.php | 128 ++ .../ConflictingResources.php | 106 ++ .../Dialogflow/Cx/V3/ImportFlowRequest.php | 250 ++++ .../Cx/V3/ImportFlowRequest/ImportOption.php | 68 + .../Dialogflow/Cx/V3/ImportFlowResponse.php | 76 + .../Cx/V3/ImportIntentsMetadata.php | 35 + .../Dialogflow/Cx/V3/ImportIntentsRequest.php | 202 +++ .../V3/ImportIntentsRequest/MergeOption.php | 100 ++ .../Cx/V3/ImportIntentsResponse.php | 128 ++ .../ConflictingResources.php | 106 ++ .../Cx/V3/ImportPlaybookRequest.php | 201 +++ .../Cx/V3/ImportPlaybookResponse.php | 128 ++ .../ConflictingResources.php | 140 ++ .../Cloud/Dialogflow/Cx/V3/ImportStrategy.php | 87 ++ .../Cx/V3/ImportTestCasesMetadata.php | 69 + .../Cx/V3/ImportTestCasesRequest.php | 168 +++ .../Cx/V3/ImportTestCasesResponse.php | 76 + .../Dialogflow/Cx/V3/InlineDestination.php | 72 + .../Cloud/Dialogflow/Cx/V3/InlineSchema.php | 111 ++ .../Cloud/Dialogflow/Cx/V3/InlineSource.php | 68 + .../Dialogflow/Cx/V3/InputAudioConfig.php | 457 ++++++ .../Google/Cloud/Dialogflow/Cx/V3/Intent.php | 428 ++++++ .../Dialogflow/Cx/V3/Intent/Parameter.php | 228 +++ .../Cx/V3/Intent/TrainingPhrase.php | 194 +++ .../Cx/V3/Intent/TrainingPhrase/Part.php | 112 ++ .../Cloud/Dialogflow/Cx/V3/IntentCoverage.php | 102 ++ .../Cx/V3/IntentCoverage/Intent.php | 108 ++ .../Cloud/Dialogflow/Cx/V3/IntentInput.php | 76 + .../Cloud/Dialogflow/Cx/V3/IntentView.php | 63 + .../Cx/V3/KnowledgeConnectorSettings.php | 254 ++++ .../Cloud/Dialogflow/Cx/V3/LanguageInfo.php | 143 ++ .../Dialogflow/Cx/V3/ListAgentsRequest.php | 159 ++ .../Dialogflow/Cx/V3/ListAgentsResponse.php | 110 ++ .../Cx/V3/ListChangelogsRequest.php | 269 ++++ .../Cx/V3/ListChangelogsResponse.php | 114 ++ .../V3/ListContinuousTestResultsRequest.php | 164 ++ .../V3/ListContinuousTestResultsResponse.php | 105 ++ .../Cx/V3/ListDeploymentsRequest.php | 164 ++ .../Cx/V3/ListDeploymentsResponse.php | 118 ++ .../Cx/V3/ListEntityTypesRequest.php | 229 +++ .../Cx/V3/ListEntityTypesResponse.php | 110 ++ .../Cx/V3/ListEnvironmentsRequest.php | 164 ++ .../Cx/V3/ListEnvironmentsResponse.php | 118 ++ .../Dialogflow/Cx/V3/ListExamplesRequest.php | 210 +++ .../Dialogflow/Cx/V3/ListExamplesResponse.php | 118 ++ .../Cx/V3/ListExperimentsRequest.php | 164 ++ .../Cx/V3/ListExperimentsResponse.php | 118 ++ .../Dialogflow/Cx/V3/ListFlowsRequest.php | 233 +++ .../Dialogflow/Cx/V3/ListFlowsResponse.php | 110 ++ .../Cx/V3/ListGeneratorsRequest.php | 193 +++ .../Cx/V3/ListGeneratorsResponse.php | 110 ++ .../Dialogflow/Cx/V3/ListIntentsRequest.php | 255 ++++ .../Dialogflow/Cx/V3/ListIntentsResponse.php | 110 ++ .../Dialogflow/Cx/V3/ListPagesRequest.php | 270 ++++ .../Dialogflow/Cx/V3/ListPagesResponse.php | 110 ++ .../Cx/V3/ListPlaybookVersionsRequest.php | 164 ++ .../Cx/V3/ListPlaybookVersionsResponse.php | 110 ++ .../Dialogflow/Cx/V3/ListPlaybooksRequest.php | 159 ++ .../Cx/V3/ListPlaybooksResponse.php | 110 ++ .../Cx/V3/ListSecuritySettingsRequest.php | 158 ++ .../Cx/V3/ListSecuritySettingsResponse.php | 105 ++ .../Cx/V3/ListSessionEntityTypesRequest.php | 184 +++ .../Cx/V3/ListSessionEntityTypesResponse.php | 110 ++ .../Cx/V3/ListTestCaseResultsRequest.php | 280 ++++ .../Cx/V3/ListTestCaseResultsResponse.php | 106 ++ .../Dialogflow/Cx/V3/ListTestCasesRequest.php | 197 +++ .../V3/ListTestCasesRequest/TestCaseView.php | 66 + .../Cx/V3/ListTestCasesResponse.php | 110 ++ .../Cx/V3/ListToolVersionsRequest.php | 164 ++ .../Cx/V3/ListToolVersionsResponse.php | 110 ++ .../Dialogflow/Cx/V3/ListToolsRequest.php | 159 ++ .../Dialogflow/Cx/V3/ListToolsResponse.php | 110 ++ .../V3/ListTransitionRouteGroupsRequest.php | 239 +++ .../V3/ListTransitionRouteGroupsResponse.php | 118 ++ .../Dialogflow/Cx/V3/ListVersionsRequest.php | 164 ++ .../Dialogflow/Cx/V3/ListVersionsResponse.php | 114 ++ .../Dialogflow/Cx/V3/ListWebhooksRequest.php | 159 ++ .../Dialogflow/Cx/V3/ListWebhooksResponse.php | 110 ++ .../Dialogflow/Cx/V3/LlmModelSettings.php | 101 ++ .../Dialogflow/Cx/V3/LoadVersionRequest.php | 138 ++ .../Cx/V3/LookupEnvironmentHistoryRequest.php | 164 ++ .../V3/LookupEnvironmentHistoryResponse.php | 114 ++ .../Dialogflow/Cx/V3/MatchIntentRequest.php | 233 +++ .../Dialogflow/Cx/V3/MatchIntentResponse.php | 282 ++++ .../Cloud/Dialogflow/Cx/V3/NluSettings.php | 159 ++ .../Cx/V3/NluSettings/ModelTrainingMode.php | 66 + .../Cx/V3/NluSettings/ModelType.php | 64 + .../Dialogflow/Cx/V3/OutputAudioConfig.php | 173 +++ .../Dialogflow/Cx/V3/OutputAudioEncoding.php | 95 ++ .../Cloud/Dialogflow/Cx/V3/OutputState.php | 82 + .../Google/Cloud/Dialogflow/Cx/V3/PBMatch.php | 353 +++++ .../Dialogflow/Cx/V3/PBMatch/MatchType.php | 107 ++ .../Google/Cloud/Dialogflow/Cx/V3/Page.php | 593 ++++++++ .../Cloud/Dialogflow/Cx/V3/PageInfo.php | 185 +++ .../Dialogflow/Cx/V3/PageInfo/FormInfo.php | 86 ++ .../Cx/V3/PageInfo/FormInfo/ParameterInfo.php | 316 ++++ .../FormInfo/ParameterInfo/ParameterState.php | 77 + .../Dialogflow/Cx/V3/ParameterDefinition.php | 188 +++ .../V3/ParameterDefinition/ParameterType.php | 98 ++ .../Google/Cloud/Dialogflow/Cx/V3/Phrase.php | 67 + .../Cloud/Dialogflow/Cx/V3/Playbook.php | 723 +++++++++ .../Dialogflow/Cx/V3/Playbook/Instruction.php | 116 ++ .../Cx/V3/Playbook/PlaybookType.php | 64 + .../Cloud/Dialogflow/Cx/V3/Playbook/Step.php | 112 ++ .../Cx/V3/PlaybookImportStrategy.php | 161 ++ .../Cloud/Dialogflow/Cx/V3/PlaybookInput.php | 71 + .../Dialogflow/Cx/V3/PlaybookInvocation.php | 231 +++ .../Cloud/Dialogflow/Cx/V3/PlaybookOutput.php | 67 + .../Dialogflow/Cx/V3/PlaybookTransition.php | 110 ++ .../Dialogflow/Cx/V3/PlaybookVersion.php | 235 +++ .../Cloud/Dialogflow/Cx/V3/QueryInput.php | 292 ++++ .../Dialogflow/Cx/V3/QueryParameters.php | 1106 ++++++++++++++ .../Cloud/Dialogflow/Cx/V3/QueryResult.php | 1089 ++++++++++++++ .../Cloud/Dialogflow/Cx/V3/ResourceName.php | 101 ++ .../Dialogflow/Cx/V3/ResponseMessage.php | 546 +++++++ .../ResponseMessage/ConversationSuccess.php | 93 ++ .../Cx/V3/ResponseMessage/EndInteraction.php | 38 + .../V3/ResponseMessage/KnowledgeInfoCard.php | 39 + .../V3/ResponseMessage/LiveAgentHandoff.php | 95 ++ .../Cx/V3/ResponseMessage/MixedAudio.php | 76 + .../V3/ResponseMessage/MixedAudio/Segment.php | 159 ++ .../Cx/V3/ResponseMessage/OutputAudioText.php | 157 ++ .../Cx/V3/ResponseMessage/PlayAudio.php | 116 ++ .../Cx/V3/ResponseMessage/ResponseType.php | 77 + .../ResponseMessage/TelephonyTransferCall.php | 82 + .../Dialogflow/Cx/V3/ResponseMessage/Text.php | 116 ++ .../Dialogflow/Cx/V3/RestoreAgentRequest.php | 235 +++ .../Cx/V3/RestoreAgentRequest/GitSource.php | 70 + .../V3/RestoreAgentRequest/RestoreOption.php | 67 + .../Cx/V3/RestorePlaybookVersionRequest.php | 92 ++ .../Cx/V3/RestorePlaybookVersionResponse.php | 78 + .../Cx/V3/RestoreToolVersionRequest.php | 92 ++ .../Cx/V3/RestoreToolVersionResponse.php | 78 + .../Cloud/Dialogflow/Cx/V3/RolloutConfig.php | 167 +++ .../Cx/V3/RolloutConfig/RolloutStep.php | 160 ++ .../Cloud/Dialogflow/Cx/V3/RolloutState.php | 145 ++ .../Cx/V3/RunContinuousTestMetadata.php | 69 + .../Cx/V3/RunContinuousTestRequest.php | 72 + .../Cx/V3/RunContinuousTestResponse.php | 78 + .../Dialogflow/Cx/V3/RunTestCaseMetadata.php | 35 + .../Dialogflow/Cx/V3/RunTestCaseRequest.php | 114 ++ .../Dialogflow/Cx/V3/RunTestCaseResponse.php | 78 + .../Cloud/Dialogflow/Cx/V3/SafetySettings.php | 241 +++ .../Cx/V3/SafetySettings/Phrase.php | 104 ++ .../V3/SafetySettings/PhraseMatchStrategy.php | 66 + .../SafetySettings/PromptSecuritySettings.php | 70 + .../Cx/V3/SafetySettings/RaiSettings.php | 70 + .../RaiSettings/CategoryFilter.php | 104 ++ .../RaiSettings/SafetyCategory.php | 78 + .../RaiSettings/SafetyFilterLevel.php | 78 + .../Cloud/Dialogflow/Cx/V3/SearchConfig.php | 129 ++ .../Dialogflow/Cx/V3/SecuritySettings.php | 664 +++++++++ .../SecuritySettings/AudioExportSettings.php | 250 ++++ .../AudioExportSettings/AudioFormat.php | 72 + .../InsightsExportSettings.php | 75 + .../Cx/V3/SecuritySettings/PurgeDataType.php | 58 + .../Cx/V3/SecuritySettings/RedactionScope.php | 59 + .../V3/SecuritySettings/RedactionStrategy.php | 57 + .../V3/SecuritySettings/RetentionStrategy.php | 59 + .../Cx/V3/SentimentAnalysisResult.php | 111 ++ .../Dialogflow/Cx/V3/SessionEntityType.php | 176 +++ .../SessionEntityType/EntityOverrideMode.php | 73 + .../Cloud/Dialogflow/Cx/V3/SessionInfo.php | 169 +++ .../Dialogflow/Cx/V3/SpeechModelVariant.php | 85 ++ .../Dialogflow/Cx/V3/SpeechToTextSettings.php | 67 + .../Cloud/Dialogflow/Cx/V3/SpeechWordInfo.php | 225 +++ .../Dialogflow/Cx/V3/SsmlVoiceGender.php | 70 + .../Cx/V3/StartExperimentRequest.php | 92 ++ .../Cx/V3/StopExperimentRequest.php | 92 ++ .../Cx/V3/StreamingDetectIntentRequest.php | 407 +++++ .../Cx/V3/StreamingDetectIntentResponse.php | 174 +++ .../Cx/V3/StreamingRecognitionResult.php | 425 ++++++ .../MessageType.php | 71 + .../Cx/V3/SubmitAnswerFeedbackRequest.php | 197 +++ .../Cx/V3/SynthesizeSpeechConfig.php | 269 ++++ .../Cloud/Dialogflow/Cx/V3/TestCase.php | 367 +++++ .../Cloud/Dialogflow/Cx/V3/TestCaseError.php | 121 ++ .../Cloud/Dialogflow/Cx/V3/TestCaseResult.php | 225 +++ .../Cloud/Dialogflow/Cx/V3/TestConfig.php | 175 +++ .../Cloud/Dialogflow/Cx/V3/TestError.php | 155 ++ .../Cloud/Dialogflow/Cx/V3/TestResult.php | 61 + .../Dialogflow/Cx/V3/TestRunDifference.php | 105 ++ .../Cx/V3/TestRunDifference/DiffType.php | 85 ++ .../Cloud/Dialogflow/Cx/V3/TextInput.php | 67 + .../Dialogflow/Cx/V3/TextToSpeechSettings.php | 119 ++ .../Google/Cloud/Dialogflow/Cx/V3/Tool.php | 288 ++++ .../Dialogflow/Cx/V3/Tool/Authentication.php | 216 +++ .../V3/Tool/Authentication/ApiKeyConfig.php | 192 +++ .../Tool/Authentication/BearerTokenConfig.php | 136 ++ .../Cx/V3/Tool/Authentication/OAuthConfig.php | 264 ++++ .../OAuthConfig/OauthGrantType.php | 60 + .../Tool/Authentication/RequestLocation.php | 64 + .../ServiceAccountAuthConfig.php | 98 ++ .../Authentication/ServiceAgentAuthConfig.php | 83 ++ .../ServiceAgentAuth.php | 73 + .../Dialogflow/Cx/V3/Tool/DataStoreTool.php | 115 ++ .../V3/Tool/DataStoreTool/FallbackPrompt.php | 37 + .../Dialogflow/Cx/V3/Tool/FunctionTool.php | 148 ++ .../Dialogflow/Cx/V3/Tool/OpenApiTool.php | 211 +++ .../Cx/V3/Tool/ServiceDirectoryConfig.php | 90 ++ .../Cloud/Dialogflow/Cx/V3/Tool/TLSConfig.php | 74 + .../Cx/V3/Tool/TLSConfig/CACert.php | 152 ++ .../Cloud/Dialogflow/Cx/V3/Tool/ToolType.php | 64 + .../Cloud/Dialogflow/Cx/V3/ToolCall.php | 153 ++ .../Cloud/Dialogflow/Cx/V3/ToolCallResult.php | 184 +++ .../Dialogflow/Cx/V3/ToolCallResult/Error.php | 70 + .../Google/Cloud/Dialogflow/Cx/V3/ToolUse.php | 231 +++ .../Cloud/Dialogflow/Cx/V3/ToolVersion.php | 241 +++ .../Dialogflow/Cx/V3/TrainFlowRequest.php | 92 ++ .../Dialogflow/Cx/V3/TransitionCoverage.php | 103 ++ .../Cx/V3/TransitionCoverage/Transition.php | 271 ++++ .../V3/TransitionCoverage/TransitionNode.php | 117 ++ .../Dialogflow/Cx/V3/TransitionRoute.php | 382 +++++ .../Dialogflow/Cx/V3/TransitionRouteGroup.php | 161 ++ .../Cx/V3/TransitionRouteGroupCoverage.php | 107 ++ .../TransitionRouteGroupCoverage/Coverage.php | 152 ++ .../Coverage/Transition.php | 118 ++ .../Cloud/Dialogflow/Cx/V3/TypeSchema.php | 109 ++ .../Cx/V3/TypeSchema/SchemaReference.php | 112 ++ .../Dialogflow/Cx/V3/UpdateAgentRequest.php | 142 ++ .../Cx/V3/UpdateEntityTypeRequest.php | 203 +++ .../Cx/V3/UpdateEnvironmentRequest.php | 137 ++ .../Dialogflow/Cx/V3/UpdateExampleRequest.php | 142 ++ .../Cx/V3/UpdateExperimentRequest.php | 137 ++ .../Dialogflow/Cx/V3/UpdateFlowRequest.php | 212 +++ .../Cx/V3/UpdateGenerativeSettingsRequest.php | 143 ++ .../Cx/V3/UpdateGeneratorRequest.php | 176 +++ .../Dialogflow/Cx/V3/UpdateIntentRequest.php | 200 +++ .../Dialogflow/Cx/V3/UpdatePageRequest.php | 244 +++ .../Cx/V3/UpdatePlaybookRequest.php | 142 ++ .../Cx/V3/UpdateSecuritySettingsRequest.php | 147 ++ .../Cx/V3/UpdateSessionEntityTypeRequest.php | 167 +++ .../Cx/V3/UpdateTestCaseRequest.php | 152 ++ .../Dialogflow/Cx/V3/UpdateToolRequest.php | 142 ++ .../V3/UpdateTransitionRouteGroupRequest.php | 203 +++ .../Dialogflow/Cx/V3/UpdateVersionRequest.php | 142 ++ .../Dialogflow/Cx/V3/UpdateWebhookRequest.php | 142 ++ .../Cloud/Dialogflow/Cx/V3/UserUtterance.php | 67 + .../Dialogflow/Cx/V3/ValidateAgentRequest.php | 106 ++ .../Dialogflow/Cx/V3/ValidateFlowRequest.php | 110 ++ .../Dialogflow/Cx/V3/ValidationMessage.php | 212 +++ .../Cx/V3/ValidationMessage/ResourceType.php | 148 ++ .../Cx/V3/ValidationMessage/Severity.php | 71 + .../Dialogflow/Cx/V3/VariantsHistory.php | 119 ++ .../Google/Cloud/Dialogflow/Cx/V3/Version.php | 277 ++++ .../Cloud/Dialogflow/Cx/V3/Version/State.php | 71 + .../Dialogflow/Cx/V3/VersionVariants.php | 67 + .../Cx/V3/VersionVariants/Variant.php | 150 ++ .../Dialogflow/Cx/V3/VoiceSelectionParams.php | 137 ++ .../Google/Cloud/Dialogflow/Cx/V3/Webhook.php | 292 ++++ .../Cx/V3/Webhook/GenericWebService.php | 658 ++++++++ .../Webhook/GenericWebService/HttpMethod.php | 99 ++ .../Webhook/GenericWebService/OAuthConfig.php | 223 +++ .../SecretVersionHeaderValue.php | 75 + .../ServiceAccountAuthConfig.php | 98 ++ .../GenericWebService/ServiceAgentAuth.php | 80 + .../Webhook/GenericWebService/WebhookType.php | 64 + .../Cx/V3/Webhook/ServiceDirectoryConfig.php | 135 ++ .../Cloud/Dialogflow/Cx/V3/WebhookRequest.php | 673 +++++++++ .../Cx/V3/WebhookRequest/FulfillmentInfo.php | 94 ++ .../Cx/V3/WebhookRequest/IntentInfo.php | 204 +++ .../IntentInfo/IntentParameterValue.php | 118 ++ .../SentimentAnalysisResult.php | 116 ++ .../Dialogflow/Cx/V3/WebhookResponse.php | 312 ++++ .../WebhookResponse/FulfillmentResponse.php | 104 ++ .../FulfillmentResponse/MergeBehavior.php | 66 + .../samples/V3/AgentsClient/create_agent.php | 99 ++ .../samples/V3/AgentsClient/delete_agent.php | 70 + .../samples/V3/AgentsClient/export_agent.php | 93 ++ .../v3/samples/V3/AgentsClient/get_agent.php | 72 + .../get_agent_validation_result.php | 74 + .../AgentsClient/get_generative_settings.php | 75 + .../samples/V3/AgentsClient/get_location.php | 57 + .../samples/V3/AgentsClient/list_agents.php | 77 + .../V3/AgentsClient/list_locations.php | 62 + .../samples/V3/AgentsClient/restore_agent.php | 97 ++ .../samples/V3/AgentsClient/update_agent.php | 93 ++ .../update_generative_settings.php | 59 + .../V3/AgentsClient/validate_agent.php | 74 + .../V3/ChangelogsClient/get_changelog.php | 78 + .../V3/ChangelogsClient/get_location.php | 57 + .../V3/ChangelogsClient/list_changelogs.php | 77 + .../V3/ChangelogsClient/list_locations.php | 62 + .../V3/DeploymentsClient/get_deployment.php | 80 + .../V3/DeploymentsClient/get_location.php | 57 + .../V3/DeploymentsClient/list_deployments.php | 84 ++ .../V3/DeploymentsClient/list_locations.php | 62 + .../EntityTypesClient/create_entity_type.php | 89 ++ .../EntityTypesClient/delete_entity_type.php | 80 + .../EntityTypesClient/export_entity_types.php | 90 ++ .../V3/EntityTypesClient/get_entity_type.php | 78 + .../V3/EntityTypesClient/get_location.php | 57 + .../EntityTypesClient/import_entity_types.php | 88 ++ .../EntityTypesClient/list_entity_types.php | 77 + .../V3/EntityTypesClient/list_locations.php | 62 + .../EntityTypesClient/update_entity_type.php | 81 + .../EnvironmentsClient/create_environment.php | 100 ++ .../EnvironmentsClient/delete_environment.php | 77 + .../V3/EnvironmentsClient/deploy_flow.php | 112 ++ .../V3/EnvironmentsClient/get_environment.php | 79 + .../V3/EnvironmentsClient/get_location.php | 57 + .../list_continuous_test_results.php | 83 ++ .../EnvironmentsClient/list_environments.php | 79 + .../V3/EnvironmentsClient/list_locations.php | 62 + .../lookup_environment_history.php | 84 ++ .../run_continuous_test.php | 99 ++ .../EnvironmentsClient/update_environment.php | 97 ++ .../V3/ExamplesClient/create_example.php | 88 ++ .../V3/ExamplesClient/delete_example.php | 77 + .../samples/V3/ExamplesClient/get_example.php | 79 + .../V3/ExamplesClient/get_location.php | 57 + .../V3/ExamplesClient/list_examples.php | 78 + .../V3/ExamplesClient/list_locations.php | 62 + .../V3/ExamplesClient/update_example.php | 79 + .../ExperimentsClient/create_experiment.php | 85 ++ .../ExperimentsClient/delete_experiment.php | 78 + .../V3/ExperimentsClient/get_experiment.php | 80 + .../V3/ExperimentsClient/get_location.php | 57 + .../V3/ExperimentsClient/list_experiments.php | 84 ++ .../V3/ExperimentsClient/list_locations.php | 62 + .../V3/ExperimentsClient/start_experiment.php | 81 + .../V3/ExperimentsClient/stop_experiment.php | 80 + .../ExperimentsClient/update_experiment.php | 77 + .../v3/samples/V3/FlowsClient/create_flow.php | 81 + .../v3/samples/V3/FlowsClient/delete_flow.php | 71 + .../v3/samples/V3/FlowsClient/export_flow.php | 97 ++ .../v3/samples/V3/FlowsClient/get_flow.php | 73 + .../get_flow_validation_result.php | 79 + .../samples/V3/FlowsClient/get_location.php | 57 + .../v3/samples/V3/FlowsClient/import_flow.php | 97 ++ .../v3/samples/V3/FlowsClient/list_flows.php | 77 + .../samples/V3/FlowsClient/list_locations.php | 62 + .../v3/samples/V3/FlowsClient/train_flow.php | 96 ++ .../v3/samples/V3/FlowsClient/update_flow.php | 76 + .../samples/V3/FlowsClient/validate_flow.php | 75 + .../V3/GeneratorsClient/create_generator.php | 89 ++ .../V3/GeneratorsClient/delete_generator.php | 76 + .../V3/GeneratorsClient/get_generator.php | 78 + .../V3/GeneratorsClient/get_location.php | 57 + .../V3/GeneratorsClient/list_generators.php | 77 + .../V3/GeneratorsClient/list_locations.php | 62 + .../V3/GeneratorsClient/update_generator.php | 83 ++ .../V3/IntentsClient/create_intent.php | 81 + .../V3/IntentsClient/delete_intent.php | 75 + .../V3/IntentsClient/export_intents.php | 99 ++ .../samples/V3/IntentsClient/get_intent.php | 73 + .../samples/V3/IntentsClient/get_location.php | 57 + .../V3/IntentsClient/import_intents.php | 93 ++ .../samples/V3/IntentsClient/list_intents.php | 77 + .../V3/IntentsClient/list_locations.php | 62 + .../V3/IntentsClient/update_intent.php | 76 + .../v3/samples/V3/PagesClient/create_page.php | 82 + .../v3/samples/V3/PagesClient/delete_page.php | 75 + .../samples/V3/PagesClient/get_location.php | 57 + .../v3/samples/V3/PagesClient/get_page.php | 73 + .../samples/V3/PagesClient/list_locations.php | 62 + .../v3/samples/V3/PagesClient/list_pages.php | 78 + .../v3/samples/V3/PagesClient/update_page.php | 76 + .../V3/PlaybooksClient/create_playbook.php | 85 ++ .../create_playbook_version.php | 80 + .../V3/PlaybooksClient/delete_playbook.php | 71 + .../delete_playbook_version.php | 77 + .../V3/PlaybooksClient/export_playbook.php | 88 ++ .../V3/PlaybooksClient/get_location.php | 57 + .../V3/PlaybooksClient/get_playbook.php | 73 + .../PlaybooksClient/get_playbook_version.php | 79 + .../V3/PlaybooksClient/import_playbook.php | 84 ++ .../V3/PlaybooksClient/list_locations.php | 62 + .../list_playbook_versions.php | 83 ++ .../V3/PlaybooksClient/list_playbooks.php | 77 + .../restore_playbook_version.php | 80 + .../V3/PlaybooksClient/update_playbook.php | 77 + .../create_security_settings.php | 81 + .../delete_security_settings.php | 77 + .../get_location.php | 57 + .../get_security_settings.php | 79 + .../list_locations.php | 62 + .../list_security_settings.php | 77 + .../update_security_settings.php | 77 + .../create_session_entity_type.php | 137 ++ .../delete_session_entity_type.php | 81 + .../SessionEntityTypesClient/get_location.php | 57 + .../get_session_entity_type.php | 83 ++ .../list_locations.php | 62 + .../list_session_entity_types.php | 87 ++ .../update_session_entity_type.php | 120 ++ .../V3/SessionsClient/detect_intent.php | 103 ++ .../V3/SessionsClient/fulfill_intent.php | 63 + .../V3/SessionsClient/get_location.php | 57 + .../V3/SessionsClient/list_locations.php | 62 + .../V3/SessionsClient/match_intent.php | 93 ++ .../server_streaming_detect_intent.php | 107 ++ .../streaming_detect_intent.php | 88 ++ .../SessionsClient/submit_answer_feedback.php | 78 + .../batch_delete_test_cases.php | 83 ++ .../TestCasesClient/batch_run_test_cases.php | 106 ++ .../V3/TestCasesClient/calculate_coverage.php | 76 + .../V3/TestCasesClient/create_test_case.php | 78 + .../V3/TestCasesClient/export_test_cases.php | 94 ++ .../V3/TestCasesClient/get_location.php | 57 + .../V3/TestCasesClient/get_test_case.php | 73 + .../TestCasesClient/get_test_case_result.php | 79 + .../V3/TestCasesClient/import_test_cases.php | 95 ++ .../V3/TestCasesClient/list_locations.php | 62 + .../list_test_case_results.php | 86 ++ .../V3/TestCasesClient/list_test_cases.php | 77 + .../V3/TestCasesClient/run_test_case.php | 93 ++ .../V3/TestCasesClient/update_test_case.php | 76 + .../v3/samples/V3/ToolsClient/create_tool.php | 84 ++ .../V3/ToolsClient/create_tool_version.php | 97 ++ .../v3/samples/V3/ToolsClient/delete_tool.php | 71 + .../V3/ToolsClient/delete_tool_version.php | 78 + .../samples/V3/ToolsClient/get_location.php | 57 + .../v3/samples/V3/ToolsClient/get_tool.php | 73 + .../V3/ToolsClient/get_tool_version.php | 80 + .../samples/V3/ToolsClient/list_locations.php | 62 + .../V3/ToolsClient/list_tool_versions.php | 78 + .../v3/samples/V3/ToolsClient/list_tools.php | 78 + .../V3/ToolsClient/restore_tool_version.php | 80 + .../v3/samples/V3/ToolsClient/update_tool.php | 75 + .../create_transition_route_group.php | 95 ++ .../delete_transition_route_group.php | 85 ++ .../get_location.php | 57 + .../get_transition_route_group.php | 83 ++ .../list_locations.php | 62 + .../list_transition_route_groups.php | 84 ++ .../update_transition_route_group.php | 78 + .../V3/VersionsClient/compare_versions.php | 96 ++ .../V3/VersionsClient/create_version.php | 99 ++ .../V3/VersionsClient/delete_version.php | 77 + .../V3/VersionsClient/get_location.php | 57 + .../samples/V3/VersionsClient/get_version.php | 79 + .../V3/VersionsClient/list_locations.php | 62 + .../V3/VersionsClient/list_versions.php | 79 + .../V3/VersionsClient/load_version.php | 97 ++ .../V3/VersionsClient/update_version.php | 75 + .../V3/WebhooksClient/create_webhook.php | 77 + .../V3/WebhooksClient/delete_webhook.php | 71 + .../V3/WebhooksClient/get_location.php | 57 + .../samples/V3/WebhooksClient/get_webhook.php | 73 + .../V3/WebhooksClient/list_locations.php | 62 + .../V3/WebhooksClient/list_webhooks.php | 77 + .../V3/WebhooksClient/update_webhook.php | 72 + .../v3/src/V3/Client/AgentsClient.php | 850 +++++++++++ .../v3/src/V3/Client/ChangelogsClient.php | 364 +++++ .../v3/src/V3/Client/DeploymentsClient.php | 370 +++++ .../v3/src/V3/Client/EntityTypesClient.php | 570 +++++++ .../v3/src/V3/Client/EnvironmentsClient.php | 772 ++++++++++ .../v3/src/V3/Client/ExamplesClient.php | 494 ++++++ .../v3/src/V3/Client/ExperimentsClient.php | 538 +++++++ .../v3/src/V3/Client/FlowsClient.php | 920 ++++++++++++ .../v3/src/V3/Client/GeneratorsClient.php | 446 ++++++ .../v3/src/V3/Client/IntentsClient.php | 612 ++++++++ .../v3/src/V3/Client/PagesClient.php | 664 +++++++++ .../v3/src/V3/Client/PlaybooksClient.php | 838 +++++++++++ .../Client/SecuritySettingsServiceClient.php | 572 +++++++ .../V3/Client/SessionEntityTypesClient.php | 552 +++++++ .../v3/src/V3/Client/SessionsClient.php | 814 ++++++++++ .../v3/src/V3/Client/TestCasesClient.php | 1041 +++++++++++++ .../v3/src/V3/Client/ToolsClient.php | 658 ++++++++ .../V3/Client/TransitionRouteGroupsClient.php | 651 ++++++++ .../v3/src/V3/Client/VersionsClient.php | 582 ++++++++ .../v3/src/V3/Client/WebhooksClient.php | 488 ++++++ .../v3/src/V3/gapic_metadata.json | 1074 ++++++++++++++ .../V3/resources/agents_client_config.json | 111 ++ .../V3/resources/agents_descriptor_config.php | 229 +++ .../resources/agents_rest_client_config.php | 238 +++ .../resources/changelogs_client_config.json | 54 + .../changelogs_descriptor_config.php | 98 ++ .../changelogs_rest_client_config.php | 128 ++ .../resources/deployments_client_config.json | 54 + .../deployments_descriptor_config.php | 98 ++ .../deployments_rest_client_config.php | 128 ++ .../resources/entity_types_client_config.json | 79 + .../entity_types_descriptor_config.php | 173 +++ .../entity_types_rest_client_config.php | 188 +++ .../resources/environments_client_config.json | 89 ++ .../environments_descriptor_config.php | 232 +++ .../environments_rest_client_config.php | 213 +++ .../V3/resources/examples_client_config.json | 69 + .../resources/examples_descriptor_config.php | 137 ++ .../resources/examples_rest_client_config.php | 164 ++ .../resources/experiments_client_config.json | 79 + .../experiments_descriptor_config.php | 160 ++ .../experiments_rest_client_config.php | 191 +++ .../src/V3/resources/flows_client_config.json | 94 ++ .../V3/resources/flows_descriptor_config.php | 226 +++ .../V3/resources/flows_rest_client_config.php | 223 +++ .../resources/generators_client_config.json | 69 + .../generators_descriptor_config.php | 135 ++ .../generators_rest_client_config.php | 164 ++ .../V3/resources/intents_client_config.json | 79 + .../resources/intents_descriptor_config.php | 174 +++ .../resources/intents_rest_client_config.php | 188 +++ .../src/V3/resources/pages_client_config.json | 69 + .../V3/resources/pages_descriptor_config.php | 144 ++ .../V3/resources/pages_rest_client_config.php | 164 ++ .../V3/resources/playbooks_client_config.json | 104 ++ .../resources/playbooks_descriptor_config.php | 247 +++ .../playbooks_rest_client_config.php | 245 +++ ...curity_settings_service_client_config.json | 69 + ...ity_settings_service_descriptor_config.php | 141 ++ ...ty_settings_service_rest_client_config.php | 167 +++ .../session_entity_types_client_config.json | 69 + ...session_entity_types_descriptor_config.php | 139 ++ ...ession_entity_types_rest_client_config.php | 196 +++ .../V3/resources/sessions_client_config.json | 92 ++ .../resources/sessions_descriptor_config.php | 151 ++ .../resources/sessions_rest_client_config.php | 195 +++ .../resources/test_cases_client_config.json | 104 ++ .../test_cases_descriptor_config.php | 268 ++++ .../test_cases_rest_client_config.php | 249 ++++ .../src/V3/resources/tools_client_config.json | 94 ++ .../V3/resources/tools_descriptor_config.php | 206 +++ .../V3/resources/tools_rest_client_config.php | 221 +++ ...transition_route_groups_client_config.json | 69 + ...nsition_route_groups_descriptor_config.php | 143 ++ ...sition_route_groups_rest_client_config.php | 196 +++ .../V3/resources/versions_client_config.json | 79 + .../resources/versions_descriptor_config.php | 173 +++ .../resources/versions_rest_client_config.php | 191 +++ .../V3/resources/webhooks_client_config.json | 69 + .../resources/webhooks_descriptor_config.php | 137 ++ .../resources/webhooks_rest_client_config.php | 164 ++ .../tests/Unit/V3/Client/AgentsClientTest.php | 1217 +++++++++++++++ .../Unit/V3/Client/ChangelogsClientTest.php | 381 +++++ .../Unit/V3/Client/DeploymentsClientTest.php | 361 +++++ .../Unit/V3/Client/EntityTypesClientTest.php | 870 +++++++++++ .../Unit/V3/Client/EnvironmentsClientTest.php | 1155 +++++++++++++++ .../Unit/V3/Client/ExamplesClientTest.php | 623 ++++++++ .../Unit/V3/Client/ExperimentsClientTest.php | 743 ++++++++++ .../tests/Unit/V3/Client/FlowsClientTest.php | 1101 ++++++++++++++ .../Unit/V3/Client/GeneratorsClientTest.php | 599 ++++++++ .../Unit/V3/Client/IntentsClientTest.php | 860 +++++++++++ .../tests/Unit/V3/Client/PagesClientTest.php | 586 ++++++++ .../Unit/V3/Client/PlaybooksClientTest.php | 1199 +++++++++++++++ .../SecuritySettingsServiceClientTest.php | 609 ++++++++ .../Client/SessionEntityTypesClientTest.php | 591 ++++++++ .../Unit/V3/Client/SessionsClientTest.php | 728 +++++++++ .../Unit/V3/Client/TestCasesClientTest.php | 1318 +++++++++++++++++ .../tests/Unit/V3/Client/ToolsClientTest.php | 953 ++++++++++++ .../TransitionRouteGroupsClientTest.php | 578 ++++++++ .../Unit/V3/Client/VersionsClientTest.php | 848 +++++++++++ .../Unit/V3/Client/WebhooksClientTest.php | 586 ++++++++ 787 files changed, 127491 insertions(+) create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Agent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/AudioConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Changelog.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Deployment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/EntityType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Environment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Example.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Experiment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Gcs.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Generator.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Inline.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Page.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Playbook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Session.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TestCase.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Tool.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ToolCall.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Trace.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Webhook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Action.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/DtmfSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/LoggingSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/SpeechSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/AnswerFeedbackSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/ClientCertificateSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GenAppBuilderSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings/GithubSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/PersonalizationSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentUtterance.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentValidationResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/Rating.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/RatingReason.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioEncoding.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioInput.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BargeInConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchDeleteTestCasesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpecs.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest/CoverageType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Changelog.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CloudConversationDebuggingInfo.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult/AggregatedTestResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/UserInput.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/VirtualAgentOutput.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateAgentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEntityTypeRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEnvironmentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExampleRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExperimentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateFlowRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateGeneratorRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateIntentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePageRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSecuritySettingsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSessionEntityTypeRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTestCaseRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTransitionRouteGroupRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionOperationMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateWebhookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerGenerationModelCallSignals.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerPart.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/CitedSnippet.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingDecision.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingScoreBucket.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/RewriterModelCallSignals.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/BannedPhraseMatch.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/SafetyDecision.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SearchSnippet.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteAgentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEntityTypeRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEnvironmentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExampleRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExperimentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteFlowRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteGeneratorRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteIntentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePageRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSecuritySettingsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSessionEntityTypeRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteTransitionRouteGroupRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteWebhookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/Result.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/State.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse/ResponseType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponseView.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DocumentProcessingMode.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DtmfInput.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/AutoExpansionMode.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Entity.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/ExcludedPhrase.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Kind.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/TestCasesConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/VersionConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/WebhookConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventHandler.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventInput.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Example.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Definition.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/ConfidenceInterval.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/CountType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/Metric.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/MetricType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/VersionMetrics.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/State.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/DataFormat.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/GitDestination.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest/DataFormat.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest/DataFormat.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest/DataFormat.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest/DataFormat.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FilterSpecs.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow/MultiLanguageSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowImportStrategy.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowInvocation.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowTransition.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowValidationResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter/FillBehavior.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase/CaseContent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/GeneratorSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/SetParameterAction.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GcsDestination.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings/PromptTemplate.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/KnowledgeConnectorSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/ModelParameter.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/Placeholder.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentValidationResultRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetChangelogRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetDeploymentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEntityTypeRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEnvironmentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExampleRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExperimentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowValidationResultRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGenerativeSettingsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGeneratorRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetIntentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPageRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSecuritySettingsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSessionEntityTypeRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseResultRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTransitionRouteGroupRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetWebhookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/EventHandler.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/LifecycleHandler.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest/MergeOption.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse/ConflictingResources.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest/ImportOption.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest/MergeOption.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse/ConflictingResources.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse/ConflictingResources.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineDestination.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSchema.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSource.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InputAudioConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/Parameter.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase/Part.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage/Intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentInput.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentView.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/KnowledgeConnectorSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LanguageInfo.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest/TestCaseView.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LlmModelSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LoadVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelTrainingMode.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioEncoding.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputState.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch/MatchType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Page.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo/ParameterState.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition/ParameterType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Phrase.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Instruction.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/PlaybookType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Step.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookImportStrategy.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInput.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInvocation.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookOutput.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookTransition.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookVersion.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryInput.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryParameters.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResourceName.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ConversationSuccess.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/EndInteraction.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/KnowledgeInfoCard.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/LiveAgentHandoff.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio/Segment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/OutputAudioText.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/PlayAudio.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ResponseType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/TelephonyTransferCall.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/Text.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/GitSource.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/RestoreOption.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig/RolloutStep.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutState.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseMetadata.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/Phrase.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PhraseMatchStrategy.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PromptSecuritySettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/CategoryFilter.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyCategory.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SearchConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings/AudioFormat.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/InsightsExportSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/PurgeDataType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionScope.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionStrategy.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RetentionStrategy.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SentimentAnalysisResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType/EntityOverrideMode.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionInfo.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechModelVariant.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechToTextSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechWordInfo.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SsmlVoiceGender.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StartExperimentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StopExperimentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult/MessageType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SubmitAnswerFeedbackRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SynthesizeSpeechConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCase.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseError.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestError.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference/DiffType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextInput.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextToSpeechSettings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ApiKeyConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/BearerTokenConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/RequestLocation.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAccountAuthConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool/FallbackPrompt.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/FunctionTool.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/OpenApiTool.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ServiceDirectoryConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig/CACert.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ToolType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCall.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult/Error.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolUse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolVersion.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TrainFlowRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/Transition.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/TransitionNode.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRoute.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage/Transition.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema/SchemaReference.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateAgentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEntityTypeRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEnvironmentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExampleRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExperimentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateFlowRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGenerativeSettingsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGeneratorRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateIntentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePageRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePlaybookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSecuritySettingsRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSessionEntityTypeRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTestCaseRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateToolRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTransitionRouteGroupRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateVersionRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateWebhookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UserUtterance.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateAgentRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateFlowRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/ResourceType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/Severity.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VariantsHistory.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version/State.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants/Variant.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VoiceSelectionParams.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/HttpMethod.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/OAuthConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAgentAuth.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/WebhookType.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/ServiceDirectoryConfig.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/FulfillmentInfo.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo/IntentParameterValue.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/SentimentAnalysisResult.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse.php create mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse/MergeBehavior.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/create_agent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/delete_agent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/export_agent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent_validation_result.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_generative_settings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_agents.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/restore_agent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_agent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_generative_settings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/validate_agent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_changelog.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_changelogs.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_deployment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_deployments.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/create_entity_type.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/delete_entity_type.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/export_entity_types.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_entity_type.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/import_entity_types.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_entity_types.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/update_entity_type.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/create_environment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/delete_environment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/deploy_flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_environment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_continuous_test_results.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_environments.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/lookup_environment_history.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/run_continuous_test.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/update_environment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/create_example.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/delete_example.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_example.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_examples.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/update_example.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/create_experiment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/delete_experiment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_experiment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_experiments.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/start_experiment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/stop_experiment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/update_experiment.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/create_flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/delete_flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/export_flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow_validation_result.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/import_flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_flows.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/train_flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/update_flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/validate_flow.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/create_generator.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/delete_generator.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_generator.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_generators.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/update_generator.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/create_intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/delete_intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/export_intents.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/import_intents.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_intents.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/update_intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/create_page.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/delete_page.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_page.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_pages.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/update_page.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/export_playbook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/import_playbook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbook_versions.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbooks.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/restore_playbook_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/update_playbook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/create_security_settings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/delete_security_settings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_security_settings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_security_settings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/update_security_settings.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/create_session_entity_type.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/delete_session_entity_type.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_session_entity_type.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_session_entity_types.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/update_session_entity_type.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/detect_intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/fulfill_intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/match_intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/server_streaming_detect_intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/streaming_detect_intent.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/submit_answer_feedback.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_delete_test_cases.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_run_test_cases.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/calculate_coverage.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/create_test_case.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/export_test_cases.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case_result.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/import_test_cases.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_case_results.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_cases.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/run_test_case.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/update_test_case.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tool_versions.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tools.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/restore_tool_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/update_tool.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/create_transition_route_group.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/delete_transition_route_group.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_transition_route_group.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_transition_route_groups.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/update_transition_route_group.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/compare_versions.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/create_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/delete_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_versions.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/load_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/update_version.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/create_webhook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/delete_webhook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_location.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_webhook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_locations.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_webhooks.php create mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/update_webhook.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/AgentsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/ChangelogsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/DeploymentsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/EntityTypesClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/EnvironmentsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExamplesClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExperimentsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/FlowsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/GeneratorsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/IntentsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/PagesClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/PlaybooksClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/SecuritySettingsServiceClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionEntityTypesClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/TestCasesClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/ToolsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/TransitionRouteGroupsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/VersionsClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/WebhooksClient.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/gapic_metadata.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_client_config.json create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_descriptor_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_rest_client_config.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/AgentsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ChangelogsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/DeploymentsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EntityTypesClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EnvironmentsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExamplesClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExperimentsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/FlowsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/GeneratorsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/IntentsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PagesClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PlaybooksClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SecuritySettingsServiceClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionEntityTypesClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TestCasesClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ToolsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TransitionRouteGroupsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/VersionsClientTest.php create mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/WebhooksClientTest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php new file mode 100644 index 000000000000..46561e2d32ff --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php @@ -0,0 +1,55 @@ +internalAddGeneratedFile( + ' +Á + +5google/cloud/dialogflow/cx/v3/advanced_settings.protogoogle.cloud.dialogflow.cx.v3\'google/cloud/dialogflow/cx/v3/gcs.protogoogle/protobuf/duration.proto"Ü +AdvancedSettingsS +audio_export_gcs_destination ( 2-.google.cloud.dialogflow.cx.v3.GcsDestinationW +speech_settings ( 2>.google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettingsS + dtmf_settings ( 2<.google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettingsY +logging_settings ( 2?.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings˜ +SpeechSettings +endpointer_sensitivity (4 +no_speech_timeout ( 2.google.protobuf.Duration% +use_timeout_based_endpointing (Z +models ( 2J.google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettings.ModelsEntry- + ModelsEntry +key (  +value ( :8Ê + DtmfSettings +enabled ( + +max_digits ( + finish_digit ( > +interdigit_timeout_duration ( 2.google.protobuf.Duration? +endpointing_timeout_duration ( 2.google.protobuf.Duration +LoggingSettings" +enable_stackdriver_logging (" +enable_interaction_logging (& +enable_consent_based_redaction (B¸ +!com.google.cloud.dialogflow.cx.v3BAdvancedSettingsProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Agent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Agent.php new file mode 100644 index 0000000000000000000000000000000000000000..724675fd9bcedbbf4dfffc4e5627acd37acd6232 GIT binary patch literal 9210 zcmbta&2tpj5ocB)i84NaDZiAzkc2Q zx_|w9Z|0*r-i`;Cv{mX*-wbIZdhrd0qQ# zeM`$P-`%>1QvPGHU8k!|DGz+U-L1Bq0C@jYc3QGrthYPm>tcn=~n$8r#GtlslS1nd-OAA6X z#D6Z^fnhs#h%@b{=*gnCZB_z`GuvgitBw`guA{LD>yAZd-qnOoCVSa)(ep(uGHHVa z0|QaG>x9&I%t~RI29|Goq3ds;Xf|7>VH`sCWaeGDEK_H1Ycs;eY_`qFMJ@EJv~hJ! z^J!T1o!i`Qrl1!8Ds%{#?%4(1aaek%b5?9xDdp&nxo^Av zU{fDZnJ#@B**P5wdTHOpZ7XfkFtnZW0A6=fSS{J^lIv{S<^EmjqH6{7{>gt7Cf0=2B`bMxUj5jX zrKp!mapkQbLe0dr!Ybzq{BsfB?HiiNTS7E#F%U}EQ7mm8r1uw+Q&N-Z*$8y3as;F$ zryB;gS$P;mSszm1T!Vlwi$D&2Acy#x9gtIIx)I1!m(#BGn8xziuy{ht88fe*!O&Vt z-gvbnLNL#%ecEc&B{{KDPr!^DC!o}RUJCJUfUugOEXCwt)JNh$5zakKBq{M`>-2zU zix^Gagfp8SrPj`tyG0MesCI}3Ds{|a1x@C|1~wf}K&Gl_%FIaWPp9A*?=EBvjZUd4Q3@TUosKAs!;QBRP!;cSU+o7GBaR7|H_#V&^-FHv=f%M7E;kNPpT zc2M;^*T)9iEEuRqwV|2gWD<^t_8v8!x(-#3)fYGoqb1pDu!7ZLHbMx1xsM&wH>$p^ zzQLbu!IbnXbd3-lk9S5rfdZrR3uzIyE~%aF7_?ge*tq=AV7Z}AaJw$O)HS%!P#Qun zmPC+7mXKlKw|0c+FfOLDz!hD0S1nxO^9xsA>X#waUBQN&fJ*McseoGOW%#7-&nd1Z z^HQIK+3s34<-9ln-hpJ40HJB^mV883-$0g9MwCKP_P-h&HLU=KImu5W1Qo7j3$*$h{P8KRJJ7_PY1E-k6&`DFCSY%OSY5{E|TGd*^w zwdIjtfLgXgk`IyO&C=r1>dKwNaLWJT(T)?k&d5DQd7ndH|AnCy~H6i#Bc?o^9)2N>>-&fn|HfzDc4?xM=bnYAOyuVB3S89CE} z-)vQexZ^(c+`vW-|AYf6$8|CVC$WyLU94lH=p)D65n#^Ln3hF@zzE%4>L744H4`u* zq-cP+jZmH&hcWasb}~5!XOW<^=PEf3!_-0Wk$r}Dl;k2zc1}BT2__}%v?RA^Upy_7 zk6@}xMv*&kF6vd(DH+uO>tj!zy|{|e`Kf3pqUM_xL`>*@uE4pjX+++HlR%c;wkL9qgaJv?1;%2;?~U5bFdxAXx$M@EGXr z_+}8bS=6Hps3%(}{G@*g)7|@rU;-avBz}eHA7q}%U$qS4x!}{8XVK4^INzcadfjP59f?-0GOMAaiggY+n(5|08ZVvgOJ-7JfOd>(jX)^VAwN# zTuKJLaD~VABI)VjDLC$-(MEu0X1*`S7{B0;M4odhld^y`t{QlF(xl{l80HQKxa<&? z^5rOjI`ii=H=320!x&1#B0M2dYjARv3eO_PK4_$3xyY@a8<+Z>0%Xajm~ec}NZsM% zbQ6woS9y&3^pxj*>MJ0hdw9dqY)Pz7fM8#d6Sb6q(JI$xFj6e-Nk);6OE*4$r9J_& zOe?g-fWt=i4@ZII4;YzkitHiPG3LwTT8ChcHsm2PU*x#Pw(IYiA;;kH`CdJ>-LCX9 zDp}z=gx(yCQfJ@xU1yJ#i{RQUNYeMP zLE#l#fRPtioXP{#BSp@`)Uv*%8!PJ%KGnC3&p+GT$S>Vpxtm{}I6_9?Xzu=cZbHH4 zH+FAx{WD`jU;0E}%}*Rn72$M~ixMYJH*PXF1j+proDe&Yht!bm1p|RG95{n_eZt0I z#}wUn?MUtoS%9hUhTt^bBVpfeuBgLiV3Tnih&ma^V2~O20D!l5e(NcBy;oXxu$B>* zO|AoVe!;j1cgS!(c2&dEa=d3YbksnA z`o`8>+~T$r_#~g-z!VsRkrn;^{Tyb%M54Y&B{=gCnQ81bOq045#r~Y8psXa7Oz9YHA^es;HcKBjdU^Kr2=O=PiVeFz_S!PLL2)cD2x~Q z+{^&8o^{S%XDN27ZZ#@f`$>N~xGSrN<20GN?IOad-zxAXh9B9jybX$Icoh59rr6)& zv0s4e-7%JjvRxlZcHDjjeu>my6qpwMwS8h_$R?ad&eeKnC0XzF9+=&(mM@ItXRtoZ zv3mY{0>j+Rfc#YfsFNykt%n_TQR!B)m*tH!1QMriztAO9{LR1r_f2As%(AyL&jfi~ zj5A}lf#uFd?3Vmdfsv@*NVxItm-kPjq*KS>Gi-`AZjr>i4(FV## zdPS!}b}$>)Ug%>YU~?v>Rmg2!NDUCltl*O5A82v|H|%M0gX~}?Z@$n^aa-pas3W)g z*8DY|0em#wSEM8Bzd`F8h-FXf8)PHvC!-{aX)Ax-(2@qTBD8%ONB)IYHE@ugRyD{* zR=pKj)o_iSj^CrCD$n(+oq5irykm{M5$9(f=nqrZd7%69A}iQlR+%L~C@?0wGsg`w zA6eIhV>Sx+>5=0TpjE|S}Qd)C&~YvjMk zY0%2{wnuthCwH6`Io1n~+t*7ydZ80mE^|%XkMG_cve>_m2+}PKrAEF>fZB~V^xVX5 z6JNvEuay`2bluSSoYw}}JM%y1o_CP#3%)b;i4k9`WjoQMUEMk0<-Nf^&e%{MT^Dc| zz2(9;QDwJ*=Ckim&^#nN)`3^N&Hnm6kyu{&bK!(F*FCzD4Hy%rWdY)z_jkT~?)mB)ch7|fVwpI^(-|?v z&Y{Tmi0FEhQG?oIC+K#GCmOWxS~l?{Q7qNOYON_MCAGPPralckgXF~?r9GSE44VdK z&a`x!_PREGlQRx-`|CM9FfFPX)ahD1i8}{y^gi)j-5_GQUZ@bJn>y3mW$ve44E?lA zLqF}}L3?NY1%P4ezAwt5zan=B??A*KH|W@wA^J>b_~)VJYnEd%w71@3Sue$|Zu|IOQS=B4Jm&?^J9Ka~{A!PZO?IvJhDB_% zK=$-~i+cI|aaG4o&NJO6aXUZSY6wRuKms9(;{$ROpM7n`n8~I&glGeKwLB~;Eb%e? zGY_BsS3(JQBMXUBP&%fdWE@EQ>x&DqL*2DY1w3rNRtcc!S@Wl$cn)BIIBOo9Z!*cDp`dnFO9ruPsP%Mgzan03_iV0CCKL zdUBGwfV>aMZW5$t<^rlGv+rQGpnE-{I?+84zJPg$YMt;5xvvdsn4HWi%rVMz``Bbs zLfQ8zNUM$;uoD+iP+=~*=a?lmEvLsr&#gTj;4r>368E9RHigt*a#C1;YrfuhZK8!^ zN!ueHdz%Tfni4XQCXU`gQP=>iv`aIyD7h@m!;HJ<=|1Ws(R{=yg}s@DsXjG{owI zRTNB5MB;QqS73>{$f9zFHb__^@zZL?648LQd8vgdFEr8lQ)+ILtd-4B*a( zu8ACYcs$;EUMFaG?9pwilschf1PwlE@*E8FP{ zIL>aIJ=b;%=_%nh+!_(p%4MxqZ#B{vg%x--BE?a14zTy2g3g!QxO-D*8#)}DW+eOstEkS$rbH{Q#T87bjD+#atJQE@8d{&)pWi;IPylCXqZ z{f94qA${U~=c`^l@%?J_j1RUg+Rydq$i|O57B2n9f!lcz{`xJMEN%Rryj$kGy~KBW z>3Fx7iU-op`rpZ=NS@Dgg?#>41CL(i^Qa@Y;IKZH+6 z?p^$Kl(VV9H&Z+td>-ZaGm0nt?@{L>YBRe2c({i?jaKm!oBO$2JJ*bM>mxV<_!nul BEAs#V literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Changelog.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Changelog.php new file mode 100644 index 000000000000..d67179b838c3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Changelog.php @@ -0,0 +1,60 @@ +internalAddGeneratedFile( + ' +’ +-google/cloud/dialogflow/cx/v3/changelog.protogoogle.cloud.dialogflow.cx.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/timestamp.proto"‹ +ListChangelogsRequest; +parent ( B+àAúA%#dialogflow.googleapis.com/Changelog +filter (  + page_size ( + +page_token ( "o +ListChangelogsResponse< + +changelogs ( 2(.google.cloud.dialogflow.cx.v3.Changelog +next_page_token ( "P +GetChangelogRequest9 +name ( B+àAúA% +#dialogflow.googleapis.com/Changelog"´ + Changelog +name (  + +user_email (  + display_name (  +action (  +type (  +resource ( / + create_time ( 2.google.protobuf.Timestamp + language_code ( :wêAt +#dialogflow.googleapis.com/ChangelogMprojects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog}2‡ + +ChangelogsÇ +ListChangelogs4.google.cloud.dialogflow.cx.v3.ListChangelogsRequest5.google.cloud.dialogflow.cx.v3.ListChangelogsResponse"HÚAparent‚Óä“97/v3/{parent=projects/*/locations/*/agents/*}/changelogs´ + GetChangelog2.google.cloud.dialogflow.cx.v3.GetChangelogRequest(.google.cloud.dialogflow.cx.v3.Changelog"FÚAname‚Óä“97/v3/{name=projects/*/locations/*/agents/*/changelogs/*}xÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB± +!com.google.cloud.dialogflow.cx.v3BChangelogProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php new file mode 100644 index 000000000000..ba01efcc8462 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +‡ +.google/cloud/dialogflow/cx/v3/code_block.protogoogle.cloud.dialogflow.cx.v3" + CodeBlock +code ( BàAB +!com.google.cloud.dialogflow.cx.v3BCodeBlockProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php new file mode 100644 index 0000000000000000000000000000000000000000..fbc544844bdc9920069107a8227b796ecba3131a GIT binary patch literal 3798 zcmcInU31$+6vcLuCO02-)i2j1R82F~?G$B524-+6j4dgS+xi2`PMeMyp~!1nAWK48 zrAeW$yz$KNzzdK31%3e!`~+rr=2vjFl4Zwn+nEIN;Mm%`=bXLw?A7k4pF4dAZu2E# z5m%$6!yg>;v`=`)wW+P!CV${}yTs*nd*B!*aRr{2YJ9cUzek9P5o%|aC@_(QBC!z?GjbDEsN;Xuq}bH09e|9c#ftMzEm$( z2-Sk)+JwoFI2TyW$BiaDY=<>NxV?KXM9m*ls>QTGa?-+SGVq3X0I_^ocARAADv+YcF&<@ltotFu7P< zAoULXl7Uao>=bS-oGLJr2_usU`jK$Bon4KPnXRxQn;sJ$+HC!g1YDlt7EXqXWA3EK z4#_0=L~dp4zVJpmAqH#W9F7AR!DNz%u)sZqOvl#!0kNoxqIBYUhSgICc86qU7{^C% z# z2w!MK;DHuXMCfRsnEJbr;8x*c$WDo+e(MwWI7~-4O5mbLG*|Ddo@F==pM_Y(Fh< zS70gF*rsax)bVN50+wNxJw=ma*|UeRe8Q~UHCTyT1U0A`HXnu-KlfcDLR*3vN{(m< z#@&VaLG-p{u3Fr>KFs&91qxyB&VB{_+kAS?m3<5lG6e49hC+i*y1-?D^L)p#T^d-# zK&N0c!zHD1v)LaKur%%|PQ?ohdLTt4NI2{1c${IPR<_jtgG>nsioX60q3Z*< z6sw9wtiyYyMy*wq%GHu8$zoY4*Q#o(s?_oOPFa@H?{GKZYC#m`dQ+Cv;=UTkrxU?Y zLw+QSr-qX2FX2i|HztF7AJ$_8RS|0qSuM82$8vLmbqVJ8n&c_s*X06VO8VE6(U4Tt3k7 z+>1S*MR0Vy^e0A>>pvyn(rJyi;byT=t)h?WyN!Y(tCd1i+?^;q0#6I7 z)~YhnuEC9IqhGYpE9oT1!|Jr*hOE?URYgvx?j68#e4b**In0ApXcknZ8F;a|UzaBY ztpLEEgESj0vDs?i4oPwtG4?xk?@PEQO+C(WIoObDVyhxon`*sL z6JO|qh;hmi`BqVL7sR`s!xP8NSpz%9I{z1d5}OuWodd&0vdwd;xJABG)m zc~BtDyKOH-sbcp=iou`@oO?E?fjNpE3vzp!0u|o=&mM+N5bCrKgnC+cs|bp q^7&B&K6;kV?`X&7E15;xa?dP^})%2A-E zBgcAYP9$8m=bZfTxLia1A zbh|-8DnQ{(03iqT8TxGriL-H6c!LOkk8`PI-<)dc&<-3`kMpSyBQJU! zx^~CM&KGzT5wLxLF6g@50}Pbd7zIxt{YL_!urGwWXr6c2N({#`3&L}Bmp5bknAi?b zVA;f~UZ4bLEm@fZwfD9pAFnC-i(wSv9#<1SM@h(L zV6c^WFtE7w(d`WYO+Zf&5rPP8*5+BSBwQ=0v6V3-Vn7UG1KlBJ*ON}(B%S&xhLXOc zI$91#Rht3N+Fs}mAUOw^ZJsMxl$nlM6I6<-LwtLAgvih$HiT_5ANKWg-HGOL(4>e~i6VzK>n!G%T9%8UTGwH0DUB{?kY@sOAk7>2&-!lGHvV1yb(sNFwI3 zZc~$I3Wt$@qsaJ&HzB~I^ay?MQg>MB-PtAI3;;u*Y|>I~j+#s1!p6T!9Doz90WP#6 zJU|N;gw=N70&rnZ2mpwC#OT+=bg8_Mw$bt>_l^a#lK|-#!$7_2FK(@mId^sIN2o6> zqa~9JSv%s>?Yi_XdRQfqjK>Mf(T*Lbd%Kct{W^~p!|Wa5EQXdYBqn@vL+lsi{jgG> z&Z_3&mwt7o_yzp#pZ|V{*MutH15Uk~<^zglBh<={8I_&nQg(ts!k;m8ZvsIfcSDR5 z(&NN#U(58tnc_~k)tU*eCe?rJBxtDRU1Ry(mc6c2K5m-3SjOLyN bH~5CPGDS8leoyJz72B07>1{zHG(zZq`MbM` literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/EntityType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/EntityType.php new file mode 100644 index 0000000000000000000000000000000000000000..90c91229fb6432cb567475c9ab257f38dc31fe18 GIT binary patch literal 6225 zcmcIoOLH4p6^`V`*hfyR^d#dKsdPFi#xb52*u^l_nUHEpZAD|tQrSw#P%66Gtt+`n zySwRbC3aliz#pIrRxF1q7O;a2dv?PPR%FG3Raj7LS#j>|hgvTrdj>Bo>E3hBJ&*4^ z?)~(MbL_x8H6@+c{$ShJU8|XATjWYye9;A)ce@ zgfG?d72<16&DRHrZN2a0kp0D}% z@xbs@!!mqiH{PI8kNK8ndIZ@AXMdInM;rO;&LsCg<6F>GQU0Ht^9!td;Eq*=FQIZCfe9Zf9ha^wud6)Pd z*LuYCrUEYFZ;c^dlO3ZWTb50|U|XIfb#3a37{ypH4UE#|cyj8!Et66|?T>BW)dGwE>T7y zN+hF#BDg%vVYIOJ5pQ{hpIXmseS30ofv(&EWXY*+cABKAI>)Z&p{!XZ>yt~!3MJH- z0PZd<5lcHViQ4MCd2@!A`>w_+@A7+S^&EEtW?j<6rR910dvzOTLv=Wqd8L`1FfxGy zZ^N8-X4%%+iMO0a)q>EhK7boa@3}*mh0kD`hJw2V+1>JfQGK?5SW^n+ow8EQUPBzr zvDJ!P%ci*NFwcJNl@IILG`9#D_VYj~DKBc-DdBUtIT(cda94g-uc}BQ?;n<{`)Z|H zRQk@j3v0uOipq}sY_Fb8N$2n6Q+SZb%>Zbalb(nTIoCxNS3{KlnCQNjI}g8I>mkr>ERvRw?Vff4mOyh9 zA(Xb!fD9cf)Ryg@Xg;O`&DZ=m2#+vYETX6#CW#%ut-^Ivv)UbWrK;2HokjV9qJjd@ zCFj;)sVLWFb*Fkzk?Vahn1kv3UNw(U%fiBEhlrJ$T-cRMN_HlH9SuN#8x{+s@I?w% zhQ!2ku-OyTXV7=7mZ2+ZaBG;`Fm+NBREVI(;-nL4^7LAM32tNYLU>?}NQxHLhUgfL zcfvmrRppca3#x{h&x$shzdOQwTER10-x`C6!2Clt=%TP6!NLh~G3d5KM~ARz7sd%0 zVYOJHvZ_o}P}-gX=WDp;C;iI6J5LiWg^4yQ*pqW_cN{z-; zZ}kUoYuGw>4^|TRSCd177ubZ3kFu|Kmo+Y$Fau7C6XusG_+ZcQzWyS7yT5v|T;XoQ zyh96`hZiSSd1p9809*3ymn1;@yx_sofL8w_teLHcV}hZ?H#%+!7A>3()Wo4oH^G2g zC6e$&)QzO%;1>0w$x?(H?grrxDOf7F1h2$h#iHZBTJtMFCIOcas*`&sntu9P4=rT# z!f#OPXAZW!AzJsHOB=&wqB7##05mzsbl9;fovs;dGFz)r#G?URjBh? zN-(d(47PfmFt5&S{c8a--SBzbA5(C>2SD6*q~q{wkk~^V#(#D4UmPFelg^XHd_mDJ4^Ydxy65qjs!q{R~&I&3h~3l_VZ{Hxm$M1|Dt|S-cW7;uT`o zYwYjP*na4bHMXB2GWLTA0C9@32Z=t|ZCo98e@?+-U!CW^8yz|#XZq+PUB`iSfGubz zLiw#6-ZgrX=nAOg{+)uG1LHIIy)pI-a6}f}i5L@a6k`0MB>XJ(rTp=bSr{jZU|t^_ z<)g08EG-I882qkasT54+Qfh;`r2$Z*no{TubzG>uZ+Ak z|3&`%*!LYz%H>|aejSD|zEb0(%yICB{SiL>`1InqIgY%0RQ~rVxQ93M2pGdNB)`~g zN;UePTuc4%I{|6*l7yH0w%zxNjyhuZ&`+JCNA%wp>2z`Dx9K}2_Fyg+=!3afj33O! z!m0Rt`(658urEoBK$5x?xb#Ajo^Kz`vg)z@Vf?DN89YQM-mOQzSu@JuZTSK&0R9X6 C|2(+> literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Environment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Environment.php new file mode 100644 index 0000000000000000000000000000000000000000..7605482be85b5089a9c8a534c5e407fbf49edcf8 GIT binary patch literal 7377 zcmcIp&2JmW74K4xVhxMRTXDNQXh>H(;_9O1yN#24ykQc zyW8ERK4K7UgBB>#Ly;5+dMHq!#~zYH554r*Q!WMCn@=s!lmCMnMbS62v&-d|$(2(d zEMoV)H}7kH?>DpGxoaQV=!UpOOyX!BX^6Em(K{rf?O2{ww+yk?ZZ?S{)~zF3H;5yP zV*Z}^?!B^D$nTUFK-IO{PMs)X%d%Pq$<__4-N-g{&9GWc!#c^ ze|EcO=ylQcG!OpV)ZMCX>K^FpA3#*=VpB6*0{Vlp&9+(hbjuW}!acK2GPgzFCY8Nu zTablyF>tI%69Y-9?3f;LOwFj|iCcGc+q0Y^h$>2pcwsu}lgw?tEH$S$#f zE_zOzL{}F@hj?wrTw{Jy1D)_!Wk}joTd%05Y0)fLrmHC3n7SrLDdr3v$`em#Qzu4a zgB)tdy5+=E-6OnpCU$aoQ&h^t^>Ug^CSQJpp$DXPXj$)1ZfDmrTTa_Fb+c8uXVV=N zFY945K`9GIws$u9(xED=z&n~7!|hPF1pQWzQSnf*ti#^*v?F`C!)((mzp3*rqBa`g zj@Seg$%H*jJNg#-PZnik!Uw+YE65CQ$u@APSjF zcpl9(bk{btvnqRyYKqCz- z8?x`_h|;qSZA)e(H(!UbWm426DPIWT@Ca0i)m0M5Ln@AdMFff9zqnC)O)eJ)8^>njs zwcRS9V~TddMJ%Eee{DOYL2Sc1qildl(2ls6-a{|+1dLTQ8>G;JKph>rh`E(qd38)> zxFMzUSp5LKGTQq{GvWKtAwMK_&&@vMzdBjNs{5dxeHi@gWVIGJ4pQuIC(3Q$A?Z?+ zj`U+Rx2wBeWEFRh{HP5;f!EQrtvO(b*KV2Bu5t@c=#2$Ip z`-E>Zsf|*D9=JA;1A^Z|GZAlt)Gm%mZ6p{xhpw39)T>68W&2(#qnEZwH0~hmwJ2z8 z1VK+&BI$PmO642^TRh@LVES1znn%e1Ucz)t!UT-;|UG{nWeB`9*nUm}8Y z6x_L^gE$v51K+U+D3vD$8JfChtIE#>^ztqcr?wplc^mrPa?XO{Jkttz!e$3@Jlc={ zf7Acs0(ud!nqwaYM&P(@!|R)r@1bcR7Vw-^?()j^m<>0~q^!1D4r$RNTV$Q>$SAA& zYq&6ODUL5cQ5R8WG!O0p0_b5uG&FAnwRRV1lfTYH5qwOq(o z%Y{<8x>qRe@0P3k@0N;%+|K4sA%FENfLqf=wN!%N0{y+I?(D+vgz_ihvHC{=Md@AN zI2)E5{1f3zNAhfUrgifTXy1KY^(g)GlirbjfKq#Hv)?-(`8RrThS8_kNNA(^Aq(&x zFQIG09b>a5xw3kWj+6F>tQZ{I@f&Cw2DIe_LnJe11)9VHRggXwVABFt^yi9hkZ@RT z_6^HBY*@aA<95b`IP!^r7M|i0&vF^f4bO6rg!80%^ho`UfM)ZIH*LbbN`R|hMl<2N zXolX^R0B5YbN9*Fq@*Jpb&V(J?qH+Gns$`XbeSSU%S%!zx>VSI>nO?g-}#zw~yi0nBqSR=yES5!>^C=t5-aTCI%ytwjZhNjM(EoJsys8zL!)lcJRNU`v;gG z9+%kxjUb5YLFke5wj5sJNWT=mP+#di?Ox-jQph^H0F?d9lSeA{%dr&Ujx5}5>HO7F zqD&Njlt8lslyYqB0~!;?{@WO_&qab>;%9HlNm&BQD+SiB5gGYBweL;FXAB1WcMw|ff&!Bw=xXRdy4QK=*kJ-APLi^qsLREm+`lsGO-V{s`*0m2LKL?SnjSE(a z(@*^rVG)0rK=UI>1s+?-F%&8N*0@d>ZGg8zt#{g#@ckImrXR3}6K4ER0iiBaz^{#Q zx+^+i^?wT0&qNtQSoR1(>8W>7db=N`V%OUzDU_B$q0^^dsPiKaT7Of&cj$Sxt7Nk$ zCnr4o@ODmXdx!ofv}L$S^_rG*v@}k=D>LBz#LinternalAddGeneratedFile( + ' +± ++google/cloud/dialogflow/cx/v3/example.protogoogle.cloud.dialogflow.cx.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto)google/cloud/dialogflow/cx/v3/trace.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto" +CreateExampleRequest9 +parent ( B)àAúA#!dialogflow.googleapis.com/Example< +example ( 2&.google.cloud.dialogflow.cx.v3.ExampleBàA"O +DeleteExampleRequest7 +name ( B)àAúA# +!dialogflow.googleapis.com/Example" +ListExamplesRequest9 +parent ( B)àAúA#!dialogflow.googleapis.com/Example + page_size (BàA + +page_token ( BàA + language_code ( BàA"i +ListExamplesResponse8 +examples ( 2&.google.cloud.dialogflow.cx.v3.Example +next_page_token ( "L +GetExampleRequest7 +name ( B)àAúA# +!dialogflow.googleapis.com/Example"Š +UpdateExampleRequest< +example ( 2&.google.cloud.dialogflow.cx.v3.ExampleBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"­ +Example +name ( I +playbook_input ( 2,.google.cloud.dialogflow.cx.v3.PlaybookInputBàAK +playbook_output ( 2-.google.cloud.dialogflow.cx.v3.PlaybookOutputBàA; +actions ( 2%.google.cloud.dialogflow.cx.v3.ActionBàA + display_name ( BàA + description ( BàA + token_count (BàA4 + create_time + ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàAK +conversation_state (2*.google.cloud.dialogflow.cx.v3.OutputStateBàA + language_code ( BàA:šêA– +!dialogflow.googleapis.com/Example^projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}*examples2example2ó +ExamplesÑ + CreateExample3.google.cloud.dialogflow.cx.v3.CreateExampleRequest&.google.cloud.dialogflow.cx.v3.Example"cÚAparent,example‚Óä“L"A/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples:example® + DeleteExample3.google.cloud.dialogflow.cx.v3.DeleteExampleRequest.google.protobuf.Empty"PÚAname‚Óä“C*A/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}Ë + ListExamples2.google.cloud.dialogflow.cx.v3.ListExamplesRequest3.google.cloud.dialogflow.cx.v3.ListExamplesResponse"RÚAparent‚Óä“CA/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples¸ + +GetExample0.google.cloud.dialogflow.cx.v3.GetExampleRequest&.google.cloud.dialogflow.cx.v3.Example"PÚAname‚Óä“CA/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}Þ + UpdateExample3.google.cloud.dialogflow.cx.v3.UpdateExampleRequest&.google.cloud.dialogflow.cx.v3.Example"pÚAexample,update_mask‚Óä“T2I/v3/{example.name=projects/*/locations/*/agents/*/playbooks/*/examples/*}:examplexÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB‹ +!com.google.cloud.dialogflow.cx.v3B ExampleProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Experiment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Experiment.php new file mode 100644 index 0000000000000000000000000000000000000000..4a6fd0db6eb3a4e112665bb117217778a23314ab GIT binary patch literal 6922 zcmb_hOK&4t6>dB4<2;-@-HF?y8LB<4o^;5RAsHCtp6;RiNMcCr;5bnaim0yG*GbKk ztBR^}9<(APBvwc)7>Nb!SdN5*Sg_y^AhF}I%8CVIF+TvIVZ*uiR+Y<6f|GP-5!?5k z^WF14=T?3Ak$q^xJJK38siS$cDea$1-XWE2$MUR(Wk~y-R*O1P!)n{QK^<9=idCsn ztxKh1x&8oIU900XXihq?tOJ8)8-~?sW}CWZSO+b`I?gsuvPUafdSX*YZ&TBgIW&N& zwW(`s4Jxf|mpHE=Bf>w5^WW@N~-;(1pj6z+|)!Z3}JiR0`zU zVrD^;?3GQAI;Ljq6{*{BblbC>EhNq54yYFzldUW~_K#(7dP`amGUjp@gnTM_PKQQM zmn4UJ9mjmaB>cr$#eR549uR za&E?2qkiCATgcG%#SVrlDtP?^Lsm3escn0ww_xSEZffqQx8SW~rT*62{ua-7%$aP{_nW`}X8%5Ap7A$>auPC&)7xl&pCS+~ zr0@bG3xdpllK|a9K_+3Cm7G*eiY-i#`!LzmUE9!3RlXW$tNEdSC~@)zB$|FwW00kW zIQ=siVTnsq!}xQ0IqN&%3WLhsbLDNuM%DqEw8e`OVvZn4V)^~+gA_wvQiN&8GO#{+ zYQr*H`ax=%qb&_Us|lt8=OKBR3Q&YzGaTfr*8>qcy$y2#MoZI;jzd+4YA))RM6e0+ zZ5YLn=onsVl!Je50C>b`SRIg$WFgT&NRO(_xv4P@lMY}4&&y$Y5g7p0aXdjkK9GJ1 z#;Ms9)Dr`#--jf&A5ZPr*sFY*;2K=BH0)QZLCpj2FqPnJ_b;dt)HV#5ACIlwsIAwM7A%UVd_8#RW_qAxH%WAv_twoB^_GGQFI;F<^l~ zaJ-ow_15nYT;K=rau>se7w|^JG`v%x#kl5)<-#qF#>&-W{QMY3*s%#uRcywwXWa|w0}ReLMA9&)Jk8_8HO(e*#F7pgmWV*TT-QlIE4xLdE*l?^8Drcy7gtDF>tMPRX0->Fsn z)i^;DD7&Q^YM@5ehca~-5pClh%x>3F-M(`sV5C@6R_h3yfU(+6rBbe}CF5iqhM8K) zAwpofR^8aB?$p&)rM!WL9nSqS_J#6`7(Bc>6uK3Je1aY06WZ|H>`VXKS=O)`Vp`6= z48ERawF4Z1kcxkvWvO|jJC@0AFSr=_g!kctED$o4d(=*9xq&RR^jk&gqiGN=T;9Kt7G#V9?$%W z$=lmG$YqUzwTxRd2G+`>ZF69Wj&_pFPvbDvJHJ$;^9!|ucJi$O_Ur+X{a@Q2wK2J7 z(ImlG<@ZM>C7TszgZTz6=Wp?`Fx`ek6y$E-R4MxFJj?_R!S>L=DB|82L7PmrbyE%I zV!xVRJrrbKz+`wFn<{apby0Xx6fr+=_@OpleVg=zgN^hJL<6m!IfJ-q(F;SM?)557=GQTpFYw8= zD?xz!YKFwT=$e6BGO>JpEASgm<};LThtIGVrR&8P*?vQOoXLV*XZJN<$cy7xc%v3l z?ZAAI8q}i~g?bfN)L{<$j`NxwybbrZJ|~I^`x$Pbk9Drh3P&u_ zaPr{F?POk;n{ttAL;j75_ScPpiuNR#

F&yarN`~TWkDPk6d7{dgNmGsz)xI z$h#|F#2<+LT#ggua$O2sdY;SeuI!KU3|e_Nd_KM;UZF(ZxL~;88=*_yws1=ER^$xM G0R9I(zY<>n literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Flow.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Flow.php new file mode 100644 index 0000000000000000000000000000000000000000..ac2c0521444252d738b89d14463a2b3371430d33 GIT binary patch literal 7914 zcmb_hOK{uP6%FZ6#V5s)o@1Mqe=wXjiYkLK<+=$SC4opvW~~oLrag9t859B^Dbx^v z5`Zk%)uxNK(``0sSDh|9=}bFace?j7UDd00rYkSI%&PZ&@DV=(Y1<1+0`9%HOFPddN!w2)e}_nJ*YO?0v83&w-6mbhaCTkOB3(t2Dx1>AW<#o0 zYK^O)>N!EzASJ2eI30@=49f{xg_fyXPN!`-PYT9nj8J6yO(hAr?&yWQF++f=>4axI$AAY=NdYWmQ zJ}8<$hd7p`wr+U@6#He{fo=GvV@p(F(>BQ52NJhQW#4lhhSRJVu#%g9a+ zMnh9=?dedq);;3;rrjAM>LCVeyROsq@A-uA4IZ|cVTi3nEqbDNL zh2jRr7+8-K8zzh^U*B~HFUrQn^-oPP9Mo1TnguH`G3TQ0rM>(<`b!bbjXEmvB`&EL zbSNtEP*se5Wp8ozoG_%jCd^&h%6!DmUP-)Y(|*;qMZ*e#^9g~j=t}YG2jUf5vwx85 zqV+US^qx>#JX+0U4W@ab!-P^wCR_lhko@Rq^R6y>MQcUPA~bIut+^L~=f zp~(#^2&W*vgV3(iB9`VqbxA%WW#Zz_C^AsA8;`pP<0Zh$V9P@e6#X4^Daqig;S z;AF?KTKQvOH;W&k(_*cz4%5l*X!Otgakl6uV=pRMJ&i_WfZR;p`S<59h; z-QT!Zua;{owQ6PhEqo50PQ1I-R%JTV^FpmWP&dk;aZG-OX1M9ZdiWZ;BFt>5 zwT;@wsz(3pS?emgG)PFj-`HGN8?`d5dKt|Q5?NO_?yGClS^3Ws=s4vscnTe-9EepY zhtH#_mg%{c{#0X6vyj5v^09xbS$rBzwglIJVaqa~!!uT;pQ*Ao_P(O+YKz=)GXcZ1TaYB^jsV%J+wEJb!uWw zSU8-XQ|P4S7>`LSe;Mpe%m(PpKxw>yt`J+_wusi_Pz&f3WB#o5CU{yDbkz%7%Ku19 zgCXYvjV5sr28<*xpJhmoChb|ldvPbW0QT_*x(Can9X_l3v_Cguu#KDUoD4y0dVtQ0)+0nK=}`qDTD&0 z2%`nSp-@1R0W+pi5+jf_8zL#>DN01sai3R|Jmlm%Xc~sTX}>mfp!{JPv5rpnb6GyPCW{}2 zH5z=9P-0)ixe&*trmU0o{A97e)bZiyx0#pfuQEsN^8uIpR)>o zvdN5q)pyxy!gP3y%Aa5jd?Up;%>g$DhhTQY!FE2milz>&atWQUt=BiV8ro*PQQO?; zp};_2?^dgIV7gOiVntnBTUN_=r?bl^`NkseAl$za-a=`9Y4a zBFrDt^`PWz%f>gv21o7YmaoB{n6~rCzlQNx-KTp$x5RhYSDhX`DB<+tyC`qkh8463 zkPEmE^Y|YbG$jZEBUw1@1ez2MBU}t4 z9Kt|WAoDQ`5!?6*E6(Tg?N@MLZ~{Uj_)i9%8$#i5+Ri*g@3rFEN>-cYTncL)Gk={}V|X0eU8518z-m==x(6>p2FLB*nD1(j42 z8}BGVjn__u(F_P`cK^A0e(3eVH|nDu-*>%Iq44C%6VWu$Rhb_6JNy&tb+|C};ncjl zkR~24wfuDkU4-E-KLnU8TIQJXn00y~^L0N=%?siY4ID!&2$N;`T{4>K5ORKA|k| V&!vg4t3$u6GD-dg^Z*?o^nd8Lgj@gs literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php new file mode 100644 index 0000000000000000000000000000000000000000..334d4e678cc85bf9c75a33d39fbf15044cf6a109 GIT binary patch literal 2676 zcmbtW%Wm676pf^~wy$D9Cfb4(YG52Eje@omYV`#=PNPTcxM*Uv36!EBK#a(dOqk{n zoS`DO@OO0I?z-(d=&y9$59lJR&I~Dvl_ftAEhLJZd+wcc&$*lj--JgYY@vM;kO*_) zqW&r3M+Ait<c@itiI782LeD3Wfl%iVJv)4X9(N92Y>H4u8rXku8$h^LF^Aa-#;M%HxxENfKLbuu|v>)xAl~8>|&0seFbB+C5+X{ zV667o>NR!%93L}=_NH*~3n1|cXra!*_Abiwr1#Admi!K7CFKrk4C0B z-PIIiQRojO?dFxE=J&~Jx+5%@be|K>yMxGMJ@Q_>`FYDKH!L7sR z2dXB2`p`>T+H~ElgL^{twTyGwfqU@p8q}{TcWomHFqA)xsXq*7Y>XP!4^liFdi5yn zLSmHa7Z<0(Db+ShxlY4Azc@@JQH0vUgp$!T>cccjc~r=}&J=CQ)7yUmlylb89>Gc) z&h!E*)ymt3kpL{%r!mtdehv3%^W`op5TQUVhGh=CaX0B zdSVSb#F6y5J=qb{R|L|ER)!MCL%k$nHOqqc1VM7K7(2qbHddx*`b|~$?j?2Sc5Mhz zcPB7Sg`)Lf-JyXi1`ZV?!FDhsOkYySJJ&#NPchmOLi-lh&-GVd7CS0$*Dt}HwV-wz zswBXDpV-4>+Iu5ni?QhUv2(27Qk-=G(uXu+`kLCngG&7cy*{v_)}iAGO8t^Qtu$~l@2VJV?J5#ggr?0mBs`HE+;3`u)8! zJ-MO1gbH?N6e=xO-hLZ}KDp7-pd$HTHjO63r21ct zt;LSdaI|BnctIHFT+CATzrP0i8Qw&r#(@OQEX^JVJUZ1jph9E*zii1YX_Z9H)i2@Q zxnW}J9Fx;jDr}AH|J*b*3`ZtJRpEsf_m6=r#T+ZYIx7Q!Oyf=?Zb{N7L*z`tK+g bHtuCF!cUT;O73K{@KmE#CTEW`I0N_(*wTIO literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Gcs.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Gcs.php new file mode 100644 index 000000000000..5e15d8ff5f42 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Gcs.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +¢ +\'google/cloud/dialogflow/cx/v3/gcs.protogoogle.cloud.dialogflow.cx.v3"" +GcsDestination +uri ( BàAB« +!com.google.cloud.dialogflow.cx.v3BGcsProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php new file mode 100644 index 000000000000..26db1a820696 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php @@ -0,0 +1,55 @@ +internalAddGeneratedFile( + ' +Õ + +7google/cloud/dialogflow/cx/v3/generative_settings.protogoogle.cloud.dialogflow.cx.v33google/cloud/dialogflow/cx/v3/safety_settings.proto"È +GenerativeSettings +name ( ] +fallback_settings ( 2B.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsQ +generative_safety_settings ( 2-.google.cloud.dialogflow.cx.v3.SafetySettingsr +knowledge_connector_settings ( 2L.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + language_code ( K +llm_model_settings ( 2/.google.cloud.dialogflow.cx.v3.LlmModelSettingså +FallbackSettings +selected_prompt ( k +prompt_templates ( 2Q.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplateK +PromptTemplate + display_name (  + prompt_text (  +frozen (­ +KnowledgeConnectorSettings +business (  +agent (  +agent_identity (  +business_description (  + agent_scope ( # +disable_data_store_fallback (:êA~ +1dialogflow.googleapis.com/AgentGenerativeSettingsIprojects/{project}/locations/{location}/agents/{agent}/generativeSettings"6 +LlmModelSettings +model (  + prompt_text ( Bº +!com.google.cloud.dialogflow.cx.v3BGenerativeSettingsProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Generator.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Generator.php new file mode 100644 index 0000000000000000000000000000000000000000..694ef91bbf394b2a911187132db32ddf8a0e45b2 GIT binary patch literal 4119 zcmbtXPj4GV6vs{z#gp{kR!v=36FVz%8d9dZ8bI6K`gB#~UZXG0h=f&Aj*K_kQo+%-wrI zD?nG(HSFWiX1K1_o~f*b)gUB{IK)$HokjzPszcg=>)}vS)$*qLX!D7Bzx?3I6;P$5 z6FS&Xn}jqytUDg*)b+Y+d!*U$$d2xG_3cHy867}EO;|?Ax7(Nowu9BRN@)W#yKXbP zx+aWNSGbXCSsJOXbgNGnmk@G1o6-a=3DGW6;Vo_^E_*E?z`(Maz^ZUkfRO3~pW)EAy=oa#Cv*cw z!U~8QMiVnhC107n86V5dxeawT!e|%=KrX8+?BMk2sv2U}3H>F3n;YoKuj(PBnSon1 zeV=d^h))fp?^EBzQHm>`i+whl&Z>*OdI`7eZI^_jsXoSW+8i6?;VDs#*><<_r#vxpBUj^}0-tRVb%f8BiYH8|c?Ox;0WA zDVHO0O_ZJ1FFVcYYTJv23$ZmjaG^4Jh@<)|yqnr+@HkqvIFPZx#gsr8M=RdC9dG@2 zsY6IC8pkA7yc8>n765gmW6pZKnKTf&8Nq4;w~<8g+gJ@$tai6nYP`v>evDN7G*e~d2VKWJ;S#ZG|ot11tLJ%^=xWwD}O@Bjlo*! z6q<%W$`eZG&{=EHZfO!tSi+k8+A?7IV+N@_(KMrf9TR= zY><#X#@}=>Wy%tofRMrg5%s0_AesL$uPeuL;XFF&*?zMF$SlscU^)i?asgkWFc}5W zJhH>k(*)y37HzvAJw_Wj_$GTL+BXa#U>JP~So+*Bo-WoVL=+Zp$S1{o^rB2XK#zQU3d!h^*h4*p{skN@ BZjt~1 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..2561bbed81cec73d459fa951a4d7e50a3ead95f4 GIT binary patch literal 1045 zcmbVL-Hww$6t-RUVlE7+8h)RbijCMpaV3qsPwAwlLoZF? zpr9PD7{M0+#S>@KkYbo}kBiSfOhUePMyg#Bh&LH9>iM-I!Ns1F1bC#F_s;U9u>#pV}jl)&hoR0diQEF7x zD<)&eVcG83wmLTIe{kQA#wOARy#dmtYqdw<;Wj|C zkU+X4bR<=3yWrk-+(PENj)tUa?LN4(9ej(BDecrAfVheD?+r54HriB;G%EuRFZ_absycw{qP4HqWmH{u~X)AwytycBkx9VQM zFuYtCUfvj9))w+a`Bkl#aaAn}~t+fP8 G0Dc2MK2Ajd literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Inline.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Inline.php new file mode 100644 index 000000000000..a8caca75d60b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Inline.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' +Ð +*google/cloud/dialogflow/cx/v3/inline.protogoogle.cloud.dialogflow.cx.v3") +InlineDestination +content ( BàA" + InlineSource +content ( B® +!com.google.cloud.dialogflow.cx.v3B InlineProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Intent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Intent.php new file mode 100644 index 0000000000000000000000000000000000000000..88c10807b9ae6772dae96c11581119ea04bdf809 GIT binary patch literal 5936 zcmb_g%X8bt88@ki#ie93D=CthdI}?UBC9gkNEuHG*G@qaRG3I2N2V3G!x77J@wRSPMuDt*B)}nJ?*KzX>#bHr~C;y<=b5V1ZiqWIrhPlu;26d zJ$HZnp?lz>x1~*D6VITeCGDR{^nggN=TN8VSkivC-6o#YbdFrpBAy~i#fr33sY!aV zT)P9TzSH%ZM3p*@)3HddX*u0iu4NjQ(`j4INv?UCJKo5dHYGMyxLAa25uvn!f^H9!qV*@(HlMOxy0-O=>!}#26}eldRmAgiJ2KMj)~;EB6DnOq|)4R)meJ`jU~4CF*raT)QNBgmyjq5x1KO zIFEj-4?#?G&AMjW4nx7QeO2xG)Dv+TW5F^ZGFRg%nZ#=4$$@cfI^NY-cS(>iV;ea< zA0QHzX_N7lZ#j0y>)N(ycj^_FW&72zic$aqpdY#PY<$%bE5~iy@DGRc@~nICgw+bm zF|E~#QmO>Sw-O}*ONn>U-`_#2<5wNNEoc>9p-QhpmFB5(ypdfBL>aCLMa*(SRBQJ8 zv4b`Xd}BX|d_Zt3M&JeE4UR_I$6^@Jz8#3MdV$J0QJ?~%w*n&GNT48dgoPqF40}*? zD9k+qzy*c;muWOD8VH_6ldKIbC#1wm3g1GrEz@@`qMkfKVG-N)Y+Ms7H z5j^=dNP};*chKEf(TK=HvG@wi#vEV;Of}#Enb#o@mgx%{XYdU)?U9zzq!4TfO7;Ot z#{o{Gi9>Q0Ibt~$u)P00FRkS6tWFM{9BbC%N-Z7%mB z{PjF%bihNP;y=%W$qaw9wqw(C`QHhIx4?QK*WV?->=K{i570Eg2^0awD;yLVkG5

4HLtT`TYnKY@hhDjUZpIpJA+WBvYES+WNV5b~7EMEWr6MK)l}N((+w=aASO z?UdX`^L^g@8}@s8JayJ9#n|qvh|0T$c^<6 zM+q6?qq5E9RJa)V*C-wP6MqjaZ|l38dZSXUl`A`qXFE@;dZAn@>&479)(&^|kM%+= zlgK7#5;%>n@9Nbpt)OR;IEAJ-Yi0s!8R&MjZ9OvyL+B>ZRCa5PLS?74RR-oMJcA}b z(e-L(I-iP)S^j+zEe^zFc*Upk_rB5OF^cg3Edu6kxMxtd0)!h5n`f=69T_wj6;DP0Kg>C$ z2x3ZH3YRUH5bAxxZ=t24R?`}#%I>yS8^~KoxBONmpGmO9`}k>P2h#OAnkYQo%S`0w z_?83-!so60y98Ps&>v*sVm}&u`vf39dAYzvdi`*Om!iPoHX7>w=vurSApCuHgyCO( zj*w`Ae3pXa<(-YDhD{EVT!vf004@%Frwlc}}ub`lXXdi!` zfL*7zOW;xaXN)!&ZrSw_0Q9j4kY)Ws3zn7N{`dcXOg_Z#vp0wrVt;uYElR7g1!*%s!#b~DEQ9F7>8CpKxMj;n2G=3B5GnHLJMj0BdZmZ|`iv*gDuLgJ&Y;oc% z8eF^3<^+^$qIkLGPvlnuSq&Bt{4ekzzBi2YAWnQm4}N~3VPX1OY=Piz=S*y}r&j(!DV2{E|F?tkM3a856#@ER^;#^fZfvWZ>;L~$e-P_oo=GC+DZuEM# WCLUa4@3WV_&2mcdhI)?95&9PNfvboB literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Page.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Page.php new file mode 100644 index 0000000000000000000000000000000000000000..79d044246d23328e5bc6303f72d6e8d7a1b7f313 GIT binary patch literal 5916 zcmdT|O>o>)5@sg0WB1re{8CFM1MDgjLyXsvzy_*N2$aTu34fVNyau*rYmlWkV-Z;r z(i{JfnhPiHaN@Rb*`m1Yd9QGxiUV-Vi32AtTq&RE_w=NZ$DYVzPV0kbM(Xa@-S6wK z`@L6Q3$_Bds;p6uh9;x7vbnFYEvf{e&wR^wmCa78MMK5%w*$wep{gj$ca*p9tSc+a zx7V+rYUFo9i|R_-_uDSjEZ6VYn(dgb-)_17u4e6NJBwOiwy7$N0(j;&jRMo6%38hl z7GXVKYbmDnbioe6x5`=*k3ROhL{G&F8|jE0`+ zHkN5*g-*cyu#Td--li-~Ab&FZtX!6xb6U!5?4zz9aq_0Z!Vb-@t|%d8ozS}>{N@I_ z>9@u)`7#2hVR)X;v*3G?uJ>Z{+L%l#f6KgRabz|(B{ZeL<%~cm@h4xsC|`*+k5ZN? zLDq~U%B0%Mk5=Pk){HoonpO%Xsj59%wbet6RCq!v2;$u`yMrWYaW z`(88jJB&8l_z^_ql5z%}UOX_KgDje2cMwI9iXBZ`PqpuI4ymsbC?wL&aXxYf6WweU)lxe>ImBpkZL3Cf&A9h zT;Gb@nD!v~+SL%D9+wiIU5yVF_=|sZ#aO`&;Ja@1w-Fdw<+v~a0y9KJW513N)qLx& z=fuPn)q0{;`Emp%(qBhPLKI3|5*J`Rq#t&iklJNlDdV_$2_1IWev|D7w0s61PSobH zd=89fU}kVuR)o?z>X7qr7RMRaiI^ydak2qZyqBcpChJQdDkv3M+D$rl?EQ6^vT4ig zxU9Kjx*du*=XLvdVmF}{b%Vbp=U@!uG%bep#X~(7nv=rBu+Xghw*Zq_2gyCC$bqhj zZXoX+A{d_5p$H}p_)WMJQfaQQG)IRn&FVKrm^@Ug(~?QY&^y7IX9$5&v5?qF$)js< zk%dmXO~XSmjSd?V(V@i55a-V(F989-iQ3fzL&+<@TaRUQc`Zqt=IO4YDC*YWe6lX~ ziA~?XFAzCVYg{`pW}rG4<#j24>#^E6jKxN(KNaD8KX)FJ%JSj%GoB>5Kwg9~K9+ba z?qRj34~!}(gT3IRyvN8iOkj_;MgNGCM+R)o&~VG7S8NS$Yp2~Bj*EQVcxy6Q{iFaF z-b4=JbQ|48lA;kKFTogcV=q(B2x3x59$o(hrd-o&chDBjHMYbW&ma%48R4NzKxh;J zkL-(&n17#oG3u-D!*s@zD8Q2nB?~ah1rvtOYxz73atY3RbT5XxTtUny)qlacH7Y_) zB7Gq{)zoC1d38aKkF)xD0j8HiibrJbMzX|dllc;i@W=(^N((0mJZ7&W&WYwy{S=-1 zM}UK8pL6jdyjlIJMMQ#$2BnTzqsa$MvDc-A%8^Eq9zLq?!t^qAu?J@}cDhZOf>E3e ztvF%h)gOvb89amV?nym!6NenZ2IK$tHBH`u$B#W$MCCEjv=)+WIR5yg9&^0qfGYIJ zV&SuK808xkk^dE7A}v;u*T+*ySre7#a(u}s#5_=aEoY%`Ly^7(fN%L4t1QS zZpz^>(&jSb;aoBm&dGUjPR@elKLt1|iGbwIe1{36a*{f%-hOC^!_pyF`8nyNj>?&J zuFDe*Jx(EciR+0bsXmdz8xM_AoXUC5Il}K+^-rW&7qmjYMelp0lk0s?bSUrNe`s9b zZqH}9M})Ap@R~#kUM!v}|1yq$V;nu6%8jEZn#6H*SQZyIeMp&$Gkz*hD|_D=mj@0r zKN|0CF&0F+rtR+T%IZsxxMqiK#h0?z@kr135qmyQyth>C>jGTClk%f$x`s!kHm&n} z(t6>a&&MQ`oc!^a-S+!#SI|4GaBDBvyutr{Q7kU6epP&GO8Q+<9p$qT_?-;gn literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..9fe147cdc56cd8e040a6efb40aba19dafb7548bc GIT binary patch literal 1634 zcmbVMZBN=z6c$9(gSxI}2{YMpbtd9oN`_hDaBgd9RTczN$`Y3*q_h{fNokw5INf6Q z2lpeEY(Hf8wor^ZUE~9_hjX6uoVVxQ2XElPGjxa@>>DArQ1={#1B^W14PDc9;sgob_?;pr8Ir^^YRUOCf0@9Y7X zwh;uVIl+|^SojWze!NlFCMF6(Bcwl@BvUn9AXLVtuWXGh4#;mCLPBHj$(B6-qpXrJg2{eWQGlJLMdC9YpCPpg`OL`A)N zPsSyPmX$C*pkps2IatOm_&pE1_nkNYB#soKO%bM>BA92w>CVQ_G_2k*RsJDl*rMc9 zC{nJc}xqrhqu6PI{2!?%Hp`_u6;RR>IOBpO1l^!5&*DHS0` zQzrmNGiyb7aK*?k(Gk;=iKou5KsL@BWm}XMChr?RVCgbP{>^wbSa~ZYed`WdGF6;t zCc7|4LOcw{<^2EPpSNKlL3s?1WKk3EJ=8^*6IE3_;j)qs>r{Jhr!VD`#hS`sq)W}z zm)G%~O>V;-7W?iMeKtHoCE7gmx_j)an~j8dXDhk-m$43AlC6JAR^%BA%LQBj`~@z} B`=0;+ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Playbook.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Playbook.php new file mode 100644 index 0000000000000000000000000000000000000000..6b5e57f83e023706d8ffb47996a2af3e936cca42 GIT binary patch literal 10042 zcmb_i&2!tv6%Qr(LrZ;mYsoZiB?#iivLchUlr}CM#RWx4RxC@bC41_a4GMuv3N-{E z1Sre(Xr_}x(?h2-o%{#sGtmS1NN}=sA+$kJH>S z4PA0Q&4Yig7_Mqqh6lvPk3gSAsiv7O0piZJwWg(ehHXidVAImc%r(j9N!MO+Y|wvE z5>l0^Nx&SHHOnInOEW7a;_3~<@$5z!mKF+i;su7JPiC(1Z7DmWCe8RV7786gE=pdb zNy58JQiFKShINa{O&J^pzbaj9rZ`4Lu`HWf!M5B&p`}xcMK8i7(;$|YjAq3kX0=Fm zwSB{GBqO~~c+m7MWcP@uEZJ33G;RG!|NHmgw0xlLIVL$VpOvOrGfZ;v5@K}8ltU7R3_AiO!6~ye%)|A!O#^PPon2JH0)?~2s3C^n4+gJ zMu?g#^3{um{CYo&9+I67D6R`2Hu#*ca4JI)ZzJSIpa^R_aNua3E z^Z1tgDa6PF2O7K%Z-o6!qa>-HaUP|cjI&BZn#W33go=pTTmbX(zY#hsT!=@)!GJHK zk*eWRd#Wr%m@!y5;d5xHZfmCR4*yZ5f-V`B)1>y}MKF}WZsrv8#=H=vJJ{yB6i~`O zg};w3+fA=G`_m_5e+Q)v%g=Nux|ws#_6u>siXMKgMT#>h%|cbx?Iz^QBCRT#u? zqqNSDL8YLP8D@KQ`X;D`0TuTsqeA^r-9hIY1kNc0n)s^P%84|Xi9ydGKuOpNn_R@slQGQ!ZMs(Zl3460majIqkcuv$0w?om3?mHHeP z(b-+is=^u3%}ju}>G?Nf_}uZA3xP(3+f?tFLo#0jS;pqyj^QD4Il%vIpk*AhJ7{Rj zBMu%zLmuFq5BYaq!MD&U7oNL-7F5c)es`eEildRl$$p5^;bZ{tt~U)Z4fu`%GN9>+ zwv$U}L}*AA!_(+ud0lx_+}ymYZa*q7s}DA|%F9b@D{IT8iC6GhG_~Zk3t#J6T%T^`oM^}l z$iEy!$-g3m5YzGSuFSp$>&V7GZTeT-A#_ zs1j%>{{T(HgaW2ILBH~{cX*6m?X?5%?7n^c4p{z03SA2Ki^7n?KrbQhraBr|AH^?p zcCYM({4sz*cbT}tYv`PCv&dx8(k4vh-i@t_E=NxVFWav_89@1LzoKi&p*S4kxwAynsNq$9CprvajG5V^?*?h>FMkhBwI?pOUwcxpEqf#dH47v~B!2%ih|cg% z9IvBMvJcs#@=l($u<7}@gCQr+EmKT-=+yVfT2D?U{v862%0oDL}7`GODG*02l6nPjS(g^(`VeXKTn~F zcFFK%G~Ut{#=CVfWa<U zoY${x-}5*5gBQxUKlqyy(f;vY|MlrWQT`Ua2z>6pTMW9$+0Y4NRvav5LuZOYfVKE@ zP$yc!W7UZ+7wSw2mxCDWQZL7D5ai_-3Y!lyiEqyO64Pl=oV=kU(Ci`pLkf+CyB!zD zrBGzGkTT9yZA3mG$g3|DK6&-Ez{j*Zh67wW)Mn!w!e~8)S)sK;gZ{%NYI!bma?Ae% zA|wiwu@MqoE+n58%7%vTx!{^ge*T5>joy&#&$ay#IoufMpnHIsI!}W|mIjGcD-hOL z7E-gADjBV&u}VglCsMMVRMee5luVxM2D?I`O8yO$j82VXm5eSIO7$o=IM-hBW#9fahi^6mC0FzC4Qj(i5lnZTGEe>By z=LfQq0J9?)7#!^j!GT_|#(z#lZWx5>H)B)};mZm2E{9=$3HwSW^=F`A9uWV(DKypn zNRQu*QL8(dh~C9xQuAW)IIQW0yml$UQVBhKwII>hoIQDLW)HqlF7_O${zZAT z>v@h_$mgFveaih7+{kK8Z`c2%>pB3VM+Xgaam!m<6@QjOufxUe(a}&G75!?NHe=<~ z2RD4|;{}G^4A$8D@(#o#}rdQbqWVt2wX+tUafGoFkkbAhW hbDDK~3s-|LDCYdnu0mgF_54DMt@OX7Iz)#E{T~<2fJXoT literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php new file mode 100644 index 0000000000000000000000000000000000000000..3043afcba424ee272ea898206b94a12bdd21b15f GIT binary patch literal 2959 zcmbW3TXWi05XTLqF|2P`b`whL89B|2aiwsXD{qC8$K5giA5Zh5nb$G zitLPtwnG`!s44cn!GJiTMn|?`5=RonT2pK^yJEd|+}*~bF7+IZ$l{RFp-GCGNj<%& z8>&f%1Cw49wQ=#hRCI`IQ_CgFh`6pgBoa3OV5zuZs~QmxTa^>SR9$6i?~t>4RiD+X z#jIX++&eAp0cfV`x?($Io&-qv1w{O_y}oH^qRUi<{~jBzVps-4hVe6ow=WJ<(*I`pSO|QSbXH3S)N2Sfy_EOTlHQSBdDq-#`Rx8u|ge;Mq{%Na#^1|H$oB1x*ltGfC*QKqx56m zfnV3*>;IE!!d7rf;`u2}@>9~r(s?QW)zb~C@Ceh~!1Fl` zG&!g2W5QtHf?yiwM8R%hG389PbUGO1fYV>hNq>c)vd=jRFzEYRSR%>k=d<#nH1 z;_Ur7*>y|jEg*nYQh%3Ih;IPcrg|9&lUwHGZ{{So5Wp2d-fLJI8DpY{z!eVsc23}l zPvFGJ%^^Hw#3c3^wJsIrsFsV}o@aVa;3jHwn&?KfZV2;x2KukS#yg8%m_#2E6n#L^ zh@0F9V4iU95nC@GI5pW9&l`L=MHYv)9`p3R^mH~UD_mf4-uhiyG#wMav1zk6*B&-ND2k`6osM}ik~%oReKj?rsLUu z_40C0^Ou(2hwOAZ3%igWg_md8VLsFu@-JayMlsJrAh0%7t-@*?5Qd3r;ieaYKY>hK62b$>1Wm_t3?B2`LjIKim{f$&fwW78BWw~b z@>1BP%X7Z`2~6q)r2J2?7=FcU_=r2qon1yzRv_j3?sxL}G|FIJQS4h5%kRO*Gb;|| zS@w&XD3&+s6DLsUXrTg-#duED}a9ibMM4F literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php new file mode 100644 index 0000000000000000000000000000000000000000..f18a27eda7a7c0667da0a9af4c60949a99b97317 GIT binary patch literal 2220 zcmbtV-EQMV6ed4Z-P1OtURZ^qYNy?z%}U^i1_|L(kmEQ%+9Zx*x7)5FjV8_{v2bn6 zo^(@C?|BTwB@cjj2qa!%uXzf_c7B?)yHdNkNaFFC?>pZ&=gj%xCvW7zGgPGx^$DYW z)Vo4#M3Lva%r#vb^~Qq%^^xgbc$Q6l5uvh%TAG2>a^2YDTLX9On^ZzW*B#olVA}4u zU+7!Jc83GoeN!+eh09_gAOp&-a6lQeoM9kF_y7*Mpn*qBimL5WlQPmLjC89JR96Y1 zy5%`kSDAEAi$?&aO@aXF5u`pvgkJ&ik2mhwmWcvJ82>r20&F=J;}F&_T--4l5Idk8 z;&$v{?3m1Q9TaZR9Fyi>pcpfZJ@8y^#xa`Z)(-vQ-gN5@qrOAzZkYzAZ+Xo1+dNc~ zhLp`+4Oj9nrnDiPH9+||M@hPsgyk^sRX&-pJ!a*hn=5ugpAMO?@cH^;FN{kc#{~FhPWsV(VU2v z#r@v_GRtQvFgWPb0U6s2_lV=rKK4dF2`IiG%pBo>g|#}o%B4{vpE;Dp_Y#Q9;9@(1 zYKBPq6sVMXD<^~oWR}>1Tmq%?8;9RM1Ya;<(&D^t_rvNCYgXWKju<|j zIkSYG`cU*W?!a65W8r7W@!q`f7|+}s`__%7&8ipd+Z&*wGDYOQzyTxwcm7R4W_ewB4eK-RDE-Xg2XMxH6*px=sbSsdgsN6G zZNpYu?ih8s5yx>o+}T%Jr#yX5mi|h>9-qMPKlak&*v(msaYf8+CtiOO-@CIr(!D4Q z-IW1NJd4k0bK>=m!mmG)$#Uh-_eCbS* hPK&)Y?izE8&*zimt9Z8E7=`Z~gHdEWtghi2;D6sm(N_Qf literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php new file mode 100644 index 0000000000000000000000000000000000000000..2de2fda08bffcc077d2fc5f3f7fbe9f00968d9ab GIT binary patch literal 5496 zcmb_g&2!sC6vs|mnoVfkElu6Dp{gmme-D`A_-~T zB+d8$T$tg=f53qQHwOL&hT#Y^Fw+YhI>Ssa9Juww?&`yeEt5EqL!wCU{r0`z``EYp z##`2w1)k>$$UwG&QIl)zad-=HmTh8FHFd7hX|<5espht&>B#0eE?45#N;OW(6>Has zs$+I+6$xD1G}}5#tGd}~rkk3go9&iv?xfY-^!>%OgVc_#;XT+du-!r7)j7^a zxMLf)nB5eh8$8t`xDzd{E*geOSuhPp5PClKAciSsbqyJKG@ZPL^kxQaDfczg9!<4^ zyevAhkpcI_b7|Ycdq-a|P-Ol-YCJ0)zE?WDy35~RoWAIxDwam7i^j#Ro$0Hg4=qZ*-0;}<1TKXHY>#5^(`D}y zt3r~)X+%l%KKivBe00&b301B{>O(MHK)ApDD(K@5axi=woSV*H6X z59UIixvLY89G-NRbU#q)>lm0>w@52M{h$0bO5mK+-&5Fv6ANkHg&#sF-w&A?BNoD! z!9<6xC{sU^abo+#!n6 zq<=BHPC^I(dxgz=$ViS+o>QO2z?EoI9E&sn1aC)EHb(p$l`?n{oHfucmP1xh#>P|M zlgMRl^e>V7KPZWez8kVpU2)^6fSDZ9(eQlx?>YVFBuMn99-Iu93cLg+o0?*ZtlN7m@@E!AKTD%K$UwsL6(6bU0l`ghHUzJl7D}EV@jSEe z=JBy93KT&?GaL)4SjMEs=)~^iIL(wy{l*jVI!HBj%UdF72Srz*=E=hXINwBClT?w` z+UvobV=!}1#QF{JLIg}M&x8go|8O9uud*N1!YRJFA&iD zG^64eGG4`6f%^Cj$~ITNOM*^ry&B9?uV9XZ!6eK z`_ia>L>SAncXU0%LL_6t9b1s)-09RZmV0ZDN^S1if-Qe{=F$?I#?vXm|6 zi&8G}6dVU9SJzj>%|r}74aQc>i-|aWC>08cvFX>qR5Y6*4*J5!cBRv)GB`Kb5>nu~ zij)(xwPI;auGT7IO)A{!v*#i>@5;!V#oDr5l`0#>tdxkQZi6#DMAitdg3BSeY^f{_ z#mW_{?~oNs6|o>C;;9X4U0)?ZW?fBM`#0-mz@>_`TH26gF<+A^a<;U#Ayuj()gd-6 zgJ%ww5HYd5UMWa&POOP??aqLSQvl|Q;!3HIUnyl@wZhj=y^{kbmuA`YgaN8>}o7p-<| zcRq)nYeWB0V(B(Q3YPQ@(S-k%pb0QwNiC?pVn=z5A1RY3MQUXYtM!#+Dpsmo*BW=r*!a^dwX<~PKk6koD@~HPR%qt$$* zdfn`1*iFeALr9Q6AXp%mMRH1l>|wJAf*f+oDM$``O0pXuKrVa8X>tsZgAYOKeRT6f zBwMtNJ?tDjBKuXndiAP)_0|0Ri{?QSZX`CTMO&IntBL*NgnK{}&6e%jx@{)*+qD{P zC3L&dG)&q`CKB15L}90r$Yt}D>qzR@?UqhciMnmqO}eU^cDuS-H8j(%*G&6pRe!O1 zcyHCAj$_zXlJfmzyy-@&DQzpt5w+*h^cM&9q=!PAb(oQ-{Sc z!gbT2mOCEJhC$70h8}2#hTR&Ev_z%JoLR`h2CW&Q>R}AqRl{Dl zt(s9k`;mt5%A!G+(KaaZvnV&TH|Dv4{`AI7q>UPf^sVWQxx_dIG(=@Ztxn(gcxYWs z^Z>ezDDgJxEMJQW-uj@gLfug!EQBf{f>RQl}&?g_= zmyh_Kr(>oj@lACkz)7;Z0b~rtRGq_^r1)$!1q;5a!@!D>NwkurE2BwSh?grr9lf$H zQVhhM{`1@!O~`KCS9gFoO>}uF&L^X};#F{*P%#lo{% zF3Fhat0wn1@kIGm80OQKb3|JklvejO{W;0Q6ayTq9uFl#EAwlgBn9;lFG=>2Crg|* zGx6(mh&+Zl!AfmW&9SX`7&%7QQm@0Y#5oAQ%P^<6(RLfElyn05M)TaQ2%&q4)^0{p69Wn=z z%A?)wOj+G6#zN#gMCHfq&XYncto&~X-YvKH8;0Afof7^1Hg#N*f@x`0T*;Bl?O&(E zuhKW*dKU-@wIldANzBAoWl$n;vI} zAVAwkh|^eBm-gBErf&! zOm5^0_-9!8=Lxui*%Z|p2&%mjp+zDZeAdL4w!_!Z^en)C{Vz?IH>?6PNm1hlJClR6poeFbe1R(mCj36Nr%`*r(x|WKuJ* zJHqa$kHvHl3shMD4Lke}C&`C!6S-^8X-hS#C?+_Ss@pQ^b=soUIB=7|1ya~kDv9z14`I3LHfpC7!mi4R&jy|30mM0ZuPOxb zTo5t4j=qcXFTy+LJW4t8IzE8~%U0zf*~W;=@$*4c--kss$fk`cH*+G7ZZU}NBFyo| z8;gc6ec{HLi_Ks_xhiTU^*}RgDn@6A_E`Hu5aS=h-mTLtFw+$X+QWh{(b_MhaZi61GBP#;>D1x6LJCj4`-N^ zeH$K-34n`0CEBbayCpH0K~v+7#W8P&;3{71RuKy*PdUP50U}uS>>DOlX*@p&lTE}w zfpSN7t11G7fTW<5xXj6(AQi`TbS=q-W-@!%mY+P=|XwElrL5=v3M6Q=L%VMXG1MxU9yEqNTrg)1?xFXHU4KB z&i5z2s21ka>bJH zvS!KojWn_X(@pKzw6&_tnlF31`e6?Z1v^jV0|1`z^YooZt?1g&#h2l{zgTs28#BaN zyqyR}-C4ceYBBd?eFAP5k<5)(=>%LGUTd+gBtf24!{JHD5#2wq?dKvdBsbxThT-n` zTdInZg25j)IPjDW{70rB-@tiErXEnOiunRwKMSZC@5DnurSAfhPsHYr1QXO{>zF)* zIo5?ySsKEc|M7Wb9mxbGj*rE1l7*PB6;nIjXJ=!8AIaRoy8Tu9CMYA6BPmD`h-o&| z23of1_jlqKxmTRIOmb0CIL4G|NJ#wZ9K`ycAohT0{;{EHx4=g*ueq4o?zhpj zcqPohdw%Wfw<%aM?QOwAve3#O0AXoNt7(fGS!~YQDD!K-_f|J&og;snjsS-+?_CH_ zRvo+&X4lW&>gMu#iYy%#_p=GJ-CvR`*k$w7qY78#trVfAC72b)qc!X{#sYRb!mgBU znCsCixdzMWN~M&~>{bSbe(W+9cDHk-{5o$b;KvQ@KRha6vVgIE9TrY$iYRa`U%-5z zxU+?Q%bmiYJ_W$kR=$u+mtrC1#~}c2eB5J64x$~n62KA3+~pzR4y<4_)NPD7$JD}l zn@YX=4a%%H{Ui_I9QPRk87pVKAg)2hfM^$pye*LyVM?Hxz)i8$PbUC)wB;>6@&h=> z3mK6P1&Lk3pwHffyD4sM%)83xX@E|@YE5% zy$o|6TcKoDf=BRyr@71g%;RY8R7t>$Ez+0l3L_eptKfuY!7J6gNtOqOL0xgwU-zUO zdn_?8Nfi?#>~x4`1@XKVr%6dM*d-r#R?8&bYZ48WwLkx6oz>{t4UhSd6qx7VU8F46 zjlXv$Que+CX8oQ&iW=?xfc=CWWWw_49Rk4T^5-%M|6f5yd+bu;e^fuXzUCKVE5y6SlNWAxO5I_=+K_Qh&3yG9(M-p zP&9xJAY)-Q#cf3lPorx=Wf0$;)8m0;`4GnOq6`QO9A=ew0Xn$N9ttqxk}4lV#7Abt z#i^=MH(b$kjVH*r)tt0w#qu-tRefbnR?@(h-48Vfw*KM9-msa0%wo zc5U;JvVIJLI}e!=f(5a7V!2a+by*f*E}Jjq)+?&~DvZP81sw0Bw{w_YsT=t%%%L`86J!=<3Og!i8apRH zVgUpL~jh|2=|sff=l z93R|==>`LE6jYQQXM_8$7{=RAV*YuS@YjK|{|>>0jkbyDtJ!N6J8*%^By%2&35b1; z%ge>++Q$Jwp-0P{5W6ihq6r^9+YyIMdPNQs)F3=H6IXs2f{T5pl_u~TnqM=)ht97> zt9|@aJ%G!@f-vGamQ^iLsJZDYTf-9z}!KZGDYXc)j|{+K!L-O3^+`B0_$ zGwR3r+>^c;^-V~OTD-Bl#fI1K!}U?CGU;-DJr-uE(v4B;vbl})?p7r>vG!^XW@Ine zAwLbnZ1-`#S4`sIK9N%*fqN{+ps{!+FUA7bnINBGK$vwCOM z>xr|!u?cMPFXcM??j$9WLg9$1(4DWJDV4E!QR~oX*%oUQvpq(zCjTDBw}@y9D{g;w z(yfZ$oZfyR^!AUTG0)n4IBdoaI|x(bfug@HHICltZixH@A!e{fgZhsHsXUYXJiv^H z5DRou-dPEuXn!8Y*$|5}!obM*Aif;rO8o> zs}X+D%bB^wTu+1`L156c+Pkix_Zs_%1PM7+jLT^t4Bvi(vSVdrq*^3#BZEFYGU)dX15w21}*PwmHC%*a2;RZ z9E}bcoZ#?ZOBLB~j*6kLKNhVK@7-H`0km%Sy)KRdVieO~H1{8{fBqsI&TjlHe07um zqAJPf{mHEVi>l=Mi{#^b--WM>=cyE5kVap*aU7rT+@?H9$LSuBXzc{N*tg*p=_T#L+>@+z} z$kVejz~9`N;^#uhq4VKnbqMGEDdgnzQCvrR$A}(aHw)ah}=%(GOD|JIN?fr&nA1QiUIm{^p6Jpp_4O`Tp$2EHFV42$hz|xwS zIGT>pYI%7bQ?0I1t-8wLss#_OS`6W;g?4o(cMAaB)CfV_0=C3aD-0Bz0K`5{YtJ-v zM5spD&zwPOhGkHOVtmBbxP%&-Niai+$~Ib-PMN33Q`oe0JbwcTOiy;su^A^zC~&Xr z(ZndKu2~ejmS$FqnCPzIP}?mtQB~c?G$hx%Gk?Q3>%kcfG%tKq)rgZzh`KG@YaJmM z)0S)9;(mJoo$#s}Ltfr7s(H(@Jr-<>sA_jjU5F&bf@!c|4X3kWV6(oA541zWc862l z!hRwR>|}guRJ*w_xC3Dr8HuH)Lyt#Llp7L=u$6(d!1zA*L`fAUEh8M}&o*znI;8Kr( z>&MG~r1*~#%AXlIUH0kAz5;Iotb!Em@$RDq%_Mv%+-Wj)g+%7BGvH#R_~Aux#_J~2 zDU_NYUmkmsmtX@-_{Qx+?7BuB*P3=6PmeK?^NR&pxRJn>95Eq_^xE{X))|zrvkG3} zb_`6W&!DmSbBk~E!4^nf)AB(%Q074jz^D;82T*CFvR1iQ+uSK_ZLJkcwe?N*b$4UC zTq>-std)uvUV^h=CRQrYxsZa_z|~lh?Yrgjozgmcc0p1fN>B5jN#OOK;@6tyrXa?k3DMGUGayH zj1K&GL?hTbG+f(i3d=qJhO?jfGzDhv7=%WaPqy%fElemZfU}O~GCO`2=2#Z~lfMav z;_@OGcNjf2!sgYq#8UNT2m#=?sC^$>JblMApQON*ByWhrT0VvwV8W-hclHwI+#op` zStgtUuUfcGYdyYr{*7ne2bWiIl$U^({HfCPNf|1^GC#7_7F^7>DG|27FCiT?rl7sb;q1!j;7Spj z_&?ly{y;81IuBrkCjx(xz+`+j!`p$&@iR@1SM#$Xy)>e>D51>vsmFQ0rXT$J+vn03 zDOm9Kv?rp@m%^5m?df;fpv`5w4K91Cv+Y*k)-W(VO^YarsPG2~OvDu;RQs?HrxY;Q zZfBlAC`WvnUq^%$5+=!$)bPtY5k_=nQt{M8u77kWAO0(j*s&WBU?Mkp)@2ToeZtpCQ cc5>H0Bq&UIofDQov0(su8&Hw-a literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TestCase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..2ece2d5dd16c9d9c83f8d637456867a5f61ee623 GIT binary patch literal 12146 zcmcgyNo*VE6%MJz(ob#vy-{+U&|?Qy6q`&aCw1u9&Tx^$R0}Opa+9!_j)o&@Vrqt+ z8Om}E0Y%zN4^4qCC|dN?V|(ejDNwY%8O^0R6fg=ThoXm|m!dbH`u=S=+%%*u)CY^? z{O|qmz5l)ME%U!~r?y)|mtu>$soScnmt)%xWA3gVtJ#)oX;wA1UEkT!?U-im)r_ic z$78YVT5NT#7|Uhz#fw1dSan;|Q?ZI=RjPVIt6KGPqHL&DtFlwI9wfAb#QuE3)g4#S zR7a0f&Ip<6p6=9CO^+=W(kr^FmQ`0REm9_>3}I5rdQ3{0gVNUgO@y?n>Nv3?Fv|ch z^a#b^U#-4fHME%HsxJJwY&eQx8ZHnU-vNbg#dg%HqXTjK+MT+oxrSxN2*H}E>9eoK z7*DeHa?Jt*+=>aQ3dAO0k5b-rb=y>{rL68~wo!8}y8ug5sfzA;mL$K-zRI^H?2Mh* zER!*nY7_ES%(d&ffA?6-*4?^o-lTF928Z6KQU{yKHKQb(rbVn^nNBLz(5bRunVTCZuP4G7|Tmk_3?bnUjm zF-R_#J;+%Agr4<4fV1q&W z%*(z9I|Lh)Z4M56!L)CI%@KegdI;7hnp+ma8ij5@MY85~r;;;wWKxal{v$=Zk7QO(k>^ zDg2>G&)!3JLVFMoe8r2cUNAC*H<_m;d*flLdvRvI^52P;!(1=Lbcnl4a z#2*dCLbIdfo2yowXgD?i-=@)6*>GxA^`S!743IVHfiLAS9!Eov*mNg4Na=2)2&*S7 zbH}Je$Kl6F^3^y~po`zesSK0=Z=x3&J=742W|{lC?NCTkNWyiZLm*EinFwH*@evk* z4!?!QHCyM5z&uez1)C9kgze%UDiG}k@FJRmvc^@YOyFwusv8}nq}K##=U8MqffA54 zfGAb}O16>Yi&$n6h*T#I1zduf0G8ur5alCXbDhK^{^>ALwKN9HiAUn&VFG;JB&+D( zLt4d=!V7-!40tI0b^uKX)=ZL?bH0Njy18%ImbnM);JC@b&OMb&SI{fnrOh=+@YfOU za83iyc22^5xT%RxP4whGT)As#lxj~x0DOfw-w|h=`eEoR`3E61+g;NZ<9+iuPba~& zgcD;Q4y7N35TZM>U^tIX0rqJ3AvY^E)rRPV;?{u(B{BI18YI}ukL=P@Ifh>9t_P{c z2nhk!C=1^p5>hlte;h_rZPB!XP~FjOsO4*QmjXs4`F21&v@(fr0*5?dfWL)Kg9o~G zwW?5ORsduPW8#dFWV&C*Ta1@X;$w|+n)!VQjW+hXfrgmm%t326)OA2La=qf>@S zqEj#X4}=MNP6+CO39C);48qX(JkYmyE$hCbo9cE|FVjO9!57gq`$2I)T<}`cRaEF- z9y*2-Jpl$7nfb#2!tFZYd4zcu^NT_vCX(zb%6lkMHb~c~Lq{dh^mQTl5m2^XH?tlg z!^RtE68x=VS`PGf;0rreboj{K)5DN3zLW>?9W>?IMx_E`l!1_x1yt8a@|6HlSU-T@ zMq^st1|?k39UOXu?t3YKm^d`R)r6}bxC(?Ets9)^D21x|0Ac_bfAtUee&AvW4YP#G z^9dGAAl1fMr6~P9giex}Zn7XGmO=Mnjb+=3z~E`4kCVeF0t0*sPL#L0P`EQRkjiMp zTQH5zWb+FPO7ZvcM#!5^O3P2R}%~0g%ZH4m>60`lJ5x1 zbn`KfLhy+KUH-I0Wgb zxD1mhqbhwifL?5vo9;qeUg0r%0tWAfXhfy@6R<(K+2DL(s zb^Y6Qz*s$!;vtkCu7GaR0nJ-&;pxJ&l=oV5%orZ z(=~$D$MHjS+86!}maHLu+ zc0N5veeN>ur2{>QMoCenI54B9h8@CCDbSx>>%ML>KgO$QaNp1$(4;hx3`#^R=Z^LAT zyomvOL%%1Eu$LhM5$jBb%sV`Zj>9qT@aCGlE8-E?vk4jSd;)T9*5Gwgn_Nx2S!U^v zH@=P{b;?>HlQS+~d-Lzjnwdna2rueh{0J-E@Xx~fviy%j2t%bW9O1bc;&i70&9yJ( zP#-fIsfbQB3B`lr78+)ghaT~>p%s~FNoSh4iWh~_lMss1nDA|RECF#GrogwGfS~`- z`VdWbP>vh)Hafu!Dj+5(Behs`vjcNsS9}8v>$Yw20Z=44+XH!ZrV7=MtR=r^45 zhcQbJr7KV6%e^3ruj6Gyj}9F#ZW_XoqUXpVob>$=I-B3CS+*C3$Kov~(TR%YD0SPQ z-aQKG9)5yRB^@^qvBp?m!MZi+E;`pH1wU4(;209q$y>T-Yf1OoczUP#PRnUt?cp>@ zE@CHYp>g3lT@E#p>={3MIaKLaVRSZk@c%faO_*rFg#%^BviDS0H3!!hokfdhfzblx z17nTh9is{ZRQ9Gqx`mMM>3MW6D;H&DVQqayF1C~!F!D$*uccX~@!kfhdDG)`?&2CI zoy<$C=vh7J#h={Vvo(9p&P7SVAXVQG${28xb1HQ_|J;2b0~)u@6wRDVvi$L<+v$l+(FY zdLRAI$$#21@bz&I5EXq||JPG<$JH%g~h3#6@PsTZa6vq_!WZq)3l&>a3<2t|C3 zgM(T>-&!GZ&uA;80*uvxki+;IJ;OX+q)O2-V-Sk?z&oY24(9N`LTIw3490H;h}W`SXcgeA zhmYlCTY2mqV{0wmbcku`)-xWWLHi7HghbJniY-vlmi2up+D6L*v$bqICPj5xsuM-O z2%%H{8h{lr4i0)@-+@Lb9F*ESl5&r|+nmDFm_clBg-25c6xS#4Um+TsGBPRq0;92w zLTJ}tF)FS3)45QmUo;iEKw_Uccq~tMeKqhm`TbqjtvRVg;=zLlJTSdmL~7mLW!Jo~ z!DTI%bWm4=mN&LaLm6}tE+ZWs?rE>{ERfr5h0q6YFpL*>yx=xd#cH`I2ogehsU6g| zZ<7Ch9S&y~eiOd1Nbi)#GxR!R*1J<4&m6?J=D!MGWY1G6x*(Nmtbm`skxFgNZx7Q7 hasG;Twel*vt?j$qP2SKOT8E3>bS1lheTWVb`X8!^1_1y7 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Tool.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Tool.php new file mode 100644 index 0000000000000000000000000000000000000000..dcab6b0880876604f4388afed80d3de26bae0a03 GIT binary patch literal 8611 zcmb_iOKcly9bY?5oBW-J^Od%)+g)b83r(ZcrcSjFmu`3bNNSqK+1SapmBla_Pm-aI z$2&7l6G|imLSi`~aRLd1IC4RPGZJTxySJPWa9W8ghduHCUgNQy)Q>iY*q-_R@8AFN zeKX&^-`s1$JIadLFdf}9Ys&VK;_aDA)3H67HI)Vf57;rLX3F`fBd5y0vr{z^Lo4t5lE=yZ{CNnyu}+Whkzvd-(CL zDkUYF3n_iP0x2Ay)u7Oh^6eT9c7;Dn91}gc~9}2mKl_;D30m1 zoW@&}O^pHbzZK`~c#t>DP?JW0=dEb+c3YNQRJU7~iq6|1zl)i7#Ss zjz*kJ1>Hif!c@(2n|1w2W6omEWH2Eyh}1+o!~Veo$?rUXX}f7QG=!t(HccaTj`<}e z4LiLSFa#z`NQj+@s`B6svI?_-Y-PMA7_Zxd@bZhj;8uib*}%D8(~Q@52H~|VI=^6* zhe;1r)V!mn8Jj{jGwH=a*iiBc(ojc@#s3_JNWfqchloef>l%CJzAlhSa}r%qf*HMq z16BiP7S^!^T+)MxRXZrD@DN!B@airtfjibN3tuFCYY=9Y)iQQZB;tH@h`FY7U>T-X zvmETHwsR!8^1x>X;acWA@{&bBM0NtsbC<+VLNMJCR`Mxa4nU+`&}G@^=O3RN3KSCo zNAdSz76-xlwr)JrFcq;62q%3!h&eu68u8?^V6@KoF#ho<%yeFkKZmIx%&-7XS&e3^ z0}qk(6)E1Y4}31*(OAOVYk2`8Uj1K66#v~c%ydG8JVCf&`aU!LSn}d_UrK*j5_j@S zVm?1Kk9a^4$y+dGQz%Q2a1B2ifpLin^7%I4sstjooQ9_bh0s0|Nf$>DB7mt){B(q*Pcdc2W{YznIz$~l5ovW>lt3EQnRIpp^TiafDmd|!{N)(dAH70Ok1gD|-alY9i$tXkWlVeAUi;yU+MyVZtB zwF=59-tJs~9#tOA=ht9{W7}-hnl^3_MEqFzFVd=vjoyuom_xw z@<3bJP}eG2<;i+M+gvNJ7jnhrVj&-W1K~B7TP+swW^SX9$Iqg=8V$w&8-mLcrJcz~ zUI6j4!cTS9FK5zEM+nX7Vv^mL8Nd@;5beG}67W{Ju(4Il6*P5)TEZ;uG;<0jig~S4 zdRSPChDa21ESD>k%i>BnehhOx6#%DY9D?bf%x8brxhu5e_GB1e#s{ zHGy1*Sy%LUo!@Nh6Ha^rvt8*#gT7JtWV2ANXse~1S}B&+x`GaH{y{;_7dE&raP7tu ztz6kCuB}AF*=dN-3=uUo{;Lp7`eO%q2or{`8K&dOCVyv;nEMQpIW>pGJm+zD#eeq9 zy1vK5WDd?zaV#sRINehpoLwUe`4}z;X9*{z*oN&URBwpu{+uM#4pclgNF`QbLQaaP z)}>0Rw0c_NT!h)&X1P*&RD4>X$SPslP+(;@i>sC58ov_G?0u!0{WdlvhvUQ#ae8x8 zFT}Uwl&rIOO@2L2vEGVT*yk}jpTl2t8a~d>!ZaPytsOC=CO!|r6}ht$h1}m$-s{@e z-ePX5-XPz4`Nmc@1gw``drOv|xCiXnVDiL0fLO0CVza5jG&Mo?ED5ZI0e~g-Idkv% zhY-Zt+j_BFZbM(y3k8@8DlT>fL+H)moT$Jhu|Mw8?{08En3XYt!D5tn2C?>r^>uQl zg)y*yQjx{+K_ZY?J5eM2 zByW+b@zXE=^XqUXk)}^MUhwPpd?zdfitmD~xeKD)X4r8P)p}AEG?(-{Uh!8-o%>lC zAmA`h!w+DoNt2ZF=n6E#Y4uoyT4WJ=#pzt1p1ZzhM*Tma)YsDHcc_SL_=RO)|Owmrln zdxVu_&pQ&GzFpwqA4)^=WvG3;EYp&_C*_@Ssvw~#38bFy4^1bKjHwtz@_lk|h%EGh z;@2DU?~apup(g34Ub~J63Tf96?K@$es22lOMNTjbNskh*W>=4SXG z2mQSyQtb~%pcI+&X)qk$OB7h%jA~iN;p18+v=Bf1hkEtQ!T$^O$)4vm-ApR={P}aC zy}xauTSflN&s8QAKf3rF~I);j&oc( literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ToolCall.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ToolCall.php new file mode 100644 index 0000000000000000000000000000000000000000..830361f3f13cc82bb198c819eb4de175cb904b13 GIT binary patch literal 1452 zcmb_cO>fgc5N*;A$|4X1BuYimwji2HbS*IA;8IYWv}q5}2&xJpOVwt*Nmtr>t@XMD zP$m8Ve}W??{tS1{`~*&n*N#*AC6MqTj=VE(-n@A`PoKwoF}jP}JmQ)f9^&qMZ1y;g zwK9q+iMwg9$2DeZKNgZ}f^lmLzuel!Ypu=gc}PuEsu}liU#Y(24wEVkolsDz`aP-M zIc(q@xQq8U^p?4v$Z#D|8MJu9w1|z;9SHTjJ~yS3*_ZlKQ8t4UJzUQ@dfo|= ztJvt2AFYnD<|ftAishXF9G3rrQ#5PDB3Kt(hCbh;2SRDj8+A1TIV<%QF9!M7S*0AW zfjTp%m$Mo!KNE#wjW8?)S_ePX%a*bR7t!}gwERy-s?Fu$#QKhmd`H-T9JsT$3N#uE zM;9&T7M#6Z99cucSe?Z7k)JMnuAu3m&uWj+L}uWb3a->I`uBe{s=pc--8oV%$AT&e zfve(VnYHU^iduWkRBhfkw8q*n)z&!H!~s zxVw`5e5qDj>tCyLZM%(#-9}`zjYxAqcHE!U`TX4TY=GyDBH+^-&)adkQ+Af_VrlaS U`8_|f7S3D=HZs4shv*QY-)M8yivR!s literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Trace.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Trace.php new file mode 100644 index 0000000000000000000000000000000000000000..7c0f645463e001fe97151186472f2b1fc98f45b8 GIT binary patch literal 2925 zcmb_e%~IP|6pjrc^bib)PH~uoxj0M$B#|53m4IaA-+Ca}Q*5S_@r*{6uZ^Zc(nwd- zw8Nux(?u8U^a=V7eTJ;N=mT`sbFU=-#Qb#{7QjgN`|dg4`OeYVd+VOM@RU@jO+B5_ z4ryNyc1nrsIm|H}i?oAomwLo-&Ro-?o=ixwMviI?QYuy(>j?Foz%!^qdXCexXx6Zt zpp)&Gy5;n`mh*kq=x5J!S?1{ml?5w+t)Eff#RsHP&%dKg@90c#RRlq+zzJH#0YR(K zZ=K|J0Srs`ebV4W@FNiXaf7yH8pLNh!#^9QubH;V5NZB^ne3CUZuu0ElV`huZ7|cZ z2?x|{gKln-kdvR?a2?EipTr^6xfm!!t7vsc zEvGZPWHXFWQ6_@iC(H}z=E8^w^mxKRWR|uxMW~*#ctCOdv`nlCXDW_^)E_%^c#^L0zVXgkh#Roe}i^a9pg zj~cXN+C9y1>~re*Xg0^z{NU_N_b$>2lGyw#KlMRPWWIz{jIITY!`EPm_NftEhxlU} zW>jHB=>SrJPdzPQXfYifDVXPWUdlJ-DmM|-j4>jPukT6kU_tLun~ks~G0wT2SGTaK z95q4r7G@cmTEhU-Q-bH&Ej$f8j*-RjG-26|bj21ucMPFndRlP3zJ)8+v^oIBw3sFz zF{70C@04a4QIm9|QR2L^eViqZoqqVAqQveBq<`xWFMcRiIlQ)imcwf`09*|6}#*80SS=OZ#Kd`1st8M*4y$TGZQ z`?mzljnqSW4Cz|4QExW1%|w z!$Sllr4?8ndskMg{KeD+sB~OV5Anj{;A|2+ZgI5lqeR~}F> zgNi+)o_PN{bYc7*#F^7`KH4yG8sU;@^xgI@|Mhb+SuFpWd{PlBr7TuTdAL%_g}!`} x`zyH~zE>1+Kv9M#@X@!5a*}J$i20LyK3G>?hWpycdUx$=Cr*Y7*d<&7{0l@ztHl5S literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php new file mode 100644 index 000000000000..98d785bf242c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php @@ -0,0 +1,70 @@ +internalAddGeneratedFile( + ' +ì +:google/cloud/dialogflow/cx/v3/transition_route_group.protogoogle.cloud.dialogflow.cx.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto(google/cloud/dialogflow/cx/v3/page.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"É +TransitionRouteGroup +name (  + display_name ( BàAI +transition_routes ( 2..google.cloud.dialogflow.cx.v3.TransitionRoute:¼êA¸ +.dialogflow.googleapis.com/TransitionRouteGrouprprojects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}eprojects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}*transitionRouteGroups2transitionRouteGroup"¨ + ListTransitionRouteGroupsRequestF +parent ( B6àAúA0.dialogflow.googleapis.com/TransitionRouteGroup + page_size ( + +page_token (  + language_code ( "’ +!ListTransitionRouteGroupsResponseT +transition_route_groups ( 23.google.cloud.dialogflow.cx.v3.TransitionRouteGroup +next_page_token ( "} +GetTransitionRouteGroupRequestD +name ( B6àAúA0 +.dialogflow.googleapis.com/TransitionRouteGroup + language_code ( "Ü +!CreateTransitionRouteGroupRequestF +parent ( B6àAúA0.dialogflow.googleapis.com/TransitionRouteGroupX +transition_route_group ( 23.google.cloud.dialogflow.cx.v3.TransitionRouteGroupBàA + language_code ( "Å +!UpdateTransitionRouteGroupRequestX +transition_route_group ( 23.google.cloud.dialogflow.cx.v3.TransitionRouteGroupBàA/ + update_mask ( 2.google.protobuf.FieldMask + language_code ( "x +!DeleteTransitionRouteGroupRequestD +name ( B6àAúA0 +.dialogflow.googleapis.com/TransitionRouteGroup +force (2Ý +TransitionRouteGroupsà +ListTransitionRouteGroups?.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest@.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse"¢ÚAparent‚Óä“’J/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroupsZDB/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups° +GetTransitionRouteGroup=.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest3.google.cloud.dialogflow.cx.v3.TransitionRouteGroup" ÚAname‚Óä“’J/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}ZDB/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}ÿ +CreateTransitionRouteGroup@.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest3.google.cloud.dialogflow.cx.v3.TransitionRouteGroup"éÚAparent,transition_route_group‚Óä“Â"J/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups:transition_route_groupZ\\"B/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups:transition_route_group² +UpdateTransitionRouteGroup@.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest3.google.cloud.dialogflow.cx.v3.TransitionRouteGroup"œÚA"transition_route_group,update_mask‚Óä“ð2a/v3/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}:transition_route_groupZs2Y/v3/{transition_route_group.name=projects/*/locations/*/agents/*/transitionRouteGroups/*}:transition_route_group™ +DeleteTransitionRouteGroup@.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.google.protobuf.Empty" ÚAname‚Óä“’*J/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}ZD*B/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}xÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB¼ +!com.google.cloud.dialogflow.cx.v3BTransitionRouteGroupProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php new file mode 100644 index 0000000000000000000000000000000000000000..620eda930c01ca29f4596fd33c6bf6f2ad387a84 GIT binary patch literal 1579 zcmbVMZEMp|6t>;gt!LegL1%p#+|7X)rn9N=WCEsd16 z$89N`+ef98qbSah+(St;#233G6yanT`MZoa1vs0Y7_&#u-7$}9uQzSmBy%fG6KUCf z_^}92{%>IXdRiy2K?~=D7MziAQrY~p0M};5!ke%X;dE217?d@Wnd@O4<7ge|sR#T`P;CTo-I?a%8IPCEbXOUH6(6{zYg5^omSPW2a+l2 zT%KQs#WZSgz~6zJmzNvdGJh48NfX&TVtlwco`b@LfWZ|g*lVfwQdRf4d437zo3GT@ z+yXsmge{k&wCTy=(%y|*{5u6 z$VQP_)xKq5gSg+{hhJNpnLhIdE%Wwq`k_n~Jvc58g5Uhn4qalA&M55e(#Pj)w$c2O zU2icD6qpAJ=N>53M?$;uJ-d;<7e$sJisu<5^hOlhm2QrCY~}v+>wlP<$^{SlqyMnX K)N0P)4B#hauHU=> literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Version.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Version.php new file mode 100644 index 0000000000000000000000000000000000000000..49308def0b3dd347fd392a9a686444e1707f5839 GIT binary patch literal 5015 zcmbtYyK~$`80XHhldLbV&C7O3kmXEbAC8pRKtPEJx`&Nt9NQB=hGcH$M%L|}mB^Bi zbhd-%C@3hPph!q>qPQ=H*`(cme%UkD)A-L-S8}%_=+SI7Nq%wWvN)0T^0KvPosHdoDyjB?+e%X+j_wrCBE=zGK*> z0trmt@D0oRUJnPLi`rl25|A@7!a4Qv;3o zsdPZfbk8d3j^olSxK5yH&6t`d4pYqA7IDJvbfzt0S8`nFQi)MK4IMuk6Ci?ywdbf*K$5$g^h4F&YqB_iiJdJwU z8@`CnEiLQI#q!Gh(qb_`J3U)0oP7)TqvMZO=I3YUXU?YZDRgpaC7&-A3ow?(2=z_t zvvcs=qkZ{W-{~OncojlK5aOVP;y9Y3FqqFMZ%jk?lw!?B_Dh5J%4xO7JB1944 z-6VQ*JiZPpA%B-b7h2j&SbT$=-Ea0Ib-Cl1DHhZ6H{j8V2m2w>@WP{nS=#2^nWe2& zXI9IUnpi3OC-%2iyh26JET9VoVv~Ko968^0gy&qN!VxM$JE}Q+16?z0=!UWjF!QYn zDYH%~iv=NIfu4|mN})@6*up{=>}`$*D6?h+q|9;J+9Dl52)WXGu;Y_SXF+JLYMb>%{yxt4JO?NHCVu%u>3RtQfA8l9zj=H9cvY0UgFy* zL-+QOn22*JpC1H_m~$uo%%Bq@iTIZk$|O4llij^{7(vZ_|=lG78^^m<+LRL8126Fz@ZzNlT z!I$=ajt)u52Ah#{tUyN%QL|yW(o$L4XlM42F@C>IxO?P9$RBj8#wpL;)mzpohQKHC z3JWl~8XSd5G`FGa@#a*yA5&-;9Qyx6ebd3ij# Y)k$0e(Nl_L9&iD~B%_O(25KPmA3uY;{Qv*} literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Webhook.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Webhook.php new file mode 100644 index 0000000000000000000000000000000000000000..61db3be66db319925013d29c210ff98dd101bae3 GIT binary patch literal 9112 zcmbtaOLN=S6%HxOk`85xh7_Bo6NjdqSXLaerJJ!s$B97_64~g%NVFVhn8FZvNg<{H z1_1S_tC>z_y6U2x>8jf-+fF;3F1qNVt86;cMbn+9i*%-|`~wQ!*xqi#wd4{piLJS$p4>V}y4xh#wk_AvtyXfY(`XPosard3qebj=GFe

cMKXHJ>eMrJLu*;hM$6jE==+)7+nGJGwQX5X(~K^F zsqGM_t?4AWRLQRpSF3BTR$F2uY6VK7R`f~K3j4Lq+xGzUmgYFgN1PNqgCzdf?rgOT zJ?Xfbi~n3V9Mv!l7tb0$MQQFQ8(PaDc=qVtM#t1$!!ncfz?!L(`I|{jlkUCVwov-} zNsp-tRR}7hRyJK?n_8<@B#v$yZP&6ZxHXq+64zHFU75cruBGIRMsl9>n9Chu@_y2_ zJ0y5}GHDaHW1IIF-;}_i|EqS4%H+0DlTFj2TChwfm+Q*ZB{Aq=p=A)$J=vK>gS6^- zvaRhJmVL6L>qNNB$V?vZ5H%#!Mq$YcaU88lM(4t}WwC=!j|w}*Q8a?G({>L|ag^z9 zMRT5>;_L=`iax+r%w^yCzz_~9*XzDNE@JG?`yNF7=?47s19X*Ir@IlJ z*7wu9w-XlyEv;=J2vCpW!Jc>{@Ss86M%@yABQ{(LY_NrMh(|vXj|QL$?q(jKBAQSa z5T~w)Qw(e{W;1nRXYu@U|8qhuDIR)2<{#!f@1VWJj@SB+JIpBjY3e_7Fd-mHnuaqJ z>EfYeXnsn%1k-iHX}7ckm92*9YJTinIV?Sb*(QZxLstM>5T9UV?~h1U5G#7e3zpe1nn-&ACR}5O zSRFThmQlRqQS@||_5w_b!6eGAZM8@}K8~9w6JN&Q{1J|E-&n^sxWc$<=3ugeA_O!R zj)x>%ZDTUnv+R0&4Czhf>FN`>?hqZJQ{5%DgMqC!EL-)CtNw{ub|U+&9C{(&f(3qN zM>EldY#{@>v6IHEm)T$hH#t3tz>H14=n%(Mw~1EARW#BV8fn>+{rK=0Y^3x$r&r?S z6w|d2q+f;LTCXGy6Q%#|Id=DFr@p&KIA_tak70(IAtb#HF|CF9oYYlaQ*~my4jOW7 zewsg4VcOC>b*-nwREb${TUa6p z)MVLb7S1}l)g~OvSV{^d?o#EkG$i*ss`MJn^aV&j%*4Aedkl<75g2<)4){jt9E|T$ zJ8%``!goW7--h6NkGTfmQ7@qe@%j zYAlTTaat}El#LCsGL~9`NFc<~H1S7DzO=UXky?FRQToUtv5l&{T9ns|ob=+d@<}R{sjh&GI z&K8wrrK-fnr70M%$kjqAb{17Ou~w;;*H$-T6Nx{E;DS(4Ux6V#fC=Gb!nramG;c!f zhFJG28UY@GoXs3pdU$+UMZ@kT%BtKK-^nIi4OGCqKJ%{^_K?b02Yrq;my>xWejR37 zmd<;$%ro!jVTNTi+{OMq^qOT{5SidGKLr!wcWMu2mkq}impCHSr1#(~f-B}Rp{<)t zTi2u!_&g6&ZM<4_uxDlgIWD2`*b)N`juj~b=6WyY#kX`9CIxQ}-c5_4w?;#A=_1US zWZ%WY3~%RGF-S};)7sDz(Ub5_u$s;b`9`oq3ahEPf=zI~A(ZA(dc%km%pvI+zoZrNG$x@2K85i9m4m90iqwygoFWYEh zaW2lV@^UKw<_kFm$-!}0W)~oVIRMwzOg^t+MI$A95zcvJ$u13?sJQP{h}7Mk26jwM z1Iyg={_?q&W;Q$2S#_&U;xqIC_HMC8r`0f8tsN?kVKyw$4~^Ji32#gMRgfX`xTR;u%;Gs3hNH*1c$9`wh>Ms0Pz$4W?r6OfT)EbZ=kkSUMTVzN*bbQ zMys`pf_DqZNcMuqrSA%iPU7bwnDI#qK6(mKlsQm|MzSj&q0#&zAntK;u;TF^TpZ*+ z2$xuS+k8S4mM{_TXiXePcMx4Df`;=GFplE}`ylnFahUOSEi&&Dm-CfJN=Du3;ToP;Zb z69k1fOa$Gt^o<1r@8M?`ack+7#4p1z8;D+CaSxyicf2S%Dco&Cbcdis{nq_eg=6DruB|Z3si0)7SAJD=m=U-SD2CtFomVY4$nv2wSF)}H6Al* zoOJCl?EUo^OnQGvn-KNkkCWvP_`ylZcA<}5^7}BH^FfHN9Fd5F8xBcr90uZ`wa)7& zipb;iwGm+@cyuT_9TBjXlkQ&|l&JKkhkZP_27oBeGoqh&Fyr9+z!ny6-Uv7K5Td?V zoZuU9xgxL2*fc8ZDt4OH{st8LKxL&;eas!Fyt*kbmy6gwqDL*3mzS~k9ZUTe$0@c?Yu{J*i^J0DG3hKf#Fl}JyV~N3BT*ibOMG>5pd6r1niEn4rh_#A zw%fCY+3vV%Z-vSI;tE{wlV0z0deM{=hgdhUsyw04fCy**Ith~^X*kl~LwISRbCj|} zbP?Pv3d+Ro6P@8%B(?Zl7R~9G|Nh@^!gr*1={wBY1IeK=VRF3*{c~%H;E6~m|VM^Ki%yq=` z^hs^f73wP#s;BoIDpb#IPpG3o&Rz@mdC&qk!AZGI?Egc)G_ZX6Mt)2O`A#mA+1uL_ zap@1C==%}=HO4#m%F(5%^475J-K+9{48v7?{q_CPo}U)rQlVc*R6?KrkXOy#`$~L$ z*0lOQ20;cf_VxYt);;>aufpNt;_t$*FR^bw(gphMN4n^L`;ji}r#EkZ7rx4$=W=XA zF4x_GOP}O&xJUlk2_}Od`=B#qG)GOwzEr_!od5eUBPNizD1IGoon@`Z?Hm4U_FMe3 Uj=)zS1HS-aJNcIyhj0k+egoogle.cloud.dialogflow.cx.v3.Action + */ +class Action extends \Google\Protobuf\Internal\Message +{ + protected $action; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\UserUtterance $user_utterance + * Optional. Agent obtained a message from the customer. + * @type \Google\Cloud\Dialogflow\Cx\V3\AgentUtterance $agent_utterance + * Optional. Action performed by the agent as a message. + * @type \Google\Cloud\Dialogflow\Cx\V3\ToolUse $tool_use + * Optional. Action performed on behalf of the agent by calling a plugin + * tool. + * @type \Google\Cloud\Dialogflow\Cx\V3\PlaybookInvocation $playbook_invocation + * Optional. Action performed on behalf of the agent by invoking a child + * playbook. + * @type \Google\Cloud\Dialogflow\Cx\V3\FlowInvocation $flow_invocation + * Optional. Action performed on behalf of the agent by invoking a CX flow. + * @type \Google\Cloud\Dialogflow\Cx\V3\PlaybookTransition $playbook_transition + * Optional. Action performed on behalf of the agent by transitioning to a + * target playbook. + * @type \Google\Cloud\Dialogflow\Cx\V3\FlowTransition $flow_transition + * Optional. Action performed on behalf of the agent by transitioning to a + * target CX flow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Agent obtained a message from the customer. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\UserUtterance|null + */ + public function getUserUtterance() + { + return $this->readOneof(1); + } + + public function hasUserUtterance() + { + return $this->hasOneof(1); + } + + /** + * Optional. Agent obtained a message from the customer. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\UserUtterance $var + * @return $this + */ + public function setUserUtterance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\UserUtterance::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Action performed by the agent as a message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\AgentUtterance|null + */ + public function getAgentUtterance() + { + return $this->readOneof(2); + } + + public function hasAgentUtterance() + { + return $this->hasOneof(2); + } + + /** + * Optional. Action performed by the agent as a message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\AgentUtterance $var + * @return $this + */ + public function setAgentUtterance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AgentUtterance::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. Action performed on behalf of the agent by calling a plugin + * tool. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\ToolUse|null + */ + public function getToolUse() + { + return $this->readOneof(3); + } + + public function hasToolUse() + { + return $this->hasOneof(3); + } + + /** + * Optional. Action performed on behalf of the agent by calling a plugin + * tool. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\ToolUse $var + * @return $this + */ + public function setToolUse($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ToolUse::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Action performed on behalf of the agent by invoking a child + * playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\PlaybookInvocation|null + */ + public function getPlaybookInvocation() + { + return $this->readOneof(4); + } + + public function hasPlaybookInvocation() + { + return $this->hasOneof(4); + } + + /** + * Optional. Action performed on behalf of the agent by invoking a child + * playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\PlaybookInvocation $var + * @return $this + */ + public function setPlaybookInvocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PlaybookInvocation::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. Action performed on behalf of the agent by invoking a CX flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\FlowInvocation|null + */ + public function getFlowInvocation() + { + return $this->readOneof(5); + } + + public function hasFlowInvocation() + { + return $this->hasOneof(5); + } + + /** + * Optional. Action performed on behalf of the agent by invoking a CX flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\FlowInvocation $var + * @return $this + */ + public function setFlowInvocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\FlowInvocation::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. Action performed on behalf of the agent by transitioning to a + * target playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\PlaybookTransition|null + */ + public function getPlaybookTransition() + { + return $this->readOneof(12); + } + + public function hasPlaybookTransition() + { + return $this->hasOneof(12); + } + + /** + * Optional. Action performed on behalf of the agent by transitioning to a + * target playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\PlaybookTransition $var + * @return $this + */ + public function setPlaybookTransition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PlaybookTransition::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Optional. Action performed on behalf of the agent by transitioning to a + * target CX flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\FlowTransition|null + */ + public function getFlowTransition() + { + return $this->readOneof(13); + } + + public function hasFlowTransition() + { + return $this->hasOneof(13); + } + + /** + * Optional. Action performed on behalf of the agent by transitioning to a + * target CX flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\FlowTransition $var + * @return $this + */ + public function setFlowTransition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\FlowTransition::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * @return string + */ + public function getAction() + { + return $this->whichOneof("action"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php new file mode 100644 index 000000000000..c7b11834998f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php @@ -0,0 +1,289 @@ +Flow->Page->Fulfillment/Parameter. + * + * Generated from protobuf message google.cloud.dialogflow.cx.v3.AdvancedSettings + */ +class AdvancedSettings extends \Google\Protobuf\Internal\Message +{ + /** + * If present, incoming audio is exported by Dialogflow to the configured + * Google Cloud Storage destination. + * Exposed at the following levels: + * - Agent level + * - Flow level + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GcsDestination audio_export_gcs_destination = 2; + */ + protected $audio_export_gcs_destination = null; + /** + * Settings for speech to text detection. + * Exposed at the following levels: + * - Agent level + * - Flow level + * - Page level + * - Parameter level + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettings speech_settings = 3; + */ + protected $speech_settings = null; + /** + * Settings for DTMF. + * Exposed at the following levels: + * - Agent level + * - Flow level + * - Page level + * - Parameter level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettings dtmf_settings = 5; + */ + protected $dtmf_settings = null; + /** + * Settings for logging. + * Settings for Dialogflow History, Contact Center messages, StackDriver logs, + * and speech logging. + * Exposed at the following levels: + * - Agent level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + */ + protected $logging_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\GcsDestination $audio_export_gcs_destination + * If present, incoming audio is exported by Dialogflow to the configured + * Google Cloud Storage destination. + * Exposed at the following levels: + * - Agent level + * - Flow level + * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\SpeechSettings $speech_settings + * Settings for speech to text detection. + * Exposed at the following levels: + * - Agent level + * - Flow level + * - Page level + * - Parameter level + * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\DtmfSettings $dtmf_settings + * Settings for DTMF. + * Exposed at the following levels: + * - Agent level + * - Flow level + * - Page level + * - Parameter level. + * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\LoggingSettings $logging_settings + * Settings for logging. + * Settings for Dialogflow History, Contact Center messages, StackDriver logs, + * and speech logging. + * Exposed at the following levels: + * - Agent level. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::initOnce(); + parent::__construct($data); + } + + /** + * If present, incoming audio is exported by Dialogflow to the configured + * Google Cloud Storage destination. + * Exposed at the following levels: + * - Agent level + * - Flow level + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GcsDestination audio_export_gcs_destination = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\GcsDestination|null + */ + public function getAudioExportGcsDestination() + { + return $this->audio_export_gcs_destination; + } + + public function hasAudioExportGcsDestination() + { + return isset($this->audio_export_gcs_destination); + } + + public function clearAudioExportGcsDestination() + { + unset($this->audio_export_gcs_destination); + } + + /** + * If present, incoming audio is exported by Dialogflow to the configured + * Google Cloud Storage destination. + * Exposed at the following levels: + * - Agent level + * - Flow level + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GcsDestination audio_export_gcs_destination = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\GcsDestination $var + * @return $this + */ + public function setAudioExportGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\GcsDestination::class); + $this->audio_export_gcs_destination = $var; + + return $this; + } + + /** + * Settings for speech to text detection. + * Exposed at the following levels: + * - Agent level + * - Flow level + * - Page level + * - Parameter level + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettings speech_settings = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\SpeechSettings|null + */ + public function getSpeechSettings() + { + return $this->speech_settings; + } + + public function hasSpeechSettings() + { + return isset($this->speech_settings); + } + + public function clearSpeechSettings() + { + unset($this->speech_settings); + } + + /** + * Settings for speech to text detection. + * Exposed at the following levels: + * - Agent level + * - Flow level + * - Page level + * - Parameter level + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettings speech_settings = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\SpeechSettings $var + * @return $this + */ + public function setSpeechSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\SpeechSettings::class); + $this->speech_settings = $var; + + return $this; + } + + /** + * Settings for DTMF. + * Exposed at the following levels: + * - Agent level + * - Flow level + * - Page level + * - Parameter level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\DtmfSettings|null + */ + public function getDtmfSettings() + { + return $this->dtmf_settings; + } + + public function hasDtmfSettings() + { + return isset($this->dtmf_settings); + } + + public function clearDtmfSettings() + { + unset($this->dtmf_settings); + } + + /** + * Settings for DTMF. + * Exposed at the following levels: + * - Agent level + * - Flow level + * - Page level + * - Parameter level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\DtmfSettings $var + * @return $this + */ + public function setDtmfSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\DtmfSettings::class); + $this->dtmf_settings = $var; + + return $this; + } + + /** + * Settings for logging. + * Settings for Dialogflow History, Contact Center messages, StackDriver logs, + * and speech logging. + * Exposed at the following levels: + * - Agent level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\LoggingSettings|null + */ + public function getLoggingSettings() + { + return $this->logging_settings; + } + + public function hasLoggingSettings() + { + return isset($this->logging_settings); + } + + public function clearLoggingSettings() + { + unset($this->logging_settings); + } + + /** + * Settings for logging. + * Settings for Dialogflow History, Contact Center messages, StackDriver logs, + * and speech logging. + * Exposed at the following levels: + * - Agent level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\LoggingSettings $var + * @return $this + */ + public function setLoggingSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\LoggingSettings::class); + $this->logging_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/DtmfSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/DtmfSettings.php new file mode 100644 index 000000000000..a5a325d168dd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/DtmfSettings.php @@ -0,0 +1,246 @@ +google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettings + */ +class DtmfSettings extends \Google\Protobuf\Internal\Message +{ + /** + * If true, incoming audio is processed for DTMF (dual tone multi frequency) + * events. For example, if the caller presses a button on their telephone + * keypad and DTMF processing is enabled, Dialogflow will detect the + * event (e.g. a "3" was pressed) in the incoming audio and pass the event + * to the bot to drive business logic (e.g. when 3 is pressed, return the + * account balance). + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + /** + * Max length of DTMF digits. + * + * Generated from protobuf field int32 max_digits = 2; + */ + protected $max_digits = 0; + /** + * The digit that terminates a DTMF digit sequence. + * + * Generated from protobuf field string finish_digit = 3; + */ + protected $finish_digit = ''; + /** + * Interdigit timeout setting for matching dtmf input to regex. + * + * Generated from protobuf field .google.protobuf.Duration interdigit_timeout_duration = 6; + */ + protected $interdigit_timeout_duration = null; + /** + * Endpoint timeout setting for matching dtmf input to regex. + * + * Generated from protobuf field .google.protobuf.Duration endpointing_timeout_duration = 7; + */ + protected $endpointing_timeout_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * If true, incoming audio is processed for DTMF (dual tone multi frequency) + * events. For example, if the caller presses a button on their telephone + * keypad and DTMF processing is enabled, Dialogflow will detect the + * event (e.g. a "3" was pressed) in the incoming audio and pass the event + * to the bot to drive business logic (e.g. when 3 is pressed, return the + * account balance). + * @type int $max_digits + * Max length of DTMF digits. + * @type string $finish_digit + * The digit that terminates a DTMF digit sequence. + * @type \Google\Protobuf\Duration $interdigit_timeout_duration + * Interdigit timeout setting for matching dtmf input to regex. + * @type \Google\Protobuf\Duration $endpointing_timeout_duration + * Endpoint timeout setting for matching dtmf input to regex. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::initOnce(); + parent::__construct($data); + } + + /** + * If true, incoming audio is processed for DTMF (dual tone multi frequency) + * events. For example, if the caller presses a button on their telephone + * keypad and DTMF processing is enabled, Dialogflow will detect the + * event (e.g. a "3" was pressed) in the incoming audio and pass the event + * to the bot to drive business logic (e.g. when 3 is pressed, return the + * account balance). + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * If true, incoming audio is processed for DTMF (dual tone multi frequency) + * events. For example, if the caller presses a button on their telephone + * keypad and DTMF processing is enabled, Dialogflow will detect the + * event (e.g. a "3" was pressed) in the incoming audio and pass the event + * to the bot to drive business logic (e.g. when 3 is pressed, return the + * account balance). + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Max length of DTMF digits. + * + * Generated from protobuf field int32 max_digits = 2; + * @return int + */ + public function getMaxDigits() + { + return $this->max_digits; + } + + /** + * Max length of DTMF digits. + * + * Generated from protobuf field int32 max_digits = 2; + * @param int $var + * @return $this + */ + public function setMaxDigits($var) + { + GPBUtil::checkInt32($var); + $this->max_digits = $var; + + return $this; + } + + /** + * The digit that terminates a DTMF digit sequence. + * + * Generated from protobuf field string finish_digit = 3; + * @return string + */ + public function getFinishDigit() + { + return $this->finish_digit; + } + + /** + * The digit that terminates a DTMF digit sequence. + * + * Generated from protobuf field string finish_digit = 3; + * @param string $var + * @return $this + */ + public function setFinishDigit($var) + { + GPBUtil::checkString($var, True); + $this->finish_digit = $var; + + return $this; + } + + /** + * Interdigit timeout setting for matching dtmf input to regex. + * + * Generated from protobuf field .google.protobuf.Duration interdigit_timeout_duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getInterdigitTimeoutDuration() + { + return $this->interdigit_timeout_duration; + } + + public function hasInterdigitTimeoutDuration() + { + return isset($this->interdigit_timeout_duration); + } + + public function clearInterdigitTimeoutDuration() + { + unset($this->interdigit_timeout_duration); + } + + /** + * Interdigit timeout setting for matching dtmf input to regex. + * + * Generated from protobuf field .google.protobuf.Duration interdigit_timeout_duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setInterdigitTimeoutDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->interdigit_timeout_duration = $var; + + return $this; + } + + /** + * Endpoint timeout setting for matching dtmf input to regex. + * + * Generated from protobuf field .google.protobuf.Duration endpointing_timeout_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getEndpointingTimeoutDuration() + { + return $this->endpointing_timeout_duration; + } + + public function hasEndpointingTimeoutDuration() + { + return isset($this->endpointing_timeout_duration); + } + + public function clearEndpointingTimeoutDuration() + { + unset($this->endpointing_timeout_duration); + } + + /** + * Endpoint timeout setting for matching dtmf input to regex. + * + * Generated from protobuf field .google.protobuf.Duration endpointing_timeout_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndpointingTimeoutDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->endpointing_timeout_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DtmfSettings::class, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings_DtmfSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/LoggingSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/LoggingSettings.php new file mode 100644 index 000000000000..255120078da7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/LoggingSettings.php @@ -0,0 +1,146 @@ +google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + */ +class LoggingSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Enables Google Cloud Logging. + * + * Generated from protobuf field bool enable_stackdriver_logging = 2; + */ + protected $enable_stackdriver_logging = false; + /** + * Enables DF Interaction logging. + * + * Generated from protobuf field bool enable_interaction_logging = 3; + */ + protected $enable_interaction_logging = false; + /** + * Enables consent-based end-user input redaction, if true, a pre-defined + * session parameter `$session.params.conversation-redaction` will be + * used to determine if the utterance should be redacted. + * + * Generated from protobuf field bool enable_consent_based_redaction = 4; + */ + protected $enable_consent_based_redaction = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_stackdriver_logging + * Enables Google Cloud Logging. + * @type bool $enable_interaction_logging + * Enables DF Interaction logging. + * @type bool $enable_consent_based_redaction + * Enables consent-based end-user input redaction, if true, a pre-defined + * session parameter `$session.params.conversation-redaction` will be + * used to determine if the utterance should be redacted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::initOnce(); + parent::__construct($data); + } + + /** + * Enables Google Cloud Logging. + * + * Generated from protobuf field bool enable_stackdriver_logging = 2; + * @return bool + */ + public function getEnableStackdriverLogging() + { + return $this->enable_stackdriver_logging; + } + + /** + * Enables Google Cloud Logging. + * + * Generated from protobuf field bool enable_stackdriver_logging = 2; + * @param bool $var + * @return $this + */ + public function setEnableStackdriverLogging($var) + { + GPBUtil::checkBool($var); + $this->enable_stackdriver_logging = $var; + + return $this; + } + + /** + * Enables DF Interaction logging. + * + * Generated from protobuf field bool enable_interaction_logging = 3; + * @return bool + */ + public function getEnableInteractionLogging() + { + return $this->enable_interaction_logging; + } + + /** + * Enables DF Interaction logging. + * + * Generated from protobuf field bool enable_interaction_logging = 3; + * @param bool $var + * @return $this + */ + public function setEnableInteractionLogging($var) + { + GPBUtil::checkBool($var); + $this->enable_interaction_logging = $var; + + return $this; + } + + /** + * Enables consent-based end-user input redaction, if true, a pre-defined + * session parameter `$session.params.conversation-redaction` will be + * used to determine if the utterance should be redacted. + * + * Generated from protobuf field bool enable_consent_based_redaction = 4; + * @return bool + */ + public function getEnableConsentBasedRedaction() + { + return $this->enable_consent_based_redaction; + } + + /** + * Enables consent-based end-user input redaction, if true, a pre-defined + * session parameter `$session.params.conversation-redaction` will be + * used to determine if the utterance should be redacted. + * + * Generated from protobuf field bool enable_consent_based_redaction = 4; + * @param bool $var + * @return $this + */ + public function setEnableConsentBasedRedaction($var) + { + GPBUtil::checkBool($var); + $this->enable_consent_based_redaction = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LoggingSettings::class, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings_LoggingSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/SpeechSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/SpeechSettings.php new file mode 100644 index 000000000000..af106f9418f1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/SpeechSettings.php @@ -0,0 +1,206 @@ +google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettings + */ +class SpeechSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Sensitivity of the speech model that detects the end of speech. + * Scale from 0 to 100. + * + * Generated from protobuf field int32 endpointer_sensitivity = 1; + */ + protected $endpointer_sensitivity = 0; + /** + * Timeout before detecting no speech. + * + * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 2; + */ + protected $no_speech_timeout = null; + /** + * Use timeout based endpointing, interpreting endpointer sensitivity as + * seconds of timeout value. + * + * Generated from protobuf field bool use_timeout_based_endpointing = 3; + */ + protected $use_timeout_based_endpointing = false; + /** + * Mapping from language to Speech-to-Text model. The mapped Speech-to-Text + * model will be selected for requests from its corresponding language. + * For more information, see + * [Speech + * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). + * + * Generated from protobuf field map models = 5; + */ + private $models; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $endpointer_sensitivity + * Sensitivity of the speech model that detects the end of speech. + * Scale from 0 to 100. + * @type \Google\Protobuf\Duration $no_speech_timeout + * Timeout before detecting no speech. + * @type bool $use_timeout_based_endpointing + * Use timeout based endpointing, interpreting endpointer sensitivity as + * seconds of timeout value. + * @type array|\Google\Protobuf\Internal\MapField $models + * Mapping from language to Speech-to-Text model. The mapped Speech-to-Text + * model will be selected for requests from its corresponding language. + * For more information, see + * [Speech + * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::initOnce(); + parent::__construct($data); + } + + /** + * Sensitivity of the speech model that detects the end of speech. + * Scale from 0 to 100. + * + * Generated from protobuf field int32 endpointer_sensitivity = 1; + * @return int + */ + public function getEndpointerSensitivity() + { + return $this->endpointer_sensitivity; + } + + /** + * Sensitivity of the speech model that detects the end of speech. + * Scale from 0 to 100. + * + * Generated from protobuf field int32 endpointer_sensitivity = 1; + * @param int $var + * @return $this + */ + public function setEndpointerSensitivity($var) + { + GPBUtil::checkInt32($var); + $this->endpointer_sensitivity = $var; + + return $this; + } + + /** + * Timeout before detecting no speech. + * + * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getNoSpeechTimeout() + { + return $this->no_speech_timeout; + } + + public function hasNoSpeechTimeout() + { + return isset($this->no_speech_timeout); + } + + public function clearNoSpeechTimeout() + { + unset($this->no_speech_timeout); + } + + /** + * Timeout before detecting no speech. + * + * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setNoSpeechTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->no_speech_timeout = $var; + + return $this; + } + + /** + * Use timeout based endpointing, interpreting endpointer sensitivity as + * seconds of timeout value. + * + * Generated from protobuf field bool use_timeout_based_endpointing = 3; + * @return bool + */ + public function getUseTimeoutBasedEndpointing() + { + return $this->use_timeout_based_endpointing; + } + + /** + * Use timeout based endpointing, interpreting endpointer sensitivity as + * seconds of timeout value. + * + * Generated from protobuf field bool use_timeout_based_endpointing = 3; + * @param bool $var + * @return $this + */ + public function setUseTimeoutBasedEndpointing($var) + { + GPBUtil::checkBool($var); + $this->use_timeout_based_endpointing = $var; + + return $this; + } + + /** + * Mapping from language to Speech-to-Text model. The mapped Speech-to-Text + * model will be selected for requests from its corresponding language. + * For more information, see + * [Speech + * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). + * + * Generated from protobuf field map models = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getModels() + { + return $this->models; + } + + /** + * Mapping from language to Speech-to-Text model. The mapped Speech-to-Text + * model will be selected for requests from its corresponding language. + * For more information, see + * [Speech + * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). + * + * Generated from protobuf field map models = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setModels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->models = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpeechSettings::class, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings_SpeechSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent.php new file mode 100644 index 000000000000..8bcccac73104 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent.php @@ -0,0 +1,1141 @@ +google.cloud.dialogflow.cx.v3.Agent + */ +class Agent extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the agent. + * Required for the + * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] + * method. + * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent] + * populates the name automatically. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the agent, unique within the location. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. Immutable. The default language of the agent as a language tag. + * See [Language + * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * for a list of the currently supported language codes. + * This field cannot be set by the + * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] + * method. + * + * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $default_language_code = ''; + /** + * The list of all languages supported by the agent (except for the + * `default_language_code`). + * + * Generated from protobuf field repeated string supported_language_codes = 4; + */ + private $supported_language_codes; + /** + * Required. The time zone of the 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 = ''; + /** + * The description of the agent. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * + * Generated from protobuf field string description = 6; + */ + protected $description = ''; + /** + * 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; + */ + protected $avatar_uri = ''; + /** + * Speech recognition related settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechToTextSettings speech_to_text_settings = 13; + */ + protected $speech_to_text_settings = null; + /** + * Name of the + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] + * reference for the agent. Format: + * `projects//locations//securitySettings/`. + * + * Generated from protobuf field string security_settings = 17 [(.google.api.resource_reference) = { + */ + protected $security_settings = ''; + /** + * Indicates if stackdriver logging is enabled for the agent. + * Please use + * [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings] + * instead. + * + * Generated from protobuf field bool enable_stackdriver_logging = 18 [deprecated = true]; + * @deprecated + */ + protected $enable_stackdriver_logging = false; + /** + * Indicates if automatic spell correction is enabled in detect intent + * requests. + * + * Generated from protobuf field bool enable_spell_correction = 20; + */ + protected $enable_spell_correction = false; + /** + * Optional. Enable training multi-lingual models for this agent. These models + * will be trained on all the languages supported by the agent. + * + * Generated from protobuf field bool enable_multi_language_training = 40 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_multi_language_training = false; + /** + * Indicates whether the agent is locked for changes. If the agent is locked, + * modifications to the agent will be rejected except for [RestoreAgent][]. + * + * Generated from protobuf field bool locked = 27; + */ + protected $locked = false; + /** + * Hierarchical advanced settings for this agent. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + */ + protected $advanced_settings = null; + /** + * Git integration settings for this agent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings git_integration_settings = 30; + */ + protected $git_integration_settings = null; + /** + * Settings on instructing the speech synthesizer on how to generate the + * output audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TextToSpeechSettings text_to_speech_settings = 31; + */ + protected $text_to_speech_settings = null; + /** + * Gen App Builder-related agent-level settings. + * + * Generated from protobuf field optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + */ + protected $gen_app_builder_settings = null; + /** + * Optional. Answer feedback collection settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $answer_feedback_settings = null; + /** + * Optional. Settings for end user personalization. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings personalization_settings = 42 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $personalization_settings = null; + /** + * Optional. Settings for custom client certificates. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings client_certificate_settings = 43 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client_certificate_settings = null; + /** + * Optional. Output only. A read only boolean field reflecting Zone Separation + * status of the agent. + * + * Generated from protobuf field optional bool satisfies_pzs = 45 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = null; + /** + * Optional. Output only. A read only boolean field reflecting Zone Isolation + * status of the agent. + * + * Generated from protobuf field optional bool satisfies_pzi = 46 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = null; + protected $session_entry_resource; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the agent. + * Required for the + * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] + * method. + * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent] + * populates the name automatically. + * Format: `projects//locations//agents/`. + * @type string $display_name + * Required. The human-readable name of the agent, unique within the location. + * @type string $default_language_code + * Required. Immutable. The default language of the agent as a language tag. + * See [Language + * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * for a list of the currently supported language codes. + * This field cannot be set by the + * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] + * method. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_language_codes + * The list of all languages supported by the agent (except for the + * `default_language_code`). + * @type string $time_zone + * Required. The time zone of the agent from the [time zone + * database](https://www.iana.org/time-zones), e.g., America/New_York, + * Europe/Paris. + * @type string $description + * The description of the agent. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * @type string $avatar_uri + * 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 \Google\Cloud\Dialogflow\Cx\V3\SpeechToTextSettings $speech_to_text_settings + * Speech recognition related settings. + * @type string $start_flow + * Name of the start flow in this agent. A start flow will be automatically + * created when the agent is created, and can only be deleted by deleting + * the agent. + * Format: + * `projects//locations//agents//flows/`. + * Currently only the default start flow with id + * "00000000-0000-0000-0000-000000000000" is allowed. + * @type string $start_playbook + * Name of the start playbook in this agent. A start playbook will be + * automatically created when the agent is created, and can only be deleted + * by deleting the agent. + * Format: + * `projects//locations//agents//playbooks/`. + * Currently only the + * default playbook with id + * "00000000-0000-0000-0000-000000000000" is allowed. + * @type string $security_settings + * Name of the + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] + * reference for the agent. Format: + * `projects//locations//securitySettings/`. + * @type bool $enable_stackdriver_logging + * Indicates if stackdriver logging is enabled for the agent. + * Please use + * [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings] + * instead. + * @type bool $enable_spell_correction + * Indicates if automatic spell correction is enabled in detect intent + * requests. + * @type bool $enable_multi_language_training + * Optional. Enable training multi-lingual models for this agent. These models + * will be trained on all the languages supported by the agent. + * @type bool $locked + * Indicates whether the agent is locked for changes. If the agent is locked, + * modifications to the agent will be rejected except for [RestoreAgent][]. + * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings + * Hierarchical advanced settings for this agent. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings $git_integration_settings + * Git integration settings for this agent. + * @type \Google\Cloud\Dialogflow\Cx\V3\TextToSpeechSettings $text_to_speech_settings + * Settings on instructing the speech synthesizer on how to generate the + * output audio content. + * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\GenAppBuilderSettings $gen_app_builder_settings + * Gen App Builder-related agent-level settings. + * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\AnswerFeedbackSettings $answer_feedback_settings + * Optional. Answer feedback collection settings. + * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\PersonalizationSettings $personalization_settings + * Optional. Settings for end user personalization. + * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\ClientCertificateSettings $client_certificate_settings + * Optional. Settings for custom client certificates. + * @type bool $satisfies_pzs + * Optional. Output only. A read only boolean field reflecting Zone Separation + * status of the agent. + * @type bool $satisfies_pzi + * Optional. Output only. A read only boolean field reflecting Zone Isolation + * status of the agent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the agent. + * Required for the + * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] + * method. + * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent] + * populates the name automatically. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the agent. + * Required for the + * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] + * method. + * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent] + * populates the name automatically. + * Format: `projects//locations//agents/`. + * + * 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 human-readable name of the agent, unique within the location. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the agent, unique within the location. + * + * 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. Immutable. The default language of the agent as a language tag. + * See [Language + * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * for a list of the currently supported language codes. + * This field cannot be set by the + * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] + * method. + * + * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getDefaultLanguageCode() + { + return $this->default_language_code; + } + + /** + * Required. Immutable. The default language of the agent as a language tag. + * See [Language + * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * for a list of the currently supported language codes. + * This field cannot be set by the + * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] + * method. + * + * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setDefaultLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->default_language_code = $var; + + return $this; + } + + /** + * The list of all languages supported by the agent (except for the + * `default_language_code`). + * + * Generated from protobuf field repeated string supported_language_codes = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedLanguageCodes() + { + return $this->supported_language_codes; + } + + /** + * The list of all languages supported by the agent (except for the + * `default_language_code`). + * + * Generated from protobuf field repeated string supported_language_codes = 4; + * @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 the 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 the 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; + } + + /** + * The description of the agent. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the agent. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * + * Generated from protobuf field string description = 6; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * 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; + * @return string + */ + public function getAvatarUri() + { + return $this->avatar_uri; + } + + /** + * 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; + * @param string $var + * @return $this + */ + public function setAvatarUri($var) + { + GPBUtil::checkString($var, True); + $this->avatar_uri = $var; + + return $this; + } + + /** + * Speech recognition related settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechToTextSettings speech_to_text_settings = 13; + * @return \Google\Cloud\Dialogflow\Cx\V3\SpeechToTextSettings|null + */ + public function getSpeechToTextSettings() + { + return $this->speech_to_text_settings; + } + + public function hasSpeechToTextSettings() + { + return isset($this->speech_to_text_settings); + } + + public function clearSpeechToTextSettings() + { + unset($this->speech_to_text_settings); + } + + /** + * Speech recognition related settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechToTextSettings speech_to_text_settings = 13; + * @param \Google\Cloud\Dialogflow\Cx\V3\SpeechToTextSettings $var + * @return $this + */ + public function setSpeechToTextSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SpeechToTextSettings::class); + $this->speech_to_text_settings = $var; + + return $this; + } + + /** + * Name of the start flow in this agent. A start flow will be automatically + * created when the agent is created, and can only be deleted by deleting + * the agent. + * Format: + * `projects//locations//agents//flows/`. + * Currently only the default start flow with id + * "00000000-0000-0000-0000-000000000000" is allowed. + * + * Generated from protobuf field string start_flow = 16 [(.google.api.resource_reference) = { + * @return string + */ + public function getStartFlow() + { + return $this->readOneof(16); + } + + public function hasStartFlow() + { + return $this->hasOneof(16); + } + + /** + * Name of the start flow in this agent. A start flow will be automatically + * created when the agent is created, and can only be deleted by deleting + * the agent. + * Format: + * `projects//locations//agents//flows/`. + * Currently only the default start flow with id + * "00000000-0000-0000-0000-000000000000" is allowed. + * + * Generated from protobuf field string start_flow = 16 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStartFlow($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Name of the start playbook in this agent. A start playbook will be + * automatically created when the agent is created, and can only be deleted + * by deleting the agent. + * Format: + * `projects//locations//agents//playbooks/`. + * Currently only the + * default playbook with id + * "00000000-0000-0000-0000-000000000000" is allowed. + * + * Generated from protobuf field string start_playbook = 39 [(.google.api.resource_reference) = { + * @return string + */ + public function getStartPlaybook() + { + return $this->readOneof(39); + } + + public function hasStartPlaybook() + { + return $this->hasOneof(39); + } + + /** + * Name of the start playbook in this agent. A start playbook will be + * automatically created when the agent is created, and can only be deleted + * by deleting the agent. + * Format: + * `projects//locations//agents//playbooks/`. + * Currently only the + * default playbook with id + * "00000000-0000-0000-0000-000000000000" is allowed. + * + * Generated from protobuf field string start_playbook = 39 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStartPlaybook($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(39, $var); + + return $this; + } + + /** + * Name of the + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] + * reference for the agent. Format: + * `projects//locations//securitySettings/`. + * + * Generated from protobuf field string security_settings = 17 [(.google.api.resource_reference) = { + * @return string + */ + public function getSecuritySettings() + { + return $this->security_settings; + } + + /** + * Name of the + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] + * reference for the agent. Format: + * `projects//locations//securitySettings/`. + * + * Generated from protobuf field string security_settings = 17 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecuritySettings($var) + { + GPBUtil::checkString($var, True); + $this->security_settings = $var; + + return $this; + } + + /** + * Indicates if stackdriver logging is enabled for the agent. + * Please use + * [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings] + * instead. + * + * Generated from protobuf field bool enable_stackdriver_logging = 18 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getEnableStackdriverLogging() + { + if ($this->enable_stackdriver_logging !== false) { + @trigger_error('enable_stackdriver_logging is deprecated.', E_USER_DEPRECATED); + } + return $this->enable_stackdriver_logging; + } + + /** + * Indicates if stackdriver logging is enabled for the agent. + * Please use + * [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings] + * instead. + * + * Generated from protobuf field bool enable_stackdriver_logging = 18 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setEnableStackdriverLogging($var) + { + @trigger_error('enable_stackdriver_logging is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->enable_stackdriver_logging = $var; + + return $this; + } + + /** + * Indicates if automatic spell correction is enabled in detect intent + * requests. + * + * Generated from protobuf field bool enable_spell_correction = 20; + * @return bool + */ + public function getEnableSpellCorrection() + { + return $this->enable_spell_correction; + } + + /** + * Indicates if automatic spell correction is enabled in detect intent + * requests. + * + * Generated from protobuf field bool enable_spell_correction = 20; + * @param bool $var + * @return $this + */ + public function setEnableSpellCorrection($var) + { + GPBUtil::checkBool($var); + $this->enable_spell_correction = $var; + + return $this; + } + + /** + * Optional. Enable training multi-lingual models for this agent. These models + * will be trained on all the languages supported by the agent. + * + * Generated from protobuf field bool enable_multi_language_training = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableMultiLanguageTraining() + { + return $this->enable_multi_language_training; + } + + /** + * Optional. Enable training multi-lingual models for this agent. These models + * will be trained on all the languages supported by the agent. + * + * Generated from protobuf field bool enable_multi_language_training = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableMultiLanguageTraining($var) + { + GPBUtil::checkBool($var); + $this->enable_multi_language_training = $var; + + return $this; + } + + /** + * Indicates whether the agent is locked for changes. If the agent is locked, + * modifications to the agent will be rejected except for [RestoreAgent][]. + * + * Generated from protobuf field bool locked = 27; + * @return bool + */ + public function getLocked() + { + return $this->locked; + } + + /** + * Indicates whether the agent is locked for changes. If the agent is locked, + * modifications to the agent will be rejected except for [RestoreAgent][]. + * + * Generated from protobuf field bool locked = 27; + * @param bool $var + * @return $this + */ + public function setLocked($var) + { + GPBUtil::checkBool($var); + $this->locked = $var; + + return $this; + } + + /** + * Hierarchical advanced settings for this agent. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null + */ + public function getAdvancedSettings() + { + return $this->advanced_settings; + } + + public function hasAdvancedSettings() + { + return isset($this->advanced_settings); + } + + public function clearAdvancedSettings() + { + unset($this->advanced_settings); + } + + /** + * Hierarchical advanced settings for this agent. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var + * @return $this + */ + public function setAdvancedSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); + $this->advanced_settings = $var; + + return $this; + } + + /** + * Git integration settings for this agent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings git_integration_settings = 30; + * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings|null + */ + public function getGitIntegrationSettings() + { + return $this->git_integration_settings; + } + + public function hasGitIntegrationSettings() + { + return isset($this->git_integration_settings); + } + + public function clearGitIntegrationSettings() + { + unset($this->git_integration_settings); + } + + /** + * Git integration settings for this agent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings git_integration_settings = 30; + * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings $var + * @return $this + */ + public function setGitIntegrationSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings::class); + $this->git_integration_settings = $var; + + return $this; + } + + /** + * Settings on instructing the speech synthesizer on how to generate the + * output audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TextToSpeechSettings text_to_speech_settings = 31; + * @return \Google\Cloud\Dialogflow\Cx\V3\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); + } + + /** + * Settings on instructing the speech synthesizer on how to generate the + * output audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TextToSpeechSettings text_to_speech_settings = 31; + * @param \Google\Cloud\Dialogflow\Cx\V3\TextToSpeechSettings $var + * @return $this + */ + public function setTextToSpeechSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TextToSpeechSettings::class); + $this->text_to_speech_settings = $var; + + return $this; + } + + /** + * Gen App Builder-related agent-level settings. + * + * Generated from protobuf field optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\GenAppBuilderSettings|null + */ + public function getGenAppBuilderSettings() + { + return $this->gen_app_builder_settings; + } + + public function hasGenAppBuilderSettings() + { + return isset($this->gen_app_builder_settings); + } + + public function clearGenAppBuilderSettings() + { + unset($this->gen_app_builder_settings); + } + + /** + * Gen App Builder-related agent-level settings. + * + * Generated from protobuf field optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; + * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\GenAppBuilderSettings $var + * @return $this + */ + public function setGenAppBuilderSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\GenAppBuilderSettings::class); + $this->gen_app_builder_settings = $var; + + return $this; + } + + /** + * Optional. Answer feedback collection settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\AnswerFeedbackSettings|null + */ + public function getAnswerFeedbackSettings() + { + return $this->answer_feedback_settings; + } + + public function hasAnswerFeedbackSettings() + { + return isset($this->answer_feedback_settings); + } + + public function clearAnswerFeedbackSettings() + { + unset($this->answer_feedback_settings); + } + + /** + * Optional. Answer feedback collection settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\AnswerFeedbackSettings $var + * @return $this + */ + public function setAnswerFeedbackSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\AnswerFeedbackSettings::class); + $this->answer_feedback_settings = $var; + + return $this; + } + + /** + * Optional. Settings for end user personalization. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings personalization_settings = 42 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\PersonalizationSettings|null + */ + public function getPersonalizationSettings() + { + return $this->personalization_settings; + } + + public function hasPersonalizationSettings() + { + return isset($this->personalization_settings); + } + + public function clearPersonalizationSettings() + { + unset($this->personalization_settings); + } + + /** + * Optional. Settings for end user personalization. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings personalization_settings = 42 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\PersonalizationSettings $var + * @return $this + */ + public function setPersonalizationSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\PersonalizationSettings::class); + $this->personalization_settings = $var; + + return $this; + } + + /** + * Optional. Settings for custom client certificates. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings client_certificate_settings = 43 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\ClientCertificateSettings|null + */ + public function getClientCertificateSettings() + { + return $this->client_certificate_settings; + } + + public function hasClientCertificateSettings() + { + return isset($this->client_certificate_settings); + } + + public function clearClientCertificateSettings() + { + unset($this->client_certificate_settings); + } + + /** + * Optional. Settings for custom client certificates. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings client_certificate_settings = 43 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\ClientCertificateSettings $var + * @return $this + */ + public function setClientCertificateSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\ClientCertificateSettings::class); + $this->client_certificate_settings = $var; + + return $this; + } + + /** + * Optional. Output only. A read only boolean field reflecting Zone Separation + * status of the agent. + * + * Generated from protobuf field optional bool satisfies_pzs = 45 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Optional. Output only. A read only boolean field reflecting Zone Separation + * status of the agent. + * + * Generated from protobuf field optional bool satisfies_pzs = 45 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Optional. Output only. A read only boolean field reflecting Zone Isolation + * status of the agent. + * + * Generated from protobuf field optional bool satisfies_pzi = 46 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; + } + + public function hasSatisfiesPzi() + { + return isset($this->satisfies_pzi); + } + + public function clearSatisfiesPzi() + { + unset($this->satisfies_pzi); + } + + /** + * Optional. Output only. A read only boolean field reflecting Zone Isolation + * status of the agent. + * + * Generated from protobuf field optional bool satisfies_pzi = 46 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + + /** + * @return string + */ + public function getSessionEntryResource() + { + return $this->whichOneof("session_entry_resource"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/AnswerFeedbackSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/AnswerFeedbackSettings.php new file mode 100644 index 000000000000..7678b7a237ec --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/AnswerFeedbackSettings.php @@ -0,0 +1,82 @@ +google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + */ +class AnswerFeedbackSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If enabled, end users will be able to provide + * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to + * Dialogflow responses. Feature works only if interaction logging is + * enabled in the Dialogflow agent. + * + * Generated from protobuf field bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_answer_feedback = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_answer_feedback + * Optional. If enabled, end users will be able to provide + * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to + * Dialogflow responses. Feature works only if interaction logging is + * enabled in the Dialogflow agent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If enabled, end users will be able to provide + * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to + * Dialogflow responses. Feature works only if interaction logging is + * enabled in the Dialogflow agent. + * + * Generated from protobuf field bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableAnswerFeedback() + { + return $this->enable_answer_feedback; + } + + /** + * Optional. If enabled, end users will be able to provide + * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to + * Dialogflow responses. Feature works only if interaction logging is + * enabled in the Dialogflow agent. + * + * Generated from protobuf field bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableAnswerFeedback($var) + { + GPBUtil::checkBool($var); + $this->enable_answer_feedback = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnswerFeedbackSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_AnswerFeedbackSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/ClientCertificateSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/ClientCertificateSettings.php new file mode 100644 index 000000000000..7b7ca20060bd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/ClientCertificateSettings.php @@ -0,0 +1,162 @@ +google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings + */ +class ClientCertificateSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ssl certificate encoded in PEM format. This string must + * include the begin header and end footer lines. + * + * Generated from protobuf field string ssl_certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ssl_certificate = ''; + /** + * Required. The name of the SecretManager secret version resource storing + * the private key encoded in PEM format. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string private_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $private_key = ''; + /** + * Optional. The name of the SecretManager secret version resource storing + * the passphrase. 'passphrase' should be left unset if the private key is + * not encrypted. + * Format: `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string passphrase = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $passphrase = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ssl_certificate + * Required. The ssl certificate encoded in PEM format. This string must + * include the begin header and end footer lines. + * @type string $private_key + * Required. The name of the SecretManager secret version resource storing + * the private key encoded in PEM format. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * @type string $passphrase + * Optional. The name of the SecretManager secret version resource storing + * the passphrase. 'passphrase' should be left unset if the private key is + * not encrypted. + * Format: `projects/{project}/secrets/{secret}/versions/{version}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ssl certificate encoded in PEM format. This string must + * include the begin header and end footer lines. + * + * Generated from protobuf field string ssl_certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSslCertificate() + { + return $this->ssl_certificate; + } + + /** + * Required. The ssl certificate encoded in PEM format. This string must + * include the begin header and end footer lines. + * + * Generated from protobuf field string ssl_certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSslCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ssl_certificate = $var; + + return $this; + } + + /** + * Required. The name of the SecretManager secret version resource storing + * the private key encoded in PEM format. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string private_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPrivateKey() + { + return $this->private_key; + } + + /** + * Required. The name of the SecretManager secret version resource storing + * the private key encoded in PEM format. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string private_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrivateKey($var) + { + GPBUtil::checkString($var, True); + $this->private_key = $var; + + return $this; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the passphrase. 'passphrase' should be left unset if the private key is + * not encrypted. + * Format: `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string passphrase = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getPassphrase() + { + return $this->passphrase; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the passphrase. 'passphrase' should be left unset if the private key is + * not encrypted. + * Format: `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string passphrase = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPassphrase($var) + { + GPBUtil::checkString($var, True); + $this->passphrase = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClientCertificateSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_ClientCertificateSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GenAppBuilderSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GenAppBuilderSettings.php new file mode 100644 index 000000000000..72d3f4fc9e83 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GenAppBuilderSettings.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings + */ +class GenAppBuilderSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the Gen App Builder engine related to this + * agent if there is one. Format: `projects/{Project ID}/locations/{Location + * ID}/collections/{Collection ID}/engines/{Engine ID}` + * + * Generated from protobuf field string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $engine = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $engine + * Required. The full name of the Gen App Builder engine related to this + * agent if there is one. Format: `projects/{Project ID}/locations/{Location + * ID}/collections/{Collection ID}/engines/{Engine ID}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the Gen App Builder engine related to this + * agent if there is one. Format: `projects/{Project ID}/locations/{Location + * ID}/collections/{Collection ID}/engines/{Engine ID}` + * + * Generated from protobuf field string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEngine() + { + return $this->engine; + } + + /** + * Required. The full name of the Gen App Builder engine related to this + * agent if there is one. Format: `projects/{Project ID}/locations/{Location + * ID}/collections/{Collection ID}/engines/{Engine ID}` + * + * Generated from protobuf field string engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEngine($var) + { + GPBUtil::checkString($var, True); + $this->engine = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GenAppBuilderSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_GenAppBuilderSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings.php new file mode 100644 index 000000000000..b4ae6e60e0f1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings + */ +class GitIntegrationSettings extends \Google\Protobuf\Internal\Message +{ + protected $git_settings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings\GithubSettings $github_settings + * GitHub settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * GitHub settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings.GithubSettings github_settings = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings\GithubSettings|null + */ + public function getGithubSettings() + { + return $this->readOneof(1); + } + + public function hasGithubSettings() + { + return $this->hasOneof(1); + } + + /** + * GitHub settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings.GithubSettings github_settings = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings\GithubSettings $var + * @return $this + */ + public function setGithubSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings\GithubSettings::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getGitSettings() + { + return $this->whichOneof("git_settings"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GitIntegrationSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_GitIntegrationSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings/GithubSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings/GithubSettings.php new file mode 100644 index 000000000000..99609724fb82 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings/GithubSettings.php @@ -0,0 +1,210 @@ +google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings.GithubSettings + */ +class GithubSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The unique repository display name for the GitHub repository. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The GitHub repository URI related to the agent. + * + * Generated from protobuf field string repository_uri = 2; + */ + protected $repository_uri = ''; + /** + * The branch of the GitHub repository tracked for this agent. + * + * Generated from protobuf field string tracking_branch = 3; + */ + protected $tracking_branch = ''; + /** + * The access token used to authenticate the access to the GitHub + * repository. + * + * Generated from protobuf field string access_token = 4; + */ + protected $access_token = ''; + /** + * A list of branches configured to be used from Dialogflow. + * + * Generated from protobuf field repeated string branches = 5; + */ + private $branches; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The unique repository display name for the GitHub repository. + * @type string $repository_uri + * The GitHub repository URI related to the agent. + * @type string $tracking_branch + * The branch of the GitHub repository tracked for this agent. + * @type string $access_token + * The access token used to authenticate the access to the GitHub + * repository. + * @type array|\Google\Protobuf\Internal\RepeatedField $branches + * A list of branches configured to be used from Dialogflow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * The unique repository display name for the GitHub repository. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The unique repository display name for the GitHub repository. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The GitHub repository URI related to the agent. + * + * Generated from protobuf field string repository_uri = 2; + * @return string + */ + public function getRepositoryUri() + { + return $this->repository_uri; + } + + /** + * The GitHub repository URI related to the agent. + * + * Generated from protobuf field string repository_uri = 2; + * @param string $var + * @return $this + */ + public function setRepositoryUri($var) + { + GPBUtil::checkString($var, True); + $this->repository_uri = $var; + + return $this; + } + + /** + * The branch of the GitHub repository tracked for this agent. + * + * Generated from protobuf field string tracking_branch = 3; + * @return string + */ + public function getTrackingBranch() + { + return $this->tracking_branch; + } + + /** + * The branch of the GitHub repository tracked for this agent. + * + * Generated from protobuf field string tracking_branch = 3; + * @param string $var + * @return $this + */ + public function setTrackingBranch($var) + { + GPBUtil::checkString($var, True); + $this->tracking_branch = $var; + + return $this; + } + + /** + * The access token used to authenticate the access to the GitHub + * repository. + * + * Generated from protobuf field string access_token = 4; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * The access token used to authenticate the access to the GitHub + * repository. + * + * Generated from protobuf field string access_token = 4; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + + /** + * A list of branches configured to be used from Dialogflow. + * + * Generated from protobuf field repeated string branches = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBranches() + { + return $this->branches; + } + + /** + * A list of branches configured to be used from Dialogflow. + * + * Generated from protobuf field repeated string branches = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBranches($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->branches = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GithubSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_GitIntegrationSettings_GithubSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/PersonalizationSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/PersonalizationSettings.php new file mode 100644 index 000000000000..863f4b4211b8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/PersonalizationSettings.php @@ -0,0 +1,108 @@ +google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings + */ +class PersonalizationSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Default end user metadata, used when processing DetectIntent + * requests. Recommended to be filled as a template instead of hard-coded + * value, for example { "age": "$session.params.age" }. The data will be + * merged with the + * [QueryParameters.end_user_metadata][google.cloud.dialogflow.cx.v3.QueryParameters.end_user_metadata] + * in + * [DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3.DetectIntentRequest.query_params] + * during query processing. + * + * Generated from protobuf field .google.protobuf.Struct default_end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_end_user_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $default_end_user_metadata + * Optional. Default end user metadata, used when processing DetectIntent + * requests. Recommended to be filled as a template instead of hard-coded + * value, for example { "age": "$session.params.age" }. The data will be + * merged with the + * [QueryParameters.end_user_metadata][google.cloud.dialogflow.cx.v3.QueryParameters.end_user_metadata] + * in + * [DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3.DetectIntentRequest.query_params] + * during query processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Default end user metadata, used when processing DetectIntent + * requests. Recommended to be filled as a template instead of hard-coded + * value, for example { "age": "$session.params.age" }. The data will be + * merged with the + * [QueryParameters.end_user_metadata][google.cloud.dialogflow.cx.v3.QueryParameters.end_user_metadata] + * in + * [DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3.DetectIntentRequest.query_params] + * during query processing. + * + * Generated from protobuf field .google.protobuf.Struct default_end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getDefaultEndUserMetadata() + { + return $this->default_end_user_metadata; + } + + public function hasDefaultEndUserMetadata() + { + return isset($this->default_end_user_metadata); + } + + public function clearDefaultEndUserMetadata() + { + unset($this->default_end_user_metadata); + } + + /** + * Optional. Default end user metadata, used when processing DetectIntent + * requests. Recommended to be filled as a template instead of hard-coded + * value, for example { "age": "$session.params.age" }. The data will be + * merged with the + * [QueryParameters.end_user_metadata][google.cloud.dialogflow.cx.v3.QueryParameters.end_user_metadata] + * in + * [DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3.DetectIntentRequest.query_params] + * during query processing. + * + * Generated from protobuf field .google.protobuf.Struct default_end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setDefaultEndUserMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->default_end_user_metadata = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PersonalizationSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_PersonalizationSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentUtterance.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentUtterance.php new file mode 100644 index 000000000000..a23064e32813 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentUtterance.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.cx.v3.AgentUtterance + */ +class AgentUtterance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Message content in text. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Required. Message content in text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. Message content in text. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. Message content in text. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentValidationResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentValidationResult.php new file mode 100644 index 000000000000..7ebeb05e766a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentValidationResult.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.AgentValidationResult + */ +class AgentValidationResult extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the agent validation result. + * Format: + * `projects//locations//agents//validationResult`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Contains all flow validation results. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + */ + private $flow_validation_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the agent validation result. + * Format: + * `projects//locations//agents//validationResult`. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\FlowValidationResult>|\Google\Protobuf\Internal\RepeatedField $flow_validation_results + * Contains all flow validation results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the agent validation result. + * Format: + * `projects//locations//agents//validationResult`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the agent validation result. + * Format: + * `projects//locations//agents//validationResult`. + * + * 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; + } + + /** + * Contains all flow validation results. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFlowValidationResults() + { + return $this->flow_validation_results; + } + + /** + * Contains all flow validation results. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\FlowValidationResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFlowValidationResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\FlowValidationResult::class); + $this->flow_validation_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback.php new file mode 100644 index 000000000000..ad47950eb76b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback.php @@ -0,0 +1,157 @@ +google.cloud.dialogflow.cx.v3.AnswerFeedback + */ +class AnswerFeedback extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Rating from user for the specific Dialogflow response. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rating = 0; + /** + * Optional. In case of thumbs down rating provided, users can optionally + * provide context about the rating. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rating_reason = null; + /** + * Optional. Custom rating from the user about the provided answer, with + * maximum length of 1024 characters. For example, client could use a + * customized JSON object to indicate the rating. + * + * Generated from protobuf field string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_rating = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $rating + * Optional. Rating from user for the specific Dialogflow response. + * @type \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback\RatingReason $rating_reason + * Optional. In case of thumbs down rating provided, users can optionally + * provide context about the rating. + * @type string $custom_rating + * Optional. Custom rating from the user about the provided answer, with + * maximum length of 1024 characters. For example, client could use a + * customized JSON object to indicate the rating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Rating from user for the specific Dialogflow response. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRating() + { + return $this->rating; + } + + /** + * Optional. Rating from user for the specific Dialogflow response. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRating($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback\Rating::class); + $this->rating = $var; + + return $this; + } + + /** + * Optional. In case of thumbs down rating provided, users can optionally + * provide context about the rating. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback\RatingReason|null + */ + public function getRatingReason() + { + return $this->rating_reason; + } + + public function hasRatingReason() + { + return isset($this->rating_reason); + } + + public function clearRatingReason() + { + unset($this->rating_reason); + } + + /** + * Optional. In case of thumbs down rating provided, users can optionally + * provide context about the rating. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback\RatingReason $var + * @return $this + */ + public function setRatingReason($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback\RatingReason::class); + $this->rating_reason = $var; + + return $this; + } + + /** + * Optional. Custom rating from the user about the provided answer, with + * maximum length of 1024 characters. For example, client could use a + * customized JSON object to indicate the rating. + * + * Generated from protobuf field string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCustomRating() + { + return $this->custom_rating; + } + + /** + * Optional. Custom rating from the user about the provided answer, with + * maximum length of 1024 characters. For example, client could use a + * customized JSON object to indicate the rating. + * + * Generated from protobuf field string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCustomRating($var) + { + GPBUtil::checkString($var, True); + $this->custom_rating = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/Rating.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/Rating.php new file mode 100644 index 000000000000..b7cbb5c4e384 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/Rating.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating + */ +class Rating +{ + /** + * Rating not specified. + * + * Generated from protobuf enum RATING_UNSPECIFIED = 0; + */ + const RATING_UNSPECIFIED = 0; + /** + * Thumbs up feedback from user. + * + * Generated from protobuf enum THUMBS_UP = 1; + */ + const THUMBS_UP = 1; + /** + * Thumbs down feedback from user. + * + * Generated from protobuf enum THUMBS_DOWN = 2; + */ + const THUMBS_DOWN = 2; + + private static $valueToName = [ + self::RATING_UNSPECIFIED => 'RATING_UNSPECIFIED', + self::THUMBS_UP => 'THUMBS_UP', + self::THUMBS_DOWN => 'THUMBS_DOWN', + ]; + + 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(Rating::class, \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback_Rating::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/RatingReason.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/RatingReason.php new file mode 100644 index 000000000000..8ce0dfab57bb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/RatingReason.php @@ -0,0 +1,116 @@ +google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + */ +class RatingReason extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Custom reason labels for thumbs down rating provided by the + * user. The maximum number of labels allowed is 10 and the maximum length + * of a single label is 128 characters. + * + * Generated from protobuf field repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $reason_labels; + /** + * Optional. Additional feedback about the rating. + * This field can be populated without choosing a predefined `reason`. + * + * Generated from protobuf field string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $feedback = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $reason_labels + * Optional. Custom reason labels for thumbs down rating provided by the + * user. The maximum number of labels allowed is 10 and the maximum length + * of a single label is 128 characters. + * @type string $feedback + * Optional. Additional feedback about the rating. + * This field can be populated without choosing a predefined `reason`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Custom reason labels for thumbs down rating provided by the + * user. The maximum number of labels allowed is 10 and the maximum length + * of a single label is 128 characters. + * + * Generated from protobuf field repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReasonLabels() + { + return $this->reason_labels; + } + + /** + * Optional. Custom reason labels for thumbs down rating provided by the + * user. The maximum number of labels allowed is 10 and the maximum length + * of a single label is 128 characters. + * + * Generated from protobuf field repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReasonLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->reason_labels = $arr; + + return $this; + } + + /** + * Optional. Additional feedback about the rating. + * This field can be populated without choosing a predefined `reason`. + * + * Generated from protobuf field string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFeedback() + { + return $this->feedback; + } + + /** + * Optional. Additional feedback about the rating. + * This field can be populated without choosing a predefined `reason`. + * + * Generated from protobuf field string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFeedback($var) + { + GPBUtil::checkString($var, True); + $this->feedback = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RatingReason::class, \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback_RatingReason::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioEncoding.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioEncoding.php new file mode 100644 index 000000000000..570bd291f896 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioEncoding.php @@ -0,0 +1,126 @@ +google.cloud.dialogflow.cx.v3.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). + * LINT: LEGACY_NAMES + * + * 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; + /** + * 8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law. + * + * Generated from protobuf enum AUDIO_ENCODING_ALAW = 8; + */ + const AUDIO_ENCODING_ALAW = 8; + + 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', + self::AUDIO_ENCODING_ALAW => 'AUDIO_ENCODING_ALAW', + ]; + + 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioInput.php new file mode 100644 index 000000000000..167a38437c9a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioInput.php @@ -0,0 +1,143 @@ +google.cloud.dialogflow.cx.v3.AudioInput + */ +class AudioInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Instructs the speech recognizer how to process the speech audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InputAudioConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $config = null; + /** + * The natural language speech audio to be processed. + * A single request can contain up to 2 minutes of speech audio data. + * The [transcribed + * text][google.cloud.dialogflow.cx.v3.QueryResult.transcript] cannot contain + * more than 256 bytes. + * For non-streaming audio detect intent, both `config` and `audio` must be + * provided. + * For streaming audio detect intent, `config` must be provided in + * the first request and `audio` must be provided in all following requests. + * + * Generated from protobuf field bytes audio = 2; + */ + protected $audio = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig $config + * Required. Instructs the speech recognizer how to process the speech audio. + * @type string $audio + * The natural language speech audio to be processed. + * A single request can contain up to 2 minutes of speech audio data. + * The [transcribed + * text][google.cloud.dialogflow.cx.v3.QueryResult.transcript] cannot contain + * more than 256 bytes. + * For non-streaming audio detect intent, both `config` and `audio` must be + * provided. + * For streaming audio detect intent, `config` must be provided in + * the first request and `audio` must be provided in all following requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Required. Instructs the speech recognizer how to process the speech audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InputAudioConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Required. Instructs the speech recognizer how to process the speech audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InputAudioConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig::class); + $this->config = $var; + + return $this; + } + + /** + * The natural language speech audio to be processed. + * A single request can contain up to 2 minutes of speech audio data. + * The [transcribed + * text][google.cloud.dialogflow.cx.v3.QueryResult.transcript] cannot contain + * more than 256 bytes. + * For non-streaming audio detect intent, both `config` and `audio` must be + * provided. + * For streaming audio detect intent, `config` must be provided in + * the first request and `audio` must be provided in all following requests. + * + * Generated from protobuf field bytes audio = 2; + * @return string + */ + public function getAudio() + { + return $this->audio; + } + + /** + * The natural language speech audio to be processed. + * A single request can contain up to 2 minutes of speech audio data. + * The [transcribed + * text][google.cloud.dialogflow.cx.v3.QueryResult.transcript] cannot contain + * more than 256 bytes. + * For non-streaming audio detect intent, both `config` and `audio` must be + * provided. + * For streaming audio detect intent, `config` must be provided in + * the first request and `audio` must be provided in all following requests. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BargeInConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BargeInConfig.php new file mode 100644 index 000000000000..52d0662273ce --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BargeInConfig.php @@ -0,0 +1,143 @@ +google.cloud.dialogflow.cx.v3.BargeInConfig + */ +class BargeInConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Duration that is not eligible for barge-in at the beginning of the input + * audio. + * + * Generated from protobuf field .google.protobuf.Duration no_barge_in_duration = 1; + */ + protected $no_barge_in_duration = null; + /** + * Total duration for the playback at the beginning of the input audio. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 2; + */ + protected $total_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $no_barge_in_duration + * Duration that is not eligible for barge-in at the beginning of the input + * audio. + * @type \Google\Protobuf\Duration $total_duration + * Total duration for the playback at the beginning of the input audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * Duration that is not eligible for barge-in at the beginning of the input + * audio. + * + * Generated from protobuf field .google.protobuf.Duration no_barge_in_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getNoBargeInDuration() + { + return $this->no_barge_in_duration; + } + + public function hasNoBargeInDuration() + { + return isset($this->no_barge_in_duration); + } + + public function clearNoBargeInDuration() + { + unset($this->no_barge_in_duration); + } + + /** + * Duration that is not eligible for barge-in at the beginning of the input + * audio. + * + * Generated from protobuf field .google.protobuf.Duration no_barge_in_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setNoBargeInDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->no_barge_in_duration = $var; + + return $this; + } + + /** + * Total duration for the playback at the beginning of the input audio. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalDuration() + { + return $this->total_duration; + } + + public function hasTotalDuration() + { + return isset($this->total_duration); + } + + public function clearTotalDuration() + { + unset($this->total_duration); + } + + /** + * Total duration for the playback at the beginning of the input audio. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchDeleteTestCasesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchDeleteTestCasesRequest.php new file mode 100644 index 000000000000..22fcf3ee8005 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchDeleteTestCasesRequest.php @@ -0,0 +1,125 @@ +google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest + */ +class BatchDeleteTestCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to delete test cases from. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Format of test case names: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. The agent to delete test cases from. + * Format: `projects//locations//agents/`. Please see + * {@see TestCasesClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\BatchDeleteTestCasesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to delete test cases from. + * Format: `projects//locations//agents/`. + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. Format of test case names: + * `projects//locations//agents//testCases/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to delete test cases from. + * Format: `projects//locations//agents/`. + * + * 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 delete test cases from. + * Format: `projects//locations//agents/`. + * + * 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. Format of test case names: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. Format of test case names: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesMetadata.php new file mode 100644 index 000000000000..06cd870d8e94 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesMetadata.php @@ -0,0 +1,69 @@ +google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + */ +class BatchRunTestCasesMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The test errors. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $errors + * The test errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The test errors. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * The test errors. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesRequest.php new file mode 100644 index 000000000000..32eb0e37f997 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesRequest.php @@ -0,0 +1,148 @@ +google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest + */ +class BatchRunTestCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Agent name. Format: + * `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. If not set, draft environment is assumed. Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $environment = ''; + /** + * Required. Format: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $test_cases; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Agent name. Format: + * `projects//locations//agents/`. + * @type string $environment + * Optional. If not set, draft environment is assumed. Format: + * `projects//locations//agents//environments/`. + * @type array|\Google\Protobuf\Internal\RepeatedField $test_cases + * Required. Format: + * `projects//locations//agents//testCases/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. Agent name. Format: + * `projects//locations//agents/`. + * + * 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. Agent name. Format: + * `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. If not set, draft environment is assumed. Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Optional. If not set, draft environment is assumed. Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + + /** + * Required. Format: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTestCases() + { + return $this->test_cases; + } + + /** + * Required. Format: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTestCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->test_cases = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesResponse.php new file mode 100644 index 000000000000..78f84cda38a6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesResponse.php @@ -0,0 +1,80 @@ +google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + */ +class BatchRunTestCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The test case results. The detailed + * [conversation + * turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are + * empty in this response. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + */ + private $results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestCaseResult>|\Google\Protobuf\Internal\RepeatedField $results + * The test case results. The detailed + * [conversation + * turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are + * empty in this response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The test case results. The detailed + * [conversation + * turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are + * empty in this response. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * The test case results. The detailed + * [conversation + * turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are + * empty in this response. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestCaseResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec.php new file mode 100644 index 000000000000..2587f10a4e7b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec.php @@ -0,0 +1,82 @@ +google.cloud.dialogflow.cx.v3.BoostSpec + */ +class BoostSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Condition boost specifications. If a document matches multiple + * conditions in the specifications, boost scores from these specifications + * are all applied and combined in a non-linear way. Maximum number of + * specifications is 20. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $condition_boost_specs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec>|\Google\Protobuf\Internal\RepeatedField $condition_boost_specs + * Optional. Condition boost specifications. If a document matches multiple + * conditions in the specifications, boost scores from these specifications + * are all applied and combined in a non-linear way. Maximum number of + * specifications is 20. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Condition boost specifications. If a document matches multiple + * conditions in the specifications, boost scores from these specifications + * are all applied and combined in a non-linear way. Maximum number of + * specifications is 20. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditionBoostSpecs() + { + return $this->condition_boost_specs; + } + + /** + * Optional. Condition boost specifications. If a document matches multiple + * conditions in the specifications, boost scores from these specifications + * are all applied and combined in a non-linear way. Maximum number of + * specifications is 20. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditionBoostSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec::class); + $this->condition_boost_specs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec.php new file mode 100644 index 000000000000..c0742747fc32 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec.php @@ -0,0 +1,228 @@ +google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + */ +class ConditionBoostSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. An expression which specifies a boost condition. The syntax and + * supported fields are the same as a filter expression. + * Examples: + * * To boost documents with document ID "doc_1" or "doc_2", and + * color + * "Red" or "Blue": + * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * + * Generated from protobuf field string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $condition = ''; + /** + * Optional. Strength of the condition boost, which should be in [-1, 1]. + * Negative boost means demotion. Default is 0.0. + * Setting to 1.0 gives the document a big promotion. However, it does not + * necessarily mean that the boosted document will be the top result at + * all times, nor that other documents will be excluded. Results could + * still be shown even when none of them matches the condition. And + * results that are significantly more relevant to the search query can + * still trump your heavily favored but irrelevant documents. + * Setting to -1.0 gives the document a big demotion. However, results + * that are deeply relevant might still be shown. The document will have + * an upstream battle to get a fairly high ranking, but it is not blocked + * out completely. + * Setting to 0.0 means no boost applied. The boosting condition is + * ignored. + * + * Generated from protobuf field float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boost = 0.0; + /** + * Optional. Complex specification for custom ranking based on customer + * defined attribute value. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boost_control_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $condition + * Optional. An expression which specifies a boost condition. The syntax and + * supported fields are the same as a filter expression. + * Examples: + * * To boost documents with document ID "doc_1" or "doc_2", and + * color + * "Red" or "Blue": + * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * @type float $boost + * Optional. Strength of the condition boost, which should be in [-1, 1]. + * Negative boost means demotion. Default is 0.0. + * Setting to 1.0 gives the document a big promotion. However, it does not + * necessarily mean that the boosted document will be the top result at + * all times, nor that other documents will be excluded. Results could + * still be shown even when none of them matches the condition. And + * results that are significantly more relevant to the search query can + * still trump your heavily favored but irrelevant documents. + * Setting to -1.0 gives the document a big demotion. However, results + * that are deeply relevant might still be shown. The document will have + * an upstream battle to get a fairly high ranking, but it is not blocked + * out completely. + * Setting to 0.0 means no boost applied. The boosting condition is + * ignored. + * @type \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec $boost_control_spec + * Optional. Complex specification for custom ranking based on customer + * defined attribute value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Optional. An expression which specifies a boost condition. The syntax and + * supported fields are the same as a filter expression. + * Examples: + * * To boost documents with document ID "doc_1" or "doc_2", and + * color + * "Red" or "Blue": + * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * + * Generated from protobuf field string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * Optional. An expression which specifies a boost condition. The syntax and + * supported fields are the same as a filter expression. + * Examples: + * * To boost documents with document ID "doc_1" or "doc_2", and + * color + * "Red" or "Blue": + * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * + * Generated from protobuf field string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkString($var, True); + $this->condition = $var; + + return $this; + } + + /** + * Optional. Strength of the condition boost, which should be in [-1, 1]. + * Negative boost means demotion. Default is 0.0. + * Setting to 1.0 gives the document a big promotion. However, it does not + * necessarily mean that the boosted document will be the top result at + * all times, nor that other documents will be excluded. Results could + * still be shown even when none of them matches the condition. And + * results that are significantly more relevant to the search query can + * still trump your heavily favored but irrelevant documents. + * Setting to -1.0 gives the document a big demotion. However, results + * that are deeply relevant might still be shown. The document will have + * an upstream battle to get a fairly high ranking, but it is not blocked + * out completely. + * Setting to 0.0 means no boost applied. The boosting condition is + * ignored. + * + * Generated from protobuf field float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getBoost() + { + return $this->boost; + } + + /** + * Optional. Strength of the condition boost, which should be in [-1, 1]. + * Negative boost means demotion. Default is 0.0. + * Setting to 1.0 gives the document a big promotion. However, it does not + * necessarily mean that the boosted document will be the top result at + * all times, nor that other documents will be excluded. Results could + * still be shown even when none of them matches the condition. And + * results that are significantly more relevant to the search query can + * still trump your heavily favored but irrelevant documents. + * Setting to -1.0 gives the document a big demotion. However, results + * that are deeply relevant might still be shown. The document will have + * an upstream battle to get a fairly high ranking, but it is not blocked + * out completely. + * Setting to 0.0 means no boost applied. The boosting condition is + * ignored. + * + * Generated from protobuf field float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setBoost($var) + { + GPBUtil::checkFloat($var); + $this->boost = $var; + + return $this; + } + + /** + * Optional. Complex specification for custom ranking based on customer + * defined attribute value. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec|null + */ + public function getBoostControlSpec() + { + return $this->boost_control_spec; + } + + public function hasBoostControlSpec() + { + return isset($this->boost_control_spec); + } + + public function clearBoostControlSpec() + { + unset($this->boost_control_spec); + } + + /** + * Optional. Complex specification for custom ranking based on customer + * defined attribute value. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec $var + * @return $this + */ + public function setBoostControlSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec::class); + $this->boost_control_spec = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConditionBoostSpec::class, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec_ConditionBoostSpec::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec.php new file mode 100644 index 000000000000..a9b030a3a1b3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec.php @@ -0,0 +1,206 @@ +google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + */ +class BoostControlSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The name of the field whose value will be used to determine + * the boost amount. + * + * Generated from protobuf field string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $field_name = ''; + /** + * Optional. The attribute type to be used to determine the boost amount. + * The attribute value can be derived from the field value of the + * specified field_name. In the case of numerical it is straightforward + * i.e. attribute_value = numerical_field_value. In the case of freshness + * however, attribute_value = (time.now() - datetime_field_value). + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $attribute_type = 0; + /** + * Optional. The interpolation type to be applied to connect the control + * points listed below. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $interpolation_type = 0; + /** + * Optional. The control points used to define the curve. The monotonic + * function (defined through the interpolation_type above) passes through + * the control points listed here. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $control_points; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_name + * Optional. The name of the field whose value will be used to determine + * the boost amount. + * @type int $attribute_type + * Optional. The attribute type to be used to determine the boost amount. + * The attribute value can be derived from the field value of the + * specified field_name. In the case of numerical it is straightforward + * i.e. attribute_value = numerical_field_value. In the case of freshness + * however, attribute_value = (time.now() - datetime_field_value). + * @type int $interpolation_type + * Optional. The interpolation type to be applied to connect the control + * points listed below. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec\ControlPoint>|\Google\Protobuf\Internal\RepeatedField $control_points + * Optional. The control points used to define the curve. The monotonic + * function (defined through the interpolation_type above) passes through + * the control points listed here. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The name of the field whose value will be used to determine + * the boost amount. + * + * Generated from protobuf field string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * Optional. The name of the field whose value will be used to determine + * the boost amount. + * + * Generated from protobuf field string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + + /** + * Optional. The attribute type to be used to determine the boost amount. + * The attribute value can be derived from the field value of the + * specified field_name. In the case of numerical it is straightforward + * i.e. attribute_value = numerical_field_value. In the case of freshness + * however, attribute_value = (time.now() - datetime_field_value). + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAttributeType() + { + return $this->attribute_type; + } + + /** + * Optional. The attribute type to be used to determine the boost amount. + * The attribute value can be derived from the field value of the + * specified field_name. In the case of numerical it is straightforward + * i.e. attribute_value = numerical_field_value. In the case of freshness + * however, attribute_value = (time.now() - datetime_field_value). + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAttributeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec\AttributeType::class); + $this->attribute_type = $var; + + return $this; + } + + /** + * Optional. The interpolation type to be applied to connect the control + * points listed below. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getInterpolationType() + { + return $this->interpolation_type; + } + + /** + * Optional. The interpolation type to be applied to connect the control + * points listed below. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setInterpolationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec\InterpolationType::class); + $this->interpolation_type = $var; + + return $this; + } + + /** + * Optional. The control points used to define the curve. The monotonic + * function (defined through the interpolation_type above) passes through + * the control points listed here. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getControlPoints() + { + return $this->control_points; + } + + /** + * Optional. The control points used to define the curve. The monotonic + * function (defined through the interpolation_type above) passes through + * the control points listed here. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec\ControlPoint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setControlPoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec\ControlPoint::class); + $this->control_points = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BoostControlSpec::class, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec_ConditionBoostSpec_BoostControlSpec::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php new file mode 100644 index 000000000000..07123dde6d84 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php @@ -0,0 +1,73 @@ +google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType + */ +class AttributeType +{ + /** + * Unspecified AttributeType. + * + * Generated from protobuf enum ATTRIBUTE_TYPE_UNSPECIFIED = 0; + */ + const ATTRIBUTE_TYPE_UNSPECIFIED = 0; + /** + * The value of the numerical field will be used to dynamically update + * the boost amount. In this case, the attribute_value (the x value) + * of the control point will be the actual value of the numerical + * field for which the boost_amount is specified. + * + * Generated from protobuf enum NUMERICAL = 1; + */ + const NUMERICAL = 1; + /** + * For the freshness use case the attribute value will be the duration + * between the current time and the date in the datetime field + * specified. The value must be formatted as an XSD `dayTimeDuration` + * value (a restricted subset of an ISO 8601 duration value). The + * pattern for this is: `[nD][T[nH][nM][nS]]`. + * E.g. `5D`, `3DT12H30M`, `T24H`. + * + * Generated from protobuf enum FRESHNESS = 2; + */ + const FRESHNESS = 2; + + private static $valueToName = [ + self::ATTRIBUTE_TYPE_UNSPECIFIED => 'ATTRIBUTE_TYPE_UNSPECIFIED', + self::NUMERICAL => 'NUMERICAL', + self::FRESHNESS => 'FRESHNESS', + ]; + + 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(AttributeType::class, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec_ConditionBoostSpec_BoostControlSpec_AttributeType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php new file mode 100644 index 000000000000..ca2b214184c1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php @@ -0,0 +1,130 @@ +google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + */ +class ControlPoint extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Can be one of: + * 1. The numerical field value. + * 2. The duration spec for freshness: + * The value must be formatted as an XSD `dayTimeDuration` value (a + * restricted subset of an ISO 8601 duration value). The pattern for + * this is: `[nD][T[nH][nM][nS]]`. + * + * Generated from protobuf field string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $attribute_value = ''; + /** + * Optional. The value between -1 to 1 by which to boost the score if + * the attribute_value evaluates to the value specified above. + * + * Generated from protobuf field float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boost_amount = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $attribute_value + * Optional. Can be one of: + * 1. The numerical field value. + * 2. The duration spec for freshness: + * The value must be formatted as an XSD `dayTimeDuration` value (a + * restricted subset of an ISO 8601 duration value). The pattern for + * this is: `[nD][T[nH][nM][nS]]`. + * @type float $boost_amount + * Optional. The value between -1 to 1 by which to boost the score if + * the attribute_value evaluates to the value specified above. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Can be one of: + * 1. The numerical field value. + * 2. The duration spec for freshness: + * The value must be formatted as an XSD `dayTimeDuration` value (a + * restricted subset of an ISO 8601 duration value). The pattern for + * this is: `[nD][T[nH][nM][nS]]`. + * + * Generated from protobuf field string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAttributeValue() + { + return $this->attribute_value; + } + + /** + * Optional. Can be one of: + * 1. The numerical field value. + * 2. The duration spec for freshness: + * The value must be formatted as an XSD `dayTimeDuration` value (a + * restricted subset of an ISO 8601 duration value). The pattern for + * this is: `[nD][T[nH][nM][nS]]`. + * + * Generated from protobuf field string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAttributeValue($var) + { + GPBUtil::checkString($var, True); + $this->attribute_value = $var; + + return $this; + } + + /** + * Optional. The value between -1 to 1 by which to boost the score if + * the attribute_value evaluates to the value specified above. + * + * Generated from protobuf field float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getBoostAmount() + { + return $this->boost_amount; + } + + /** + * Optional. The value between -1 to 1 by which to boost the score if + * the attribute_value evaluates to the value specified above. + * + * Generated from protobuf field float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setBoostAmount($var) + { + GPBUtil::checkFloat($var); + $this->boost_amount = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ControlPoint::class, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php new file mode 100644 index 000000000000..0edab677b13f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php @@ -0,0 +1,59 @@ +google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType + */ +class InterpolationType +{ + /** + * Interpolation type is unspecified. In this case, it defaults to + * Linear. + * + * Generated from protobuf enum INTERPOLATION_TYPE_UNSPECIFIED = 0; + */ + const INTERPOLATION_TYPE_UNSPECIFIED = 0; + /** + * Piecewise linear interpolation will be applied. + * + * Generated from protobuf enum LINEAR = 1; + */ + const LINEAR = 1; + + private static $valueToName = [ + self::INTERPOLATION_TYPE_UNSPECIFIED => 'INTERPOLATION_TYPE_UNSPECIFIED', + self::LINEAR => 'LINEAR', + ]; + + 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(InterpolationType::class, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec_ConditionBoostSpec_BoostControlSpec_InterpolationType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpecs.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpecs.php new file mode 100644 index 000000000000..ca0aab076989 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpecs.php @@ -0,0 +1,113 @@ +google.cloud.dialogflow.cx.v3.BoostSpecs + */ +class BoostSpecs extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Data Stores where the boosting configuration is applied. The full + * names of the referenced data stores. Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * + * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $data_stores; + /** + * Optional. A list of boosting specifications. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $data_stores + * Optional. Data Stores where the boosting configuration is applied. The full + * names of the referenced data stores. Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * @type array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec>|\Google\Protobuf\Internal\RepeatedField $spec + * Optional. A list of boosting specifications. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Data Stores where the boosting configuration is applied. The full + * names of the referenced data stores. Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * + * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataStores() + { + return $this->data_stores; + } + + /** + * Optional. Data Stores where the boosting configuration is applied. The full + * names of the referenced data stores. Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * + * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataStores($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_stores = $arr; + + return $this; + } + + /** + * Optional. A list of boosting specifications. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpec() + { + return $this->spec; + } + + /** + * Optional. A list of boosting specifications. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpec($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec::class); + $this->spec = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest.php new file mode 100644 index 000000000000..0ae4b3ac2b13 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest.php @@ -0,0 +1,106 @@ +google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + */ +class CalculateCoverageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to calculate coverage for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $agent = ''; + /** + * Required. The type of coverage requested. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $agent + * Required. The agent to calculate coverage for. + * Format: `projects//locations//agents/`. + * @type int $type + * Required. The type of coverage requested. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to calculate coverage for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAgent() + { + return $this->agent; + } + + /** + * Required. The agent to calculate coverage for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string agent = 3 [(.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; + } + + /** + * Required. The type of coverage requested. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of coverage requested. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\CalculateCoverageRequest\CoverageType::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest/CoverageType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest/CoverageType.php new file mode 100644 index 000000000000..afad224f93cb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest/CoverageType.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType + */ +class CoverageType +{ + /** + * Should never be used. + * + * Generated from protobuf enum COVERAGE_TYPE_UNSPECIFIED = 0; + */ + const COVERAGE_TYPE_UNSPECIFIED = 0; + /** + * Intent coverage. + * + * Generated from protobuf enum INTENT = 1; + */ + const INTENT = 1; + /** + * Page transition coverage. + * + * Generated from protobuf enum PAGE_TRANSITION = 2; + */ + const PAGE_TRANSITION = 2; + /** + * Transition route group coverage. + * + * Generated from protobuf enum TRANSITION_ROUTE_GROUP = 3; + */ + const TRANSITION_ROUTE_GROUP = 3; + + private static $valueToName = [ + self::COVERAGE_TYPE_UNSPECIFIED => 'COVERAGE_TYPE_UNSPECIFIED', + self::INTENT => 'INTENT', + self::PAGE_TRANSITION => 'PAGE_TRANSITION', + self::TRANSITION_ROUTE_GROUP => 'TRANSITION_ROUTE_GROUP', + ]; + + 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(CoverageType::class, \Google\Cloud\Dialogflow\Cx\V3\CalculateCoverageRequest_CoverageType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageResponse.php new file mode 100644 index 000000000000..9c933eaecdf5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageResponse.php @@ -0,0 +1,180 @@ +google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + */ +class CalculateCoverageResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The agent to calculate coverage for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string agent = 5 [(.google.api.resource_reference) = { + */ + protected $agent = ''; + protected $coverage_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $agent + * The agent to calculate coverage for. + * Format: `projects//locations//agents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage $intent_coverage + * Intent coverage. + * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage $transition_coverage + * Transition (excluding transition route groups) coverage. + * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage $route_group_coverage + * Transition route group coverage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The agent to calculate coverage for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string agent = 5 [(.google.api.resource_reference) = { + * @return string + */ + public function getAgent() + { + return $this->agent; + } + + /** + * The agent to calculate coverage for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string agent = 5 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAgent($var) + { + GPBUtil::checkString($var, True); + $this->agent = $var; + + return $this; + } + + /** + * Intent coverage. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage|null + */ + public function getIntentCoverage() + { + return $this->readOneof(2); + } + + public function hasIntentCoverage() + { + return $this->hasOneof(2); + } + + /** + * Intent coverage. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage $var + * @return $this + */ + public function setIntentCoverage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Transition (excluding transition route groups) coverage. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage|null + */ + public function getTransitionCoverage() + { + return $this->readOneof(4); + } + + public function hasTransitionCoverage() + { + return $this->hasOneof(4); + } + + /** + * Transition (excluding transition route groups) coverage. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage $var + * @return $this + */ + public function setTransitionCoverage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Transition route group coverage. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage|null + */ + public function getRouteGroupCoverage() + { + return $this->readOneof(6); + } + + public function hasRouteGroupCoverage() + { + return $this->hasOneof(6); + } + + /** + * Transition route group coverage. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage $var + * @return $this + */ + public function setRouteGroupCoverage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getCoverageType() + { + return $this->whichOneof("coverage_type"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Changelog.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Changelog.php new file mode 100644 index 000000000000..01b9f8e84c48 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Changelog.php @@ -0,0 +1,323 @@ +google.cloud.dialogflow.cx.v3.Changelog + */ +class Changelog extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the changelog. + * Format: + * `projects//locations//agents//changelogs/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Email address of the authenticated user. + * + * Generated from protobuf field string user_email = 2; + */ + protected $user_email = ''; + /** + * The affected resource display name of the change. + * + * Generated from protobuf field string display_name = 7; + */ + protected $display_name = ''; + /** + * The action of the change. + * + * Generated from protobuf field string action = 11; + */ + protected $action = ''; + /** + * The affected resource type. + * + * Generated from protobuf field string type = 8; + */ + protected $type = ''; + /** + * The affected resource name of the change. + * + * Generated from protobuf field string resource = 3; + */ + protected $resource = ''; + /** + * The timestamp of the change. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + */ + protected $create_time = null; + /** + * The affected language code of the change. + * + * Generated from protobuf field string language_code = 14; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the changelog. + * Format: + * `projects//locations//agents//changelogs/`. + * @type string $user_email + * Email address of the authenticated user. + * @type string $display_name + * The affected resource display name of the change. + * @type string $action + * The action of the change. + * @type string $type + * The affected resource type. + * @type string $resource + * The affected resource name of the change. + * @type \Google\Protobuf\Timestamp $create_time + * The timestamp of the change. + * @type string $language_code + * The affected language code of the change. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Changelog::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the changelog. + * Format: + * `projects//locations//agents//changelogs/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the changelog. + * Format: + * `projects//locations//agents//changelogs/`. + * + * 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; + } + + /** + * Email address of the authenticated user. + * + * Generated from protobuf field string user_email = 2; + * @return string + */ + public function getUserEmail() + { + return $this->user_email; + } + + /** + * Email address of the authenticated user. + * + * Generated from protobuf field string user_email = 2; + * @param string $var + * @return $this + */ + public function setUserEmail($var) + { + GPBUtil::checkString($var, True); + $this->user_email = $var; + + return $this; + } + + /** + * The affected resource display name of the change. + * + * Generated from protobuf field string display_name = 7; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The affected resource display name of the change. + * + * Generated from protobuf field string display_name = 7; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The action of the change. + * + * Generated from protobuf field string action = 11; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * The action of the change. + * + * Generated from protobuf field string action = 11; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + + /** + * The affected resource type. + * + * Generated from protobuf field string type = 8; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The affected resource type. + * + * Generated from protobuf field string type = 8; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * The affected resource name of the change. + * + * Generated from protobuf field string resource = 3; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * The affected resource name of the change. + * + * Generated from protobuf field string resource = 3; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * The timestamp of the change. + * + * 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); + } + + /** + * The timestamp of the change. + * + * 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; + } + + /** + * The affected language code of the change. + * + * Generated from protobuf field string language_code = 14; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The affected language code of the change. + * + * Generated from protobuf field string language_code = 14; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CloudConversationDebuggingInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CloudConversationDebuggingInfo.php new file mode 100644 index 000000000000..3710ba340be3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CloudConversationDebuggingInfo.php @@ -0,0 +1,750 @@ +google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + */ +class CloudConversationDebuggingInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Number of input audio data chunks in streaming requests. + * + * Generated from protobuf field int32 audio_data_chunks = 1; + */ + protected $audio_data_chunks = 0; + /** + * Time offset of the end of speech utterance relative to the + * beginning of the first audio chunk. + * + * Generated from protobuf field .google.protobuf.Duration result_end_time_offset = 2; + */ + protected $result_end_time_offset = null; + /** + * Duration of first audio chunk. + * + * Generated from protobuf field .google.protobuf.Duration first_audio_duration = 3; + */ + protected $first_audio_duration = null; + /** + * Whether client used single utterance mode. + * + * Generated from protobuf field bool single_utterance = 5; + */ + protected $single_utterance = false; + /** + * Time offsets of the speech partial results relative to the beginning of + * the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration speech_partial_results_end_times = 6; + */ + private $speech_partial_results_end_times; + /** + * Time offsets of the speech final results (is_final=true) relative to the + * beginning of the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration speech_final_results_end_times = 7; + */ + private $speech_final_results_end_times; + /** + * Total number of partial responses. + * + * Generated from protobuf field int32 partial_responses = 8; + */ + protected $partial_responses = 0; + /** + * Time offset of Speaker ID stream close time relative to the Speech stream + * close time in milliseconds. Only meaningful for conversations involving + * passive verification. + * + * Generated from protobuf field int32 speaker_id_passive_latency_ms_offset = 9; + */ + protected $speaker_id_passive_latency_ms_offset = 0; + /** + * Whether a barge-in event is triggered in this request. + * + * Generated from protobuf field bool bargein_event_triggered = 10; + */ + protected $bargein_event_triggered = false; + /** + * Whether speech uses single utterance mode. + * + * Generated from protobuf field bool speech_single_utterance = 11; + */ + protected $speech_single_utterance = false; + /** + * Time offsets of the DTMF partial results relative to the beginning of + * the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration dtmf_partial_results_times = 12; + */ + private $dtmf_partial_results_times; + /** + * Time offsets of the DTMF final results relative to the beginning of + * the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration dtmf_final_results_times = 13; + */ + private $dtmf_final_results_times; + /** + * Time offset of the end-of-single-utterance signal relative to the + * beginning of the stream. + * + * Generated from protobuf field .google.protobuf.Duration single_utterance_end_time_offset = 14; + */ + protected $single_utterance_end_time_offset = null; + /** + * No speech timeout settings for the stream. + * + * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 15; + */ + protected $no_speech_timeout = null; + /** + * Speech endpointing timeout settings for the stream. + * + * Generated from protobuf field .google.protobuf.Duration endpointing_timeout = 19; + */ + protected $endpointing_timeout = null; + /** + * Whether the streaming terminates with an injected text query. + * + * Generated from protobuf field bool is_input_text = 16; + */ + protected $is_input_text = false; + /** + * Client half close time in terms of input audio duration. + * + * Generated from protobuf field .google.protobuf.Duration client_half_close_time_offset = 17; + */ + protected $client_half_close_time_offset = null; + /** + * Client half close time in terms of API streaming duration. + * + * Generated from protobuf field .google.protobuf.Duration client_half_close_streaming_time_offset = 18; + */ + protected $client_half_close_streaming_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $audio_data_chunks + * Number of input audio data chunks in streaming requests. + * @type \Google\Protobuf\Duration $result_end_time_offset + * Time offset of the end of speech utterance relative to the + * beginning of the first audio chunk. + * @type \Google\Protobuf\Duration $first_audio_duration + * Duration of first audio chunk. + * @type bool $single_utterance + * Whether client used single utterance mode. + * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $speech_partial_results_end_times + * Time offsets of the speech partial results relative to the beginning of + * the stream. + * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $speech_final_results_end_times + * Time offsets of the speech final results (is_final=true) relative to the + * beginning of the stream. + * @type int $partial_responses + * Total number of partial responses. + * @type int $speaker_id_passive_latency_ms_offset + * Time offset of Speaker ID stream close time relative to the Speech stream + * close time in milliseconds. Only meaningful for conversations involving + * passive verification. + * @type bool $bargein_event_triggered + * Whether a barge-in event is triggered in this request. + * @type bool $speech_single_utterance + * Whether speech uses single utterance mode. + * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $dtmf_partial_results_times + * Time offsets of the DTMF partial results relative to the beginning of + * the stream. + * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $dtmf_final_results_times + * Time offsets of the DTMF final results relative to the beginning of + * the stream. + * @type \Google\Protobuf\Duration $single_utterance_end_time_offset + * Time offset of the end-of-single-utterance signal relative to the + * beginning of the stream. + * @type \Google\Protobuf\Duration $no_speech_timeout + * No speech timeout settings for the stream. + * @type \Google\Protobuf\Duration $endpointing_timeout + * Speech endpointing timeout settings for the stream. + * @type bool $is_input_text + * Whether the streaming terminates with an injected text query. + * @type \Google\Protobuf\Duration $client_half_close_time_offset + * Client half close time in terms of input audio duration. + * @type \Google\Protobuf\Duration $client_half_close_streaming_time_offset + * Client half close time in terms of API streaming duration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Number of input audio data chunks in streaming requests. + * + * Generated from protobuf field int32 audio_data_chunks = 1; + * @return int + */ + public function getAudioDataChunks() + { + return $this->audio_data_chunks; + } + + /** + * Number of input audio data chunks in streaming requests. + * + * Generated from protobuf field int32 audio_data_chunks = 1; + * @param int $var + * @return $this + */ + public function setAudioDataChunks($var) + { + GPBUtil::checkInt32($var); + $this->audio_data_chunks = $var; + + return $this; + } + + /** + * Time offset of the end of speech utterance relative to the + * beginning of the first audio chunk. + * + * Generated from protobuf field .google.protobuf.Duration result_end_time_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getResultEndTimeOffset() + { + return $this->result_end_time_offset; + } + + public function hasResultEndTimeOffset() + { + return isset($this->result_end_time_offset); + } + + public function clearResultEndTimeOffset() + { + unset($this->result_end_time_offset); + } + + /** + * Time offset of the end of speech utterance relative to the + * beginning of the first audio chunk. + * + * Generated from protobuf field .google.protobuf.Duration result_end_time_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setResultEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->result_end_time_offset = $var; + + return $this; + } + + /** + * Duration of first audio chunk. + * + * Generated from protobuf field .google.protobuf.Duration first_audio_duration = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getFirstAudioDuration() + { + return $this->first_audio_duration; + } + + public function hasFirstAudioDuration() + { + return isset($this->first_audio_duration); + } + + public function clearFirstAudioDuration() + { + unset($this->first_audio_duration); + } + + /** + * Duration of first audio chunk. + * + * Generated from protobuf field .google.protobuf.Duration first_audio_duration = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setFirstAudioDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->first_audio_duration = $var; + + return $this; + } + + /** + * Whether client used single utterance mode. + * + * Generated from protobuf field bool single_utterance = 5; + * @return bool + */ + public function getSingleUtterance() + { + return $this->single_utterance; + } + + /** + * Whether client used single utterance mode. + * + * Generated from protobuf field bool single_utterance = 5; + * @param bool $var + * @return $this + */ + public function setSingleUtterance($var) + { + GPBUtil::checkBool($var); + $this->single_utterance = $var; + + return $this; + } + + /** + * Time offsets of the speech partial results relative to the beginning of + * the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration speech_partial_results_end_times = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpeechPartialResultsEndTimes() + { + return $this->speech_partial_results_end_times; + } + + /** + * Time offsets of the speech partial results relative to the beginning of + * the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration speech_partial_results_end_times = 6; + * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpeechPartialResultsEndTimes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); + $this->speech_partial_results_end_times = $arr; + + return $this; + } + + /** + * Time offsets of the speech final results (is_final=true) relative to the + * beginning of the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration speech_final_results_end_times = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpeechFinalResultsEndTimes() + { + return $this->speech_final_results_end_times; + } + + /** + * Time offsets of the speech final results (is_final=true) relative to the + * beginning of the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration speech_final_results_end_times = 7; + * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpeechFinalResultsEndTimes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); + $this->speech_final_results_end_times = $arr; + + return $this; + } + + /** + * Total number of partial responses. + * + * Generated from protobuf field int32 partial_responses = 8; + * @return int + */ + public function getPartialResponses() + { + return $this->partial_responses; + } + + /** + * Total number of partial responses. + * + * Generated from protobuf field int32 partial_responses = 8; + * @param int $var + * @return $this + */ + public function setPartialResponses($var) + { + GPBUtil::checkInt32($var); + $this->partial_responses = $var; + + return $this; + } + + /** + * Time offset of Speaker ID stream close time relative to the Speech stream + * close time in milliseconds. Only meaningful for conversations involving + * passive verification. + * + * Generated from protobuf field int32 speaker_id_passive_latency_ms_offset = 9; + * @return int + */ + public function getSpeakerIdPassiveLatencyMsOffset() + { + return $this->speaker_id_passive_latency_ms_offset; + } + + /** + * Time offset of Speaker ID stream close time relative to the Speech stream + * close time in milliseconds. Only meaningful for conversations involving + * passive verification. + * + * Generated from protobuf field int32 speaker_id_passive_latency_ms_offset = 9; + * @param int $var + * @return $this + */ + public function setSpeakerIdPassiveLatencyMsOffset($var) + { + GPBUtil::checkInt32($var); + $this->speaker_id_passive_latency_ms_offset = $var; + + return $this; + } + + /** + * Whether a barge-in event is triggered in this request. + * + * Generated from protobuf field bool bargein_event_triggered = 10; + * @return bool + */ + public function getBargeinEventTriggered() + { + return $this->bargein_event_triggered; + } + + /** + * Whether a barge-in event is triggered in this request. + * + * Generated from protobuf field bool bargein_event_triggered = 10; + * @param bool $var + * @return $this + */ + public function setBargeinEventTriggered($var) + { + GPBUtil::checkBool($var); + $this->bargein_event_triggered = $var; + + return $this; + } + + /** + * Whether speech uses single utterance mode. + * + * Generated from protobuf field bool speech_single_utterance = 11; + * @return bool + */ + public function getSpeechSingleUtterance() + { + return $this->speech_single_utterance; + } + + /** + * Whether speech uses single utterance mode. + * + * Generated from protobuf field bool speech_single_utterance = 11; + * @param bool $var + * @return $this + */ + public function setSpeechSingleUtterance($var) + { + GPBUtil::checkBool($var); + $this->speech_single_utterance = $var; + + return $this; + } + + /** + * Time offsets of the DTMF partial results relative to the beginning of + * the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration dtmf_partial_results_times = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDtmfPartialResultsTimes() + { + return $this->dtmf_partial_results_times; + } + + /** + * Time offsets of the DTMF partial results relative to the beginning of + * the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration dtmf_partial_results_times = 12; + * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDtmfPartialResultsTimes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); + $this->dtmf_partial_results_times = $arr; + + return $this; + } + + /** + * Time offsets of the DTMF final results relative to the beginning of + * the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration dtmf_final_results_times = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDtmfFinalResultsTimes() + { + return $this->dtmf_final_results_times; + } + + /** + * Time offsets of the DTMF final results relative to the beginning of + * the stream. + * + * Generated from protobuf field repeated .google.protobuf.Duration dtmf_final_results_times = 13; + * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDtmfFinalResultsTimes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); + $this->dtmf_final_results_times = $arr; + + return $this; + } + + /** + * Time offset of the end-of-single-utterance signal relative to the + * beginning of the stream. + * + * Generated from protobuf field .google.protobuf.Duration single_utterance_end_time_offset = 14; + * @return \Google\Protobuf\Duration|null + */ + public function getSingleUtteranceEndTimeOffset() + { + return $this->single_utterance_end_time_offset; + } + + public function hasSingleUtteranceEndTimeOffset() + { + return isset($this->single_utterance_end_time_offset); + } + + public function clearSingleUtteranceEndTimeOffset() + { + unset($this->single_utterance_end_time_offset); + } + + /** + * Time offset of the end-of-single-utterance signal relative to the + * beginning of the stream. + * + * Generated from protobuf field .google.protobuf.Duration single_utterance_end_time_offset = 14; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSingleUtteranceEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->single_utterance_end_time_offset = $var; + + return $this; + } + + /** + * No speech timeout settings for the stream. + * + * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 15; + * @return \Google\Protobuf\Duration|null + */ + public function getNoSpeechTimeout() + { + return $this->no_speech_timeout; + } + + public function hasNoSpeechTimeout() + { + return isset($this->no_speech_timeout); + } + + public function clearNoSpeechTimeout() + { + unset($this->no_speech_timeout); + } + + /** + * No speech timeout settings for the stream. + * + * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 15; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setNoSpeechTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->no_speech_timeout = $var; + + return $this; + } + + /** + * Speech endpointing timeout settings for the stream. + * + * Generated from protobuf field .google.protobuf.Duration endpointing_timeout = 19; + * @return \Google\Protobuf\Duration|null + */ + public function getEndpointingTimeout() + { + return $this->endpointing_timeout; + } + + public function hasEndpointingTimeout() + { + return isset($this->endpointing_timeout); + } + + public function clearEndpointingTimeout() + { + unset($this->endpointing_timeout); + } + + /** + * Speech endpointing timeout settings for the stream. + * + * Generated from protobuf field .google.protobuf.Duration endpointing_timeout = 19; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndpointingTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->endpointing_timeout = $var; + + return $this; + } + + /** + * Whether the streaming terminates with an injected text query. + * + * Generated from protobuf field bool is_input_text = 16; + * @return bool + */ + public function getIsInputText() + { + return $this->is_input_text; + } + + /** + * Whether the streaming terminates with an injected text query. + * + * Generated from protobuf field bool is_input_text = 16; + * @param bool $var + * @return $this + */ + public function setIsInputText($var) + { + GPBUtil::checkBool($var); + $this->is_input_text = $var; + + return $this; + } + + /** + * Client half close time in terms of input audio duration. + * + * Generated from protobuf field .google.protobuf.Duration client_half_close_time_offset = 17; + * @return \Google\Protobuf\Duration|null + */ + public function getClientHalfCloseTimeOffset() + { + return $this->client_half_close_time_offset; + } + + public function hasClientHalfCloseTimeOffset() + { + return isset($this->client_half_close_time_offset); + } + + public function clearClientHalfCloseTimeOffset() + { + unset($this->client_half_close_time_offset); + } + + /** + * Client half close time in terms of input audio duration. + * + * Generated from protobuf field .google.protobuf.Duration client_half_close_time_offset = 17; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setClientHalfCloseTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->client_half_close_time_offset = $var; + + return $this; + } + + /** + * Client half close time in terms of API streaming duration. + * + * Generated from protobuf field .google.protobuf.Duration client_half_close_streaming_time_offset = 18; + * @return \Google\Protobuf\Duration|null + */ + public function getClientHalfCloseStreamingTimeOffset() + { + return $this->client_half_close_streaming_time_offset; + } + + public function hasClientHalfCloseStreamingTimeOffset() + { + return isset($this->client_half_close_streaming_time_offset); + } + + public function clearClientHalfCloseStreamingTimeOffset() + { + unset($this->client_half_close_streaming_time_offset); + } + + /** + * Client half close time in terms of API streaming duration. + * + * Generated from protobuf field .google.protobuf.Duration client_half_close_streaming_time_offset = 18; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setClientHalfCloseStreamingTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->client_half_close_streaming_time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php new file mode 100644 index 000000000000..9c1d8ffa995e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.cx.v3.CodeBlock + */ +class CodeBlock extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Source code of the block in Python. + * + * Generated from protobuf field string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $code + * Optional. Source code of the block in Python. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\CodeBlock::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Source code of the block in Python. + * + * Generated from protobuf field string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * Optional. Source code of the block in Python. + * + * Generated from protobuf field string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsRequest.php new file mode 100644 index 000000000000..3708cff2bdad --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsRequest.php @@ -0,0 +1,198 @@ +google.cloud.dialogflow.cx.v3.CompareVersionsRequest + */ +class CompareVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the base flow version to compare with the target version. + * Use version ID `0` to indicate the draft version of the specified flow. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string base_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $base_version = ''; + /** + * Required. Name of the target flow version to compare with the + * base version. Use version ID `0` to indicate the draft version of the + * specified flow. Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string target_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $target_version = ''; + /** + * The language to compare the flow versions for. + * 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; + */ + protected $language_code = ''; + + /** + * @param string $baseVersion Required. Name of the base flow version to compare with the target version. + * Use version ID `0` to indicate the draft version of the specified flow. + * + * Format: + * `projects//locations//agents//flows//versions/`. Please see + * {@see VersionsClient::versionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CompareVersionsRequest + * + * @experimental + */ + public static function build(string $baseVersion): self + { + return (new self()) + ->setBaseVersion($baseVersion); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $base_version + * Required. Name of the base flow version to compare with the target version. + * Use version ID `0` to indicate the draft version of the specified flow. + * Format: + * `projects//locations//agents//flows//versions/`. + * @type string $target_version + * Required. Name of the target flow version to compare with the + * base version. Use version ID `0` to indicate the draft version of the + * specified flow. Format: + * `projects//locations//agents//flows//versions/`. + * @type string $language_code + * The language to compare the flow versions for. + * 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\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the base flow version to compare with the target version. + * Use version ID `0` to indicate the draft version of the specified flow. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string base_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getBaseVersion() + { + return $this->base_version; + } + + /** + * Required. Name of the base flow version to compare with the target version. + * Use version ID `0` to indicate the draft version of the specified flow. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string base_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBaseVersion($var) + { + GPBUtil::checkString($var, True); + $this->base_version = $var; + + return $this; + } + + /** + * Required. Name of the target flow version to compare with the + * base version. Use version ID `0` to indicate the draft version of the + * specified flow. Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string target_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTargetVersion() + { + return $this->target_version; + } + + /** + * Required. Name of the target flow version to compare with the + * base version. Use version ID `0` to indicate the draft version of the + * specified flow. Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string target_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetVersion($var) + { + GPBUtil::checkString($var, True); + $this->target_version = $var; + + return $this; + } + + /** + * The language to compare the flow versions for. + * 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; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to compare the flow versions for. + * 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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsResponse.php new file mode 100644 index 000000000000..c89808df0f95 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsResponse.php @@ -0,0 +1,146 @@ +google.cloud.dialogflow.cx.v3.CompareVersionsResponse + */ +class CompareVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * JSON representation of the base version content. + * + * Generated from protobuf field string base_version_content_json = 1; + */ + protected $base_version_content_json = ''; + /** + * JSON representation of the target version content. + * + * Generated from protobuf field string target_version_content_json = 2; + */ + protected $target_version_content_json = ''; + /** + * The timestamp when the two version compares. + * + * Generated from protobuf field .google.protobuf.Timestamp compare_time = 3; + */ + protected $compare_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $base_version_content_json + * JSON representation of the base version content. + * @type string $target_version_content_json + * JSON representation of the target version content. + * @type \Google\Protobuf\Timestamp $compare_time + * The timestamp when the two version compares. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * JSON representation of the base version content. + * + * Generated from protobuf field string base_version_content_json = 1; + * @return string + */ + public function getBaseVersionContentJson() + { + return $this->base_version_content_json; + } + + /** + * JSON representation of the base version content. + * + * Generated from protobuf field string base_version_content_json = 1; + * @param string $var + * @return $this + */ + public function setBaseVersionContentJson($var) + { + GPBUtil::checkString($var, True); + $this->base_version_content_json = $var; + + return $this; + } + + /** + * JSON representation of the target version content. + * + * Generated from protobuf field string target_version_content_json = 2; + * @return string + */ + public function getTargetVersionContentJson() + { + return $this->target_version_content_json; + } + + /** + * JSON representation of the target version content. + * + * Generated from protobuf field string target_version_content_json = 2; + * @param string $var + * @return $this + */ + public function setTargetVersionContentJson($var) + { + GPBUtil::checkString($var, True); + $this->target_version_content_json = $var; + + return $this; + } + + /** + * The timestamp when the two version compares. + * + * Generated from protobuf field .google.protobuf.Timestamp compare_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCompareTime() + { + return $this->compare_time; + } + + public function hasCompareTime() + { + return isset($this->compare_time); + } + + public function clearCompareTime() + { + unset($this->compare_time); + } + + /** + * The timestamp when the two version compares. + * + * Generated from protobuf field .google.protobuf.Timestamp compare_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCompareTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->compare_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult.php new file mode 100644 index 000000000000..f258bf25c93f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult.php @@ -0,0 +1,187 @@ +google.cloud.dialogflow.cx.v3.ContinuousTestResult + */ +class ContinuousTestResult extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name for the continuous test result. Format: + * `projects//locations//agents//environments//continuousTestResults/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult result = 2; + */ + protected $result = 0; + /** + * A list of individual test case results names in this continuous test run. + * + * Generated from protobuf field repeated string test_case_results = 3 [(.google.api.resource_reference) = { + */ + private $test_case_results; + /** + * Time when the continuous testing run starts. + * + * Generated from protobuf field .google.protobuf.Timestamp run_time = 4; + */ + protected $run_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name for the continuous test result. Format: + * `projects//locations//agents//environments//continuousTestResults/`. + * @type int $result + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * @type array|\Google\Protobuf\Internal\RepeatedField $test_case_results + * A list of individual test case results names in this continuous test run. + * @type \Google\Protobuf\Timestamp $run_time + * Time when the continuous testing run starts. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * The resource name for the continuous test result. Format: + * `projects//locations//agents//environments//continuousTestResults/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the continuous test result. Format: + * `projects//locations//agents//environments//continuousTestResults/`. + * + * 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; + } + + /** + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult result = 2; + * @return int + */ + public function getResult() + { + return $this->result; + } + + /** + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult result = 2; + * @param int $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult\AggregatedTestResult::class); + $this->result = $var; + + return $this; + } + + /** + * A list of individual test case results names in this continuous test run. + * + * Generated from protobuf field repeated string test_case_results = 3 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTestCaseResults() + { + return $this->test_case_results; + } + + /** + * A list of individual test case results names in this continuous test run. + * + * Generated from protobuf field repeated string test_case_results = 3 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTestCaseResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->test_case_results = $arr; + + return $this; + } + + /** + * Time when the continuous testing run starts. + * + * Generated from protobuf field .google.protobuf.Timestamp run_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRunTime() + { + return $this->run_time; + } + + public function hasRunTime() + { + return isset($this->run_time); + } + + public function clearRunTime() + { + unset($this->run_time); + } + + /** + * Time when the continuous testing run starts. + * + * Generated from protobuf field .google.protobuf.Timestamp run_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRunTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->run_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult/AggregatedTestResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult/AggregatedTestResult.php new file mode 100644 index 000000000000..2f1d01904fae --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult/AggregatedTestResult.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult + */ +class AggregatedTestResult +{ + /** + * Not specified. Should never be used. + * + * Generated from protobuf enum AGGREGATED_TEST_RESULT_UNSPECIFIED = 0; + */ + const AGGREGATED_TEST_RESULT_UNSPECIFIED = 0; + /** + * All the tests passed. + * + * Generated from protobuf enum PASSED = 1; + */ + const PASSED = 1; + /** + * At least one test did not pass. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + + private static $valueToName = [ + self::AGGREGATED_TEST_RESULT_UNSPECIFIED => 'AGGREGATED_TEST_RESULT_UNSPECIFIED', + self::PASSED => 'PASSED', + 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(AggregatedTestResult::class, \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult_AggregatedTestResult::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn.php new file mode 100644 index 000000000000..0ded7a6566c3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn.php @@ -0,0 +1,122 @@ +google.cloud.dialogflow.cx.v3.ConversationTurn + */ +class ConversationTurn extends \Google\Protobuf\Internal\Message +{ + /** + * The user input. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + */ + protected $user_input = null; + /** + * The virtual agent output. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + */ + protected $virtual_agent_output = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\UserInput $user_input + * The user input. + * @type \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\VirtualAgentOutput $virtual_agent_output + * The virtual agent output. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The user input. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\UserInput|null + */ + public function getUserInput() + { + return $this->user_input; + } + + public function hasUserInput() + { + return isset($this->user_input); + } + + public function clearUserInput() + { + unset($this->user_input); + } + + /** + * The user input. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\UserInput $var + * @return $this + */ + public function setUserInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\UserInput::class); + $this->user_input = $var; + + return $this; + } + + /** + * The virtual agent output. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\VirtualAgentOutput|null + */ + public function getVirtualAgentOutput() + { + return $this->virtual_agent_output; + } + + public function hasVirtualAgentOutput() + { + return isset($this->virtual_agent_output); + } + + public function clearVirtualAgentOutput() + { + unset($this->virtual_agent_output); + } + + /** + * The virtual agent output. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\VirtualAgentOutput $var + * @return $this + */ + public function setVirtualAgentOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\VirtualAgentOutput::class); + $this->virtual_agent_output = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/UserInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/UserInput.php new file mode 100644 index 000000000000..c0e17a7240c8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/UserInput.php @@ -0,0 +1,212 @@ +google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + */ +class UserInput extends \Google\Protobuf\Internal\Message +{ + /** + * Supports [text input][google.cloud.dialogflow.cx.v3.QueryInput.text], + * [event input][google.cloud.dialogflow.cx.v3.QueryInput.event], [dtmf + * input][google.cloud.dialogflow.cx.v3.QueryInput.dtmf] in the test case. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + */ + protected $input = null; + /** + * Parameters that need to be injected into the conversation during intent + * detection. + * + * Generated from protobuf field .google.protobuf.Struct injected_parameters = 2; + */ + protected $injected_parameters = null; + /** + * If webhooks should be allowed to trigger in response to the user + * utterance. Often if parameters are injected, webhooks should not be + * enabled. + * + * Generated from protobuf field bool is_webhook_enabled = 3; + */ + protected $is_webhook_enabled = false; + /** + * Whether sentiment analysis is enabled. + * + * Generated from protobuf field bool enable_sentiment_analysis = 7; + */ + protected $enable_sentiment_analysis = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\QueryInput $input + * Supports [text input][google.cloud.dialogflow.cx.v3.QueryInput.text], + * [event input][google.cloud.dialogflow.cx.v3.QueryInput.event], [dtmf + * input][google.cloud.dialogflow.cx.v3.QueryInput.dtmf] in the test case. + * @type \Google\Protobuf\Struct $injected_parameters + * Parameters that need to be injected into the conversation during intent + * detection. + * @type bool $is_webhook_enabled + * If webhooks should be allowed to trigger in response to the user + * utterance. Often if parameters are injected, webhooks should not be + * enabled. + * @type bool $enable_sentiment_analysis + * Whether sentiment analysis is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Supports [text input][google.cloud.dialogflow.cx.v3.QueryInput.text], + * [event input][google.cloud.dialogflow.cx.v3.QueryInput.event], [dtmf + * input][google.cloud.dialogflow.cx.v3.QueryInput.dtmf] in the test case. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + * @return \Google\Cloud\Dialogflow\Cx\V3\QueryInput|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Supports [text input][google.cloud.dialogflow.cx.v3.QueryInput.text], + * [event input][google.cloud.dialogflow.cx.v3.QueryInput.event], [dtmf + * input][google.cloud.dialogflow.cx.v3.QueryInput.dtmf] in the test case. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput input = 5; + * @param \Google\Cloud\Dialogflow\Cx\V3\QueryInput $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryInput::class); + $this->input = $var; + + return $this; + } + + /** + * Parameters that need to be injected into the conversation during intent + * detection. + * + * Generated from protobuf field .google.protobuf.Struct injected_parameters = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getInjectedParameters() + { + return $this->injected_parameters; + } + + public function hasInjectedParameters() + { + return isset($this->injected_parameters); + } + + public function clearInjectedParameters() + { + unset($this->injected_parameters); + } + + /** + * Parameters that need to be injected into the conversation during intent + * detection. + * + * Generated from protobuf field .google.protobuf.Struct injected_parameters = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setInjectedParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->injected_parameters = $var; + + return $this; + } + + /** + * If webhooks should be allowed to trigger in response to the user + * utterance. Often if parameters are injected, webhooks should not be + * enabled. + * + * Generated from protobuf field bool is_webhook_enabled = 3; + * @return bool + */ + public function getIsWebhookEnabled() + { + return $this->is_webhook_enabled; + } + + /** + * If webhooks should be allowed to trigger in response to the user + * utterance. Often if parameters are injected, webhooks should not be + * enabled. + * + * Generated from protobuf field bool is_webhook_enabled = 3; + * @param bool $var + * @return $this + */ + public function setIsWebhookEnabled($var) + { + GPBUtil::checkBool($var); + $this->is_webhook_enabled = $var; + + return $this; + } + + /** + * Whether sentiment analysis is enabled. + * + * Generated from protobuf field bool enable_sentiment_analysis = 7; + * @return bool + */ + public function getEnableSentimentAnalysis() + { + return $this->enable_sentiment_analysis; + } + + /** + * Whether sentiment analysis is enabled. + * + * Generated from protobuf field bool enable_sentiment_analysis = 7; + * @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(UserInput::class, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn_UserInput::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/VirtualAgentOutput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/VirtualAgentOutput.php new file mode 100644 index 000000000000..902c96fad150 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/VirtualAgentOutput.php @@ -0,0 +1,356 @@ +google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + */ +class VirtualAgentOutput extends \Google\Protobuf\Internal\Message +{ + /** + * The session parameters available to the bot at this point. + * + * Generated from protobuf field .google.protobuf.Struct session_parameters = 4; + */ + protected $session_parameters = null; + /** + * Output only. If this is part of a [result conversation + * turn][TestCaseResult.conversation_turns], the list of differences + * between the original run and the replay for this output, if any. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $differences; + /** + * Required. Input only. The diagnostic + * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] + * output for the turn. Required to calculate the testing coverage. + * + * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $diagnostic_info = null; + /** + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the + * response. Only name and displayName will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + */ + protected $triggered_intent = null; + /** + * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was + * spoken. Only name and displayName will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 8; + */ + protected $current_page = null; + /** + * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses + * from the agent for the turn. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + */ + private $text_responses; + /** + * Response error from the agent in the test result. If set, other output + * is empty. + * + * Generated from protobuf field .google.rpc.Status status = 10; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $session_parameters + * The session parameters available to the bot at this point. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestRunDifference>|\Google\Protobuf\Internal\RepeatedField $differences + * Output only. If this is part of a [result conversation + * turn][TestCaseResult.conversation_turns], the list of differences + * between the original run and the replay for this output, if any. + * @type \Google\Protobuf\Struct $diagnostic_info + * Required. Input only. The diagnostic + * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] + * output for the turn. Required to calculate the testing coverage. + * @type \Google\Cloud\Dialogflow\Cx\V3\Intent $triggered_intent + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the + * response. Only name and displayName will be set. + * @type \Google\Cloud\Dialogflow\Cx\V3\Page $current_page + * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was + * spoken. Only name and displayName will be set. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text>|\Google\Protobuf\Internal\RepeatedField $text_responses + * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses + * from the agent for the turn. + * @type \Google\Rpc\Status $status + * Response error from the agent in the test result. If set, other output + * is empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The session parameters available to the bot at this point. + * + * Generated from protobuf field .google.protobuf.Struct session_parameters = 4; + * @return \Google\Protobuf\Struct|null + */ + public function getSessionParameters() + { + return $this->session_parameters; + } + + public function hasSessionParameters() + { + return isset($this->session_parameters); + } + + public function clearSessionParameters() + { + unset($this->session_parameters); + } + + /** + * The session parameters available to the bot at this point. + * + * Generated from protobuf field .google.protobuf.Struct session_parameters = 4; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setSessionParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->session_parameters = $var; + + return $this; + } + + /** + * Output only. If this is part of a [result conversation + * turn][TestCaseResult.conversation_turns], the list of differences + * between the original run and the replay for this output, if any. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDifferences() + { + return $this->differences; + } + + /** + * Output only. If this is part of a [result conversation + * turn][TestCaseResult.conversation_turns], the list of differences + * between the original run and the replay for this output, if any. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestRunDifference>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDifferences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestRunDifference::class); + $this->differences = $arr; + + return $this; + } + + /** + * Required. Input only. The diagnostic + * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] + * output for the turn. Required to calculate the testing coverage. + * + * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * @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); + } + + /** + * Required. Input only. The diagnostic + * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] + * output for the turn. Required to calculate the testing coverage. + * + * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * @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 [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the + * response. Only name and displayName will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + * @return \Google\Cloud\Dialogflow\Cx\V3\Intent|null + */ + public function getTriggeredIntent() + { + return $this->triggered_intent; + } + + public function hasTriggeredIntent() + { + return isset($this->triggered_intent); + } + + public function clearTriggeredIntent() + { + unset($this->triggered_intent); + } + + /** + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the + * response. Only name and displayName will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; + * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $var + * @return $this + */ + public function setTriggeredIntent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Intent::class); + $this->triggered_intent = $var; + + return $this; + } + + /** + * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was + * spoken. Only name and displayName will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 8; + * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null + */ + public function getCurrentPage() + { + return $this->current_page; + } + + public function hasCurrentPage() + { + return isset($this->current_page); + } + + public function clearCurrentPage() + { + unset($this->current_page); + } + + /** + * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was + * spoken. Only name and displayName will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 8; + * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var + * @return $this + */ + public function setCurrentPage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); + $this->current_page = $var; + + return $this; + } + + /** + * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses + * from the agent for the turn. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTextResponses() + { + return $this->text_responses; + } + + /** + * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses + * from the agent for the turn. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTextResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text::class); + $this->text_responses = $arr; + + return $this; + } + + /** + * Response error from the agent in the test result. If set, other output + * is empty. + * + * Generated from protobuf field .google.rpc.Status status = 10; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Response error from the agent in the test result. If set, other output + * is empty. + * + * Generated from protobuf field .google.rpc.Status status = 10; + * @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(VirtualAgentOutput::class, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn_VirtualAgentOutput::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateAgentRequest.php new file mode 100644 index 000000000000..df418e380976 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateAgentRequest.php @@ -0,0 +1,133 @@ +google.cloud.dialogflow.cx.v3.CreateAgentRequest + */ +class CreateAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location to create a agent for. + * Format: `projects//locations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The agent to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent agent = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $agent = null; + + /** + * @param string $parent Required. The location to create a agent for. + * Format: `projects//locations/`. Please see + * {@see AgentsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Agent $agent Required. The agent to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateAgentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Agent $agent): self + { + return (new self()) + ->setParent($parent) + ->setAgent($agent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location to create a agent for. + * Format: `projects//locations/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Agent $agent + * Required. The agent to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location to create a agent 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 location to create a agent 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 agent to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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 create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent agent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Agent $var + * @return $this + */ + public function setAgent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent::class); + $this->agent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEntityTypeRequest.php new file mode 100644 index 000000000000..b74e55a837aa --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEntityTypeRequest.php @@ -0,0 +1,199 @@ +google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + */ +class CreateEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create a entity type for. + * Format: `projects//locations//agents/`. + * + * 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.cx.v3.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_type = null; + /** + * The language of the following fields in `entity_type`: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + */ + protected $language_code = ''; + + /** + * @param string $parent Required. The agent to create a entity type for. + * Format: `projects//locations//agents/`. Please see + * {@see EntityTypesClient::agentName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\EntityType $entityType Required. The entity type to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateEntityTypeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\EntityType $entityType): self + { + return (new self()) + ->setParent($parent) + ->setEntityType($entityType); + } + + /** + * 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//locations//agents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\EntityType $entity_type + * Required. The entity type to create. + * @type string $language_code + * The language of the following fields in `entity_type`: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create a entity type for. + * Format: `projects//locations//agents/`. + * + * 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//locations//agents/`. + * + * 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.cx.v3.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\EntityType $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\EntityType::class); + $this->entity_type = $var; + + return $this; + } + + /** + * The language of the following fields in `entity_type`: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the following fields in `entity_type`: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEnvironmentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEnvironmentRequest.php new file mode 100644 index 000000000000..db001090b83b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEnvironmentRequest.php @@ -0,0 +1,138 @@ +google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + */ +class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: + * `projects//locations//agents/`. + * + * 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.cx.v3.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment = null; + + /** + * @param string $parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: + * `projects//locations//agents/`. Please see + * {@see EnvironmentsClient::agentName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Environment $environment Required. The environment to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateEnvironmentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Environment $environment): self + { + return (new self()) + ->setParent($parent) + ->setEnvironment($environment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: + * `projects//locations//agents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Environment $environment + * Required. The environment to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: + * `projects//locations//agents/`. + * + * 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][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: + * `projects//locations//agents/`. + * + * 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.cx.v3.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Environment::class); + $this->environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExampleRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExampleRequest.php new file mode 100644 index 000000000000..736e871e372f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExampleRequest.php @@ -0,0 +1,138 @@ +google.cloud.dialogflow.cx.v3.CreateExampleRequest + */ +class CreateExampleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The playbook to create an example for. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The example to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $example = null; + + /** + * @param string $parent Required. The playbook to create an example for. + * Format: + * `projects//locations//agents//playbooks/`. Please see + * {@see ExamplesClient::playbookName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Example $example Required. The example to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateExampleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Example $example): self + { + return (new self()) + ->setParent($parent) + ->setExample($example); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The playbook to create an example for. + * Format: + * `projects//locations//agents//playbooks/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Example $example + * Required. The example to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Example::initOnce(); + parent::__construct($data); + } + + /** + * Required. The playbook to create an example for. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 playbook to create an example for. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 example to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Example|null + */ + public function getExample() + { + return $this->example; + } + + public function hasExample() + { + return isset($this->example); + } + + public function clearExample() + { + unset($this->example); + } + + /** + * Required. The example to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Example $var + * @return $this + */ + public function setExample($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Example::class); + $this->example = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExperimentRequest.php new file mode 100644 index 000000000000..3e24428f7f56 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExperimentRequest.php @@ -0,0 +1,138 @@ +google.cloud.dialogflow.cx.v3.CreateExperimentRequest + */ +class CreateExperimentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The experiment to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $experiment = null; + + /** + * @param string $parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: + * `projects//locations//agents//environments/`. Please see + * {@see ExperimentsClient::environmentName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment Required. The experiment to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateExperimentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment): self + { + return (new self()) + ->setParent($parent) + ->setExperiment($experiment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: + * `projects//locations//agents//environments/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment + * Required. The experiment to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: + * `projects//locations//agents//environments/`. + * + * 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][google.cloud.dialogflow.cx.v3.Agent] to create an + * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: + * `projects//locations//agents//environments/`. + * + * 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 experiment to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Experiment|null + */ + public function getExperiment() + { + return $this->experiment; + } + + public function hasExperiment() + { + return isset($this->experiment); + } + + public function clearExperiment() + { + unset($this->experiment); + } + + /** + * Required. The experiment to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment $var + * @return $this + */ + public function setExperiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment::class); + $this->experiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateFlowRequest.php new file mode 100644 index 000000000000..cafcee4975c2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateFlowRequest.php @@ -0,0 +1,203 @@ +google.cloud.dialogflow.cx.v3.CreateFlowRequest + */ +class CreateFlowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create a flow for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The flow to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $flow = null; + /** + * The language of the following fields in `flow`: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + */ + protected $language_code = ''; + + /** + * @param string $parent Required. The agent to create a flow for. + * Format: `projects//locations//agents/`. Please see + * {@see FlowsClient::agentName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $flow Required. The flow to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateFlowRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Flow $flow): self + { + return (new self()) + ->setParent($parent) + ->setFlow($flow); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create a flow for. + * Format: `projects//locations//agents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Flow $flow + * Required. The flow to create. + * @type string $language_code + * The language of the following fields in `flow`: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create a flow for. + * Format: `projects//locations//agents/`. + * + * 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 flow for. + * Format: `projects//locations//agents/`. + * + * 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 flow to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Flow|null + */ + public function getFlow() + { + return $this->flow; + } + + public function hasFlow() + { + return isset($this->flow); + } + + public function clearFlow() + { + unset($this->flow); + } + + /** + * Required. The flow to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $var + * @return $this + */ + public function setFlow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Flow::class); + $this->flow = $var; + + return $this; + } + + /** + * The language of the following fields in `flow`: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the following fields in `flow`: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateGeneratorRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateGeneratorRequest.php new file mode 100644 index 000000000000..a6d888dc916b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateGeneratorRequest.php @@ -0,0 +1,175 @@ +google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + */ +class CreateGeneratorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create a generator for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The generator to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $generator = null; + /** + * The language to create generators for the following fields: + * * `Generator.prompt_text.text` + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 3; + */ + protected $language_code = ''; + + /** + * @param string $parent Required. The agent to create a generator for. + * Format: `projects//locations//agents/`. Please see + * {@see GeneratorsClient::agentName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Generator $generator Required. The generator to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateGeneratorRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Generator $generator): self + { + return (new self()) + ->setParent($parent) + ->setGenerator($generator); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create a generator for. + * Format: `projects//locations//agents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Generator $generator + * Required. The generator to create. + * @type string $language_code + * The language to create generators for the following fields: + * * `Generator.prompt_text.text` + * If not specified, the agent's default language is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create a generator for. + * Format: `projects//locations//agents/`. + * + * 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 generator for. + * Format: `projects//locations//agents/`. + * + * 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 generator to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Generator|null + */ + public function getGenerator() + { + return $this->generator; + } + + public function hasGenerator() + { + return isset($this->generator); + } + + public function clearGenerator() + { + unset($this->generator); + } + + /** + * Required. The generator to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Generator $var + * @return $this + */ + public function setGenerator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Generator::class); + $this->generator = $var; + + return $this; + } + + /** + * The language to create generators for the following fields: + * * `Generator.prompt_text.text` + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 3; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to create generators for the following fields: + * * `Generator.prompt_text.text` + * If not specified, the agent's default language is used. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateIntentRequest.php new file mode 100644 index 000000000000..1525af676e71 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateIntentRequest.php @@ -0,0 +1,191 @@ +google.cloud.dialogflow.cx.v3.CreateIntentRequest + */ +class CreateIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create an intent for. + * Format: `projects//locations//agents/`. + * + * 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.cx.v3.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intent = null; + /** + * The language of the following fields in `intent`: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + */ + protected $language_code = ''; + + /** + * @param string $parent Required. The agent to create an intent for. + * Format: `projects//locations//agents/`. Please see + * {@see IntentsClient::agentName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $intent Required. The intent to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateIntentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Intent $intent): self + { + return (new self()) + ->setParent($parent) + ->setIntent($intent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create an intent for. + * Format: `projects//locations//agents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Intent $intent + * Required. The intent to create. + * @type string $language_code + * The language of the following fields in `intent`: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create an intent for. + * Format: `projects//locations//agents/`. + * + * 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 intent for. + * Format: `projects//locations//agents/`. + * + * 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.cx.v3.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $var + * @return $this + */ + public function setIntent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Intent::class); + $this->intent = $var; + + return $this; + } + + /** + * The language of the following fields in `intent`: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the following fields in `intent`: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePageRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePageRequest.php new file mode 100644 index 000000000000..6fac94bb204b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePageRequest.php @@ -0,0 +1,240 @@ +google.cloud.dialogflow.cx.v3.CreatePageRequest + */ +class CreatePageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The flow to create a page for. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The page to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page = null; + /** + * The language of the following fields in `page`: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + */ + protected $language_code = ''; + + /** + * @param string $parent Required. The flow to create a page for. + * Format: + * `projects//locations//agents//flows/`. Please see + * {@see PagesClient::flowName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Page $page Required. The page to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreatePageRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Page $page): self + { + return (new self()) + ->setParent($parent) + ->setPage($page); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The flow to create a page for. + * Format: + * `projects//locations//agents//flows/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Page $page + * Required. The page to create. + * @type string $language_code + * The language of the following fields in `page`: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Required. The flow to create a page for. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 flow to create a page for. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 page to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null + */ + public function getPage() + { + return $this->page; + } + + public function hasPage() + { + return isset($this->page); + } + + public function clearPage() + { + unset($this->page); + } + + /** + * Required. The page to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var + * @return $this + */ + public function setPage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); + $this->page = $var; + + return $this; + } + + /** + * The language of the following fields in `page`: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the following fields in `page`: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookRequest.php new file mode 100644 index 000000000000..a923c01b8405 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookRequest.php @@ -0,0 +1,133 @@ +google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + */ +class CreatePlaybookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create a playbook for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The playbook to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $playbook = null; + + /** + * @param string $parent Required. The agent to create a playbook for. + * Format: `projects//locations//agents/`. Please see + * {@see PlaybooksClient::agentName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Playbook $playbook Required. The playbook to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreatePlaybookRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Playbook $playbook): self + { + return (new self()) + ->setParent($parent) + ->setPlaybook($playbook); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create a playbook for. + * Format: `projects//locations//agents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Playbook $playbook + * Required. The playbook to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create a playbook for. + * Format: `projects//locations//agents/`. + * + * 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 playbook for. + * Format: `projects//locations//agents/`. + * + * 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 playbook to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Playbook|null + */ + public function getPlaybook() + { + return $this->playbook; + } + + public function hasPlaybook() + { + return isset($this->playbook); + } + + public function clearPlaybook() + { + unset($this->playbook); + } + + /** + * Required. The playbook to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Playbook $var + * @return $this + */ + public function setPlaybook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Playbook::class); + $this->playbook = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookVersionRequest.php new file mode 100644 index 000000000000..bd79b5411443 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookVersionRequest.php @@ -0,0 +1,138 @@ +google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest + */ +class CreatePlaybookVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The playbook to create a version for. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The playbook version to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $playbook_version = null; + + /** + * @param string $parent Required. The playbook to create a version for. + * Format: + * `projects//locations//agents//playbooks/`. Please see + * {@see PlaybooksClient::playbookName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\PlaybookVersion $playbookVersion Required. The playbook version to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreatePlaybookVersionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\PlaybookVersion $playbookVersion): self + { + return (new self()) + ->setParent($parent) + ->setPlaybookVersion($playbookVersion); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The playbook to create a version for. + * Format: + * `projects//locations//agents//playbooks/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\PlaybookVersion $playbook_version + * Required. The playbook version to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The playbook to create a version for. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 playbook to create a version for. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 playbook version to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\PlaybookVersion|null + */ + public function getPlaybookVersion() + { + return $this->playbook_version; + } + + public function hasPlaybookVersion() + { + return isset($this->playbook_version); + } + + public function clearPlaybookVersion() + { + unset($this->playbook_version); + } + + /** + * Required. The playbook version to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\PlaybookVersion $var + * @return $this + */ + public function setPlaybookVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PlaybookVersion::class); + $this->playbook_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSecuritySettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSecuritySettingsRequest.php new file mode 100644 index 000000000000..86a69de5e77f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSecuritySettingsRequest.php @@ -0,0 +1,137 @@ +google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + */ +class CreateSecuritySettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location to create an + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. + * Format: `projects//locations/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The security settings to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_settings = null; + + /** + * @param string $parent Required. The location to create an + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. + * Format: `projects//locations/`. Please see + * {@see SecuritySettingsServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $securitySettings Required. The security settings to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateSecuritySettingsRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $securitySettings): self + { + return (new self()) + ->setParent($parent) + ->setSecuritySettings($securitySettings); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location to create an + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. + * Format: `projects//locations/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $security_settings + * Required. The security settings to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location to create an + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] 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 location to create an + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] 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 security settings to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings|null + */ + public function getSecuritySettings() + { + return $this->security_settings; + } + + public function hasSecuritySettings() + { + return isset($this->security_settings); + } + + public function clearSecuritySettings() + { + unset($this->security_settings); + } + + /** + * Required. The security settings to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $var + * @return $this + */ + public function setSecuritySettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::class); + $this->security_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSessionEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSessionEntityTypeRequest.php new file mode 100644 index 000000000000..ac1aaeb53278 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSessionEntityTypeRequest.php @@ -0,0 +1,158 @@ +google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + */ +class CreateSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The session to create a session entity type for. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * + * 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.cx.v3.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session_entity_type = null; + + /** + * @param string $parent Required. The session to create a session entity type for. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. Please see + * {@see SessionEntityTypesClient::sessionName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $sessionEntityType Required. The session entity type to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateSessionEntityTypeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $sessionEntityType): self + { + return (new self()) + ->setParent($parent) + ->setSessionEntityType($sessionEntityType); + } + + /** + * 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//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * @type \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $session_entity_type + * Required. The session entity type to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The session to create a session entity type for. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default '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 session to create a session entity type for. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default '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; + } + + /** + * Required. The session entity type to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $var + * @return $this + */ + public function setSessionEntityType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::class); + $this->session_entity_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTestCaseRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTestCaseRequest.php new file mode 100644 index 000000000000..c61290e07925 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTestCaseRequest.php @@ -0,0 +1,133 @@ +google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + */ +class CreateTestCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create the test case for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The test case to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $test_case = null; + + /** + * @param string $parent Required. The agent to create the test case for. + * Format: `projects//locations//agents/`. Please see + * {@see TestCasesClient::agentName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\TestCase $testCase Required. The test case to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateTestCaseRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\TestCase $testCase): self + { + return (new self()) + ->setParent($parent) + ->setTestCase($testCase); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create the test case for. + * Format: `projects//locations//agents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\TestCase $test_case + * Required. The test case to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create the test case for. + * Format: `projects//locations//agents/`. + * + * 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 the test case for. + * Format: `projects//locations//agents/`. + * + * 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 test case to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\TestCase|null + */ + public function getTestCase() + { + return $this->test_case; + } + + public function hasTestCase() + { + return isset($this->test_case); + } + + public function clearTestCase() + { + unset($this->test_case); + } + + /** + * Required. The test case to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\TestCase $var + * @return $this + */ + public function setTestCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestCase::class); + $this->test_case = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolRequest.php new file mode 100644 index 000000000000..1f73c7a91b66 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolRequest.php @@ -0,0 +1,133 @@ +google.cloud.dialogflow.cx.v3.CreateToolRequest + */ +class CreateToolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create a Tool for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Tool to be created. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tool = null; + + /** + * @param string $parent Required. The agent to create a Tool for. + * Format: `projects//locations//agents/`. Please see + * {@see ToolsClient::agentName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool $tool Required. The Tool to be created. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateToolRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Tool $tool): self + { + return (new self()) + ->setParent($parent) + ->setTool($tool); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create a Tool for. + * Format: `projects//locations//agents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool $tool + * Required. The Tool to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create a Tool for. + * Format: `projects//locations//agents/`. + * + * 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 Tool for. + * Format: `projects//locations//agents/`. + * + * 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 Tool to be created. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool|null + */ + public function getTool() + { + return $this->tool; + } + + public function hasTool() + { + return isset($this->tool); + } + + public function clearTool() + { + unset($this->tool); + } + + /** + * Required. The Tool to be created. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool $var + * @return $this + */ + public function setTool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool::class); + $this->tool = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolVersionRequest.php new file mode 100644 index 000000000000..18cff5e72d34 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolVersionRequest.php @@ -0,0 +1,140 @@ +google.cloud.dialogflow.cx.v3.CreateToolVersionRequest + */ +class CreateToolVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The tool to create a version for. + * Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The tool version to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tool_version = null; + + /** + * @param string $parent Required. The tool to create a version for. + * Format: + * `projects//locations//agents//tools/`. Please see + * {@see ToolsClient::toolName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\ToolVersion $toolVersion Required. The tool version to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateToolVersionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\ToolVersion $toolVersion): self + { + return (new self()) + ->setParent($parent) + ->setToolVersion($toolVersion); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The tool to create a version for. + * Format: + * `projects//locations//agents//tools/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\ToolVersion $tool_version + * Required. The tool version to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The tool to create a version for. + * Format: + * `projects//locations//agents//tools/`. + * + * 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 tool to create a version for. + * Format: + * `projects//locations//agents//tools/`. + * + * 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 tool version to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\ToolVersion|null + */ + public function getToolVersion() + { + return $this->tool_version; + } + + public function hasToolVersion() + { + return isset($this->tool_version); + } + + public function clearToolVersion() + { + unset($this->tool_version); + } + + /** + * Required. The tool version to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\ToolVersion $var + * @return $this + */ + public function setToolVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ToolVersion::class); + $this->tool_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTransitionRouteGroupRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTransitionRouteGroupRequest.php new file mode 100644 index 000000000000..13085a8d7d59 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTransitionRouteGroupRequest.php @@ -0,0 +1,219 @@ +google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + */ +class CreateTransitionRouteGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The flow to create an + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * for. Format: + * `projects//locations//agents//flows/` + * or `projects//locations//agents/` + * for agent-level groups. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The transition route group to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $transition_route_group = null; + /** + * The language of the following fields in `TransitionRouteGroup`: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + */ + protected $language_code = ''; + + /** + * @param string $parent Required. The flow to create an + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * for. Format: + * `projects//locations//agents//flows/` + * or `projects//locations//agents/` + * for agent-level groups. Please see + * {@see TransitionRouteGroupsClient::flowName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transitionRouteGroup Required. The transition route group to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateTransitionRouteGroupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transitionRouteGroup): self + { + return (new self()) + ->setParent($parent) + ->setTransitionRouteGroup($transitionRouteGroup); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The flow to create an + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * for. Format: + * `projects//locations//agents//flows/` + * or `projects//locations//agents/` + * for agent-level groups. + * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transition_route_group + * Required. The transition route group to create. + * @type string $language_code + * The language of the following fields in `TransitionRouteGroup`: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\TransitionRouteGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The flow to create an + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * for. Format: + * `projects//locations//agents//flows/` + * or `projects//locations//agents/` + * for agent-level groups. + * + * 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 flow to create an + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * for. Format: + * `projects//locations//agents//flows/` + * or `projects//locations//agents/` + * for agent-level groups. + * + * 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 transition route group to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup|null + */ + public function getTransitionRouteGroup() + { + return $this->transition_route_group; + } + + public function hasTransitionRouteGroup() + { + return isset($this->transition_route_group); + } + + public function clearTransitionRouteGroup() + { + unset($this->transition_route_group); + } + + /** + * Required. The transition route group to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $var + * @return $this + */ + public function setTransitionRouteGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::class); + $this->transition_route_group = $var; + + return $this; + } + + /** + * The language of the following fields in `TransitionRouteGroup`: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the following fields in `TransitionRouteGroup`: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionOperationMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionOperationMetadata.php new file mode 100644 index 000000000000..af1c5c45c1bd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionOperationMetadata.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + */ +class CreateVersionOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the created version. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * Name of the created version. + * Format: + * `projects//locations//agents//flows//versions/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * Name of the created version. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Name of the created version. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionRequest.php new file mode 100644 index 000000000000..32887cd53c1e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionRequest.php @@ -0,0 +1,138 @@ +google.cloud.dialogflow.cx.v3.CreateVersionRequest + */ +class CreateVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an + * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: + * `projects//locations//agents//flows/`. + * + * 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.cx.v3.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = null; + + /** + * @param string $parent Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an + * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: + * `projects//locations//agents//flows/`. Please see + * {@see VersionsClient::flowName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Version $version Required. The version to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateVersionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Version $version): self + { + return (new self()) + ->setParent($parent) + ->setVersion($version); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an + * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: + * `projects//locations//agents//flows/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Version $version + * Required. The version to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an + * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: + * `projects//locations//agents//flows/`. + * + * 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 [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an + * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: + * `projects//locations//agents//flows/`. + * + * 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.cx.v3.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Version $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Version::class); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateWebhookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateWebhookRequest.php new file mode 100644 index 000000000000..b3a09aa0e45f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateWebhookRequest.php @@ -0,0 +1,133 @@ +google.cloud.dialogflow.cx.v3.CreateWebhookRequest + */ +class CreateWebhookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to create a webhook for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The webhook to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $webhook = null; + + /** + * @param string $parent Required. The agent to create a webhook for. + * Format: `projects//locations//agents/`. Please see + * {@see WebhooksClient::agentName()} for help formatting this field. + * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook Required. The webhook to create. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\CreateWebhookRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook): self + { + return (new self()) + ->setParent($parent) + ->setWebhook($webhook); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to create a webhook for. + * Format: `projects//locations//agents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook + * Required. The webhook to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to create a webhook for. + * Format: `projects//locations//agents/`. + * + * 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 webhook for. + * Format: `projects//locations//agents/`. + * + * 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 webhook to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook|null + */ + public function getWebhook() + { + return $this->webhook; + } + + public function hasWebhook() + { + return isset($this->webhook); + } + + public function clearWebhook() + { + unset($this->webhook); + } + + /** + * Required. The webhook to create. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook $var + * @return $this + */ + public function setWebhook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook::class); + $this->webhook = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php new file mode 100644 index 000000000000..f8f399897a2c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php @@ -0,0 +1,156 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnection + */ +class DataStoreConnection extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the connected data store. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + */ + protected $data_store_type = 0; + /** + * The full name of the referenced data store. + * Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * + * Generated from protobuf field string data_store = 2; + */ + protected $data_store = ''; + /** + * The document processing mode for the data store connection. Should only be + * set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is + * considered as DOCUMENTS, as this is the legacy mode. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DocumentProcessingMode document_processing_mode = 4; + */ + protected $document_processing_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $data_store_type + * The type of the connected data store. + * @type string $data_store + * The full name of the referenced data store. + * Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * @type int $document_processing_mode + * The document processing mode for the data store connection. Should only be + * set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is + * considered as DOCUMENTS, as this is the legacy mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); + parent::__construct($data); + } + + /** + * The type of the connected data store. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * @return int + */ + public function getDataStoreType() + { + return $this->data_store_type; + } + + /** + * The type of the connected data store. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; + * @param int $var + * @return $this + */ + public function setDataStoreType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreType::class); + $this->data_store_type = $var; + + return $this; + } + + /** + * The full name of the referenced data store. + * Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * + * Generated from protobuf field string data_store = 2; + * @return string + */ + public function getDataStore() + { + return $this->data_store; + } + + /** + * The full name of the referenced data store. + * Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * + * Generated from protobuf field string data_store = 2; + * @param string $var + * @return $this + */ + public function setDataStore($var) + { + GPBUtil::checkString($var, True); + $this->data_store = $var; + + return $this; + } + + /** + * The document processing mode for the data store connection. Should only be + * set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is + * considered as DOCUMENTS, as this is the legacy mode. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DocumentProcessingMode document_processing_mode = 4; + * @return int + */ + public function getDocumentProcessingMode() + { + return $this->document_processing_mode; + } + + /** + * The document processing mode for the data store connection. Should only be + * set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is + * considered as DOCUMENTS, as this is the legacy mode. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DocumentProcessingMode document_processing_mode = 4; + * @param int $var + * @return $this + */ + public function setDocumentProcessingMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DocumentProcessingMode::class); + $this->document_processing_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals.php new file mode 100644 index 000000000000..67df54bb0610 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals.php @@ -0,0 +1,394 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals + */ +class DataStoreConnectionSignals extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Diagnostic info related to the rewriter model call. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals rewriter_model_call_signals = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rewriter_model_call_signals = null; + /** + * Optional. Rewritten string query used for search. + * + * Generated from protobuf field string rewritten_query = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rewritten_query = ''; + /** + * Optional. Search snippets included in the answer generation prompt. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippets = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $search_snippets; + /** + * Optional. Diagnostic info related to the answer generation model call. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $answer_generation_model_call_signals = null; + /** + * Optional. The final compiled answer. + * + * Generated from protobuf field string answer = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $answer = ''; + /** + * Optional. Answer parts with relevant citations. + * Concatenation of texts should add up the `answer` (not counting + * whitespaces). + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart answer_parts = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $answer_parts; + /** + * Optional. Snippets cited by the answer generation model from the most to + * least relevant. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet cited_snippets = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $cited_snippets; + /** + * Optional. Grounding signals. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals grounding_signals = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $grounding_signals = null; + /** + * Optional. Safety check result. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals safety_signals = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $safety_signals = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals $rewriter_model_call_signals + * Optional. Diagnostic info related to the rewriter model call. + * @type string $rewritten_query + * Optional. Rewritten string query used for search. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet>|\Google\Protobuf\Internal\RepeatedField $search_snippets + * Optional. Search snippets included in the answer generation prompt. + * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals $answer_generation_model_call_signals + * Optional. Diagnostic info related to the answer generation model call. + * @type string $answer + * Optional. The final compiled answer. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerPart>|\Google\Protobuf\Internal\RepeatedField $answer_parts + * Optional. Answer parts with relevant citations. + * Concatenation of texts should add up the `answer` (not counting + * whitespaces). + * @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\CitedSnippet>|\Google\Protobuf\Internal\RepeatedField $cited_snippets + * Optional. Snippets cited by the answer generation model from the most to + * least relevant. + * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals $grounding_signals + * Optional. Grounding signals. + * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals $safety_signals + * Optional. Safety check result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Diagnostic info related to the rewriter model call. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals rewriter_model_call_signals = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals|null + */ + public function getRewriterModelCallSignals() + { + return $this->rewriter_model_call_signals; + } + + public function hasRewriterModelCallSignals() + { + return isset($this->rewriter_model_call_signals); + } + + public function clearRewriterModelCallSignals() + { + unset($this->rewriter_model_call_signals); + } + + /** + * Optional. Diagnostic info related to the rewriter model call. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals rewriter_model_call_signals = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals $var + * @return $this + */ + public function setRewriterModelCallSignals($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals::class); + $this->rewriter_model_call_signals = $var; + + return $this; + } + + /** + * Optional. Rewritten string query used for search. + * + * Generated from protobuf field string rewritten_query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRewrittenQuery() + { + return $this->rewritten_query; + } + + /** + * Optional. Rewritten string query used for search. + * + * Generated from protobuf field string rewritten_query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRewrittenQuery($var) + { + GPBUtil::checkString($var, True); + $this->rewritten_query = $var; + + return $this; + } + + /** + * Optional. Search snippets included in the answer generation prompt. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippets = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSearchSnippets() + { + return $this->search_snippets; + } + + /** + * Optional. Search snippets included in the answer generation prompt. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippets = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSearchSnippets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet::class); + $this->search_snippets = $arr; + + return $this; + } + + /** + * Optional. Diagnostic info related to the answer generation model call. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals|null + */ + public function getAnswerGenerationModelCallSignals() + { + return $this->answer_generation_model_call_signals; + } + + public function hasAnswerGenerationModelCallSignals() + { + return isset($this->answer_generation_model_call_signals); + } + + public function clearAnswerGenerationModelCallSignals() + { + unset($this->answer_generation_model_call_signals); + } + + /** + * Optional. Diagnostic info related to the answer generation model call. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals $var + * @return $this + */ + public function setAnswerGenerationModelCallSignals($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals::class); + $this->answer_generation_model_call_signals = $var; + + return $this; + } + + /** + * Optional. The final compiled answer. + * + * Generated from protobuf field string answer = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAnswer() + { + return $this->answer; + } + + /** + * Optional. The final compiled answer. + * + * Generated from protobuf field string answer = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAnswer($var) + { + GPBUtil::checkString($var, True); + $this->answer = $var; + + return $this; + } + + /** + * Optional. Answer parts with relevant citations. + * Concatenation of texts should add up the `answer` (not counting + * whitespaces). + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart answer_parts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnswerParts() + { + return $this->answer_parts; + } + + /** + * Optional. Answer parts with relevant citations. + * Concatenation of texts should add up the `answer` (not counting + * whitespaces). + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart answer_parts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerPart>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnswerParts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerPart::class); + $this->answer_parts = $arr; + + return $this; + } + + /** + * Optional. Snippets cited by the answer generation model from the most to + * least relevant. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet cited_snippets = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCitedSnippets() + { + return $this->cited_snippets; + } + + /** + * Optional. Snippets cited by the answer generation model from the most to + * least relevant. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet cited_snippets = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\CitedSnippet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCitedSnippets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\CitedSnippet::class); + $this->cited_snippets = $arr; + + return $this; + } + + /** + * Optional. Grounding signals. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals grounding_signals = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals|null + */ + public function getGroundingSignals() + { + return $this->grounding_signals; + } + + public function hasGroundingSignals() + { + return isset($this->grounding_signals); + } + + public function clearGroundingSignals() + { + unset($this->grounding_signals); + } + + /** + * Optional. Grounding signals. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals grounding_signals = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals $var + * @return $this + */ + public function setGroundingSignals($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals::class); + $this->grounding_signals = $var; + + return $this; + } + + /** + * Optional. Safety check result. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals safety_signals = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals|null + */ + public function getSafetySignals() + { + return $this->safety_signals; + } + + public function hasSafetySignals() + { + return isset($this->safety_signals); + } + + public function clearSafetySignals() + { + unset($this->safety_signals); + } + + /** + * Optional. Safety check result. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals safety_signals = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals $var + * @return $this + */ + public function setSafetySignals($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals::class); + $this->safety_signals = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerGenerationModelCallSignals.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerGenerationModelCallSignals.php new file mode 100644 index 000000000000..a69b6996bff9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerGenerationModelCallSignals.php @@ -0,0 +1,142 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals + */ +class AnswerGenerationModelCallSignals extends \Google\Protobuf\Internal\Message +{ + /** + * Prompt as sent to the model. + * + * Generated from protobuf field string rendered_prompt = 1; + */ + protected $rendered_prompt = ''; + /** + * Output of the generative model. + * + * Generated from protobuf field string model_output = 2; + */ + protected $model_output = ''; + /** + * Name of the generative model. For example, "gemini-ultra", "gemini-pro", + * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. + * + * Generated from protobuf field string model = 3; + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $rendered_prompt + * Prompt as sent to the model. + * @type string $model_output + * Output of the generative model. + * @type string $model + * Name of the generative model. For example, "gemini-ultra", "gemini-pro", + * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); + parent::__construct($data); + } + + /** + * Prompt as sent to the model. + * + * Generated from protobuf field string rendered_prompt = 1; + * @return string + */ + public function getRenderedPrompt() + { + return $this->rendered_prompt; + } + + /** + * Prompt as sent to the model. + * + * Generated from protobuf field string rendered_prompt = 1; + * @param string $var + * @return $this + */ + public function setRenderedPrompt($var) + { + GPBUtil::checkString($var, True); + $this->rendered_prompt = $var; + + return $this; + } + + /** + * Output of the generative model. + * + * Generated from protobuf field string model_output = 2; + * @return string + */ + public function getModelOutput() + { + return $this->model_output; + } + + /** + * Output of the generative model. + * + * Generated from protobuf field string model_output = 2; + * @param string $var + * @return $this + */ + public function setModelOutput($var) + { + GPBUtil::checkString($var, True); + $this->model_output = $var; + + return $this; + } + + /** + * Name of the generative model. For example, "gemini-ultra", "gemini-pro", + * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. + * + * Generated from protobuf field string model = 3; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Name of the generative model. For example, "gemini-ultra", "gemini-pro", + * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. + * + * Generated from protobuf field string model = 3; + * @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(AnswerGenerationModelCallSignals::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_AnswerGenerationModelCallSignals::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerPart.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerPart.php new file mode 100644 index 000000000000..a48bd07a061b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerPart.php @@ -0,0 +1,104 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart + */ +class AnswerPart extends \Google\Protobuf\Internal\Message +{ + /** + * Substring of the answer. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * Citations for this answer part. Indices of `search_snippets`. + * + * Generated from protobuf field repeated int32 supporting_indices = 2; + */ + private $supporting_indices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Substring of the answer. + * @type array|\Google\Protobuf\Internal\RepeatedField $supporting_indices + * Citations for this answer part. Indices of `search_snippets`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); + parent::__construct($data); + } + + /** + * Substring of the answer. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Substring of the answer. + * + * 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; + } + + /** + * Citations for this answer part. Indices of `search_snippets`. + * + * Generated from protobuf field repeated int32 supporting_indices = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportingIndices() + { + return $this->supporting_indices; + } + + /** + * Citations for this answer part. Indices of `search_snippets`. + * + * Generated from protobuf field repeated int32 supporting_indices = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportingIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->supporting_indices = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnswerPart::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_AnswerPart::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/CitedSnippet.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/CitedSnippet.php new file mode 100644 index 000000000000..e5f9dfb6e763 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/CitedSnippet.php @@ -0,0 +1,114 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet + */ +class CitedSnippet extends \Google\Protobuf\Internal\Message +{ + /** + * Details of the snippet. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippet = 1; + */ + protected $search_snippet = null; + /** + * Index of the snippet in `search_snippets` field. + * + * Generated from protobuf field int32 snippet_index = 2; + */ + protected $snippet_index = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet $search_snippet + * Details of the snippet. + * @type int $snippet_index + * Index of the snippet in `search_snippets` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); + parent::__construct($data); + } + + /** + * Details of the snippet. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippet = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet|null + */ + public function getSearchSnippet() + { + return $this->search_snippet; + } + + public function hasSearchSnippet() + { + return isset($this->search_snippet); + } + + public function clearSearchSnippet() + { + unset($this->search_snippet); + } + + /** + * Details of the snippet. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippet = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet $var + * @return $this + */ + public function setSearchSnippet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet::class); + $this->search_snippet = $var; + + return $this; + } + + /** + * Index of the snippet in `search_snippets` field. + * + * Generated from protobuf field int32 snippet_index = 2; + * @return int + */ + public function getSnippetIndex() + { + return $this->snippet_index; + } + + /** + * Index of the snippet in `search_snippets` field. + * + * Generated from protobuf field int32 snippet_index = 2; + * @param int $var + * @return $this + */ + public function setSnippetIndex($var) + { + GPBUtil::checkInt32($var); + $this->snippet_index = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CitedSnippet::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_CitedSnippet::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals.php new file mode 100644 index 000000000000..e61c22e2e6d1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals.php @@ -0,0 +1,104 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals + */ +class GroundingSignals extends \Google\Protobuf\Internal\Message +{ + /** + * Represents the decision of the grounding check. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingDecision decision = 1; + */ + protected $decision = 0; + /** + * Grounding score bucket setting. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingScoreBucket score = 2; + */ + protected $score = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $decision + * Represents the decision of the grounding check. + * @type int $score + * Grounding score bucket setting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); + parent::__construct($data); + } + + /** + * Represents the decision of the grounding check. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingDecision decision = 1; + * @return int + */ + public function getDecision() + { + return $this->decision; + } + + /** + * Represents the decision of the grounding check. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingDecision decision = 1; + * @param int $var + * @return $this + */ + public function setDecision($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals\GroundingDecision::class); + $this->decision = $var; + + return $this; + } + + /** + * Grounding score bucket setting. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingScoreBucket score = 2; + * @return int + */ + public function getScore() + { + return $this->score; + } + + /** + * Grounding score bucket setting. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingScoreBucket score = 2; + * @param int $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals\GroundingScoreBucket::class); + $this->score = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GroundingSignals::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_GroundingSignals::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingDecision.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingDecision.php new file mode 100644 index 000000000000..0329eb749b00 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingDecision.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingDecision + */ +class GroundingDecision +{ + /** + * Decision not specified. + * + * Generated from protobuf enum GROUNDING_DECISION_UNSPECIFIED = 0; + */ + const GROUNDING_DECISION_UNSPECIFIED = 0; + /** + * Grounding have accepted the answer. + * + * Generated from protobuf enum ACCEPTED_BY_GROUNDING = 1; + */ + const ACCEPTED_BY_GROUNDING = 1; + /** + * Grounding have rejected the answer. + * + * Generated from protobuf enum REJECTED_BY_GROUNDING = 2; + */ + const REJECTED_BY_GROUNDING = 2; + + private static $valueToName = [ + self::GROUNDING_DECISION_UNSPECIFIED => 'GROUNDING_DECISION_UNSPECIFIED', + self::ACCEPTED_BY_GROUNDING => 'ACCEPTED_BY_GROUNDING', + self::REJECTED_BY_GROUNDING => 'REJECTED_BY_GROUNDING', + ]; + + 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(GroundingDecision::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_GroundingSignals_GroundingDecision::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingScoreBucket.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingScoreBucket.php new file mode 100644 index 000000000000..3cef82a2fdc9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingScoreBucket.php @@ -0,0 +1,85 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingScoreBucket + */ +class GroundingScoreBucket +{ + /** + * Score not specified. + * + * Generated from protobuf enum GROUNDING_SCORE_BUCKET_UNSPECIFIED = 0; + */ + const GROUNDING_SCORE_BUCKET_UNSPECIFIED = 0; + /** + * We have very low confidence that the answer is grounded. + * + * Generated from protobuf enum VERY_LOW = 1; + */ + const VERY_LOW = 1; + /** + * We have low confidence that the answer is grounded. + * + * Generated from protobuf enum LOW = 3; + */ + const LOW = 3; + /** + * We have medium confidence that the answer is grounded. + * + * Generated from protobuf enum MEDIUM = 4; + */ + const MEDIUM = 4; + /** + * We have high confidence that the answer is grounded. + * + * Generated from protobuf enum HIGH = 5; + */ + const HIGH = 5; + /** + * We have very high confidence that the answer is grounded. + * + * Generated from protobuf enum VERY_HIGH = 6; + */ + const VERY_HIGH = 6; + + private static $valueToName = [ + self::GROUNDING_SCORE_BUCKET_UNSPECIFIED => 'GROUNDING_SCORE_BUCKET_UNSPECIFIED', + self::VERY_LOW => 'VERY_LOW', + self::LOW => 'LOW', + self::MEDIUM => 'MEDIUM', + self::HIGH => 'HIGH', + self::VERY_HIGH => 'VERY_HIGH', + ]; + + 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(GroundingScoreBucket::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_GroundingSignals_GroundingScoreBucket::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/RewriterModelCallSignals.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/RewriterModelCallSignals.php new file mode 100644 index 000000000000..b6048943b854 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/RewriterModelCallSignals.php @@ -0,0 +1,142 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals + */ +class RewriterModelCallSignals extends \Google\Protobuf\Internal\Message +{ + /** + * Prompt as sent to the model. + * + * Generated from protobuf field string rendered_prompt = 1; + */ + protected $rendered_prompt = ''; + /** + * Output of the generative model. + * + * Generated from protobuf field string model_output = 2; + */ + protected $model_output = ''; + /** + * Name of the generative model. For example, "gemini-ultra", "gemini-pro", + * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. + * + * Generated from protobuf field string model = 3; + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $rendered_prompt + * Prompt as sent to the model. + * @type string $model_output + * Output of the generative model. + * @type string $model + * Name of the generative model. For example, "gemini-ultra", "gemini-pro", + * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); + parent::__construct($data); + } + + /** + * Prompt as sent to the model. + * + * Generated from protobuf field string rendered_prompt = 1; + * @return string + */ + public function getRenderedPrompt() + { + return $this->rendered_prompt; + } + + /** + * Prompt as sent to the model. + * + * Generated from protobuf field string rendered_prompt = 1; + * @param string $var + * @return $this + */ + public function setRenderedPrompt($var) + { + GPBUtil::checkString($var, True); + $this->rendered_prompt = $var; + + return $this; + } + + /** + * Output of the generative model. + * + * Generated from protobuf field string model_output = 2; + * @return string + */ + public function getModelOutput() + { + return $this->model_output; + } + + /** + * Output of the generative model. + * + * Generated from protobuf field string model_output = 2; + * @param string $var + * @return $this + */ + public function setModelOutput($var) + { + GPBUtil::checkString($var, True); + $this->model_output = $var; + + return $this; + } + + /** + * Name of the generative model. For example, "gemini-ultra", "gemini-pro", + * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. + * + * Generated from protobuf field string model = 3; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Name of the generative model. For example, "gemini-ultra", "gemini-pro", + * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. + * + * Generated from protobuf field string model = 3; + * @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(RewriterModelCallSignals::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_RewriterModelCallSignals::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals.php new file mode 100644 index 000000000000..e15244e03bc1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals.php @@ -0,0 +1,138 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals + */ +class SafetySignals extends \Google\Protobuf\Internal\Message +{ + /** + * Safety decision. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.SafetyDecision decision = 1; + */ + protected $decision = 0; + /** + * Specifies banned phrase match subject. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.BannedPhraseMatch banned_phrase_match = 2; + */ + protected $banned_phrase_match = 0; + /** + * The matched banned phrase if there was a match. + * + * Generated from protobuf field string matched_banned_phrase = 3; + */ + protected $matched_banned_phrase = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $decision + * Safety decision. + * @type int $banned_phrase_match + * Specifies banned phrase match subject. + * @type string $matched_banned_phrase + * The matched banned phrase if there was a match. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); + parent::__construct($data); + } + + /** + * Safety decision. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.SafetyDecision decision = 1; + * @return int + */ + public function getDecision() + { + return $this->decision; + } + + /** + * Safety decision. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.SafetyDecision decision = 1; + * @param int $var + * @return $this + */ + public function setDecision($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals\SafetyDecision::class); + $this->decision = $var; + + return $this; + } + + /** + * Specifies banned phrase match subject. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.BannedPhraseMatch banned_phrase_match = 2; + * @return int + */ + public function getBannedPhraseMatch() + { + return $this->banned_phrase_match; + } + + /** + * Specifies banned phrase match subject. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.BannedPhraseMatch banned_phrase_match = 2; + * @param int $var + * @return $this + */ + public function setBannedPhraseMatch($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals\BannedPhraseMatch::class); + $this->banned_phrase_match = $var; + + return $this; + } + + /** + * The matched banned phrase if there was a match. + * + * Generated from protobuf field string matched_banned_phrase = 3; + * @return string + */ + public function getMatchedBannedPhrase() + { + return $this->matched_banned_phrase; + } + + /** + * The matched banned phrase if there was a match. + * + * Generated from protobuf field string matched_banned_phrase = 3; + * @param string $var + * @return $this + */ + public function setMatchedBannedPhrase($var) + { + GPBUtil::checkString($var, True); + $this->matched_banned_phrase = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SafetySignals::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_SafetySignals::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/BannedPhraseMatch.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/BannedPhraseMatch.php new file mode 100644 index 000000000000..15f0435195b7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/BannedPhraseMatch.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.BannedPhraseMatch + */ +class BannedPhraseMatch +{ + /** + * No banned phrase check was executed. + * + * Generated from protobuf enum BANNED_PHRASE_MATCH_UNSPECIFIED = 0; + */ + const BANNED_PHRASE_MATCH_UNSPECIFIED = 0; + /** + * All banned phrase checks led to no match. + * + * Generated from protobuf enum BANNED_PHRASE_MATCH_NONE = 1; + */ + const BANNED_PHRASE_MATCH_NONE = 1; + /** + * A banned phrase matched the query. + * + * Generated from protobuf enum BANNED_PHRASE_MATCH_QUERY = 2; + */ + const BANNED_PHRASE_MATCH_QUERY = 2; + /** + * A banned phrase matched the response. + * + * Generated from protobuf enum BANNED_PHRASE_MATCH_RESPONSE = 3; + */ + const BANNED_PHRASE_MATCH_RESPONSE = 3; + + private static $valueToName = [ + self::BANNED_PHRASE_MATCH_UNSPECIFIED => 'BANNED_PHRASE_MATCH_UNSPECIFIED', + self::BANNED_PHRASE_MATCH_NONE => 'BANNED_PHRASE_MATCH_NONE', + self::BANNED_PHRASE_MATCH_QUERY => 'BANNED_PHRASE_MATCH_QUERY', + self::BANNED_PHRASE_MATCH_RESPONSE => 'BANNED_PHRASE_MATCH_RESPONSE', + ]; + + 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(BannedPhraseMatch::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_SafetySignals_BannedPhraseMatch::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/SafetyDecision.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/SafetyDecision.php new file mode 100644 index 000000000000..c5488b4e85a4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/SafetyDecision.php @@ -0,0 +1,66 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.SafetyDecision + */ +class SafetyDecision +{ + /** + * Decision not specified. + * + * Generated from protobuf enum SAFETY_DECISION_UNSPECIFIED = 0; + */ + const SAFETY_DECISION_UNSPECIFIED = 0; + /** + * No manual or automatic safety check fired. + * + * Generated from protobuf enum ACCEPTED_BY_SAFETY_CHECK = 1; + */ + const ACCEPTED_BY_SAFETY_CHECK = 1; + /** + * One ore more safety checks fired. + * + * Generated from protobuf enum REJECTED_BY_SAFETY_CHECK = 2; + */ + const REJECTED_BY_SAFETY_CHECK = 2; + + private static $valueToName = [ + self::SAFETY_DECISION_UNSPECIFIED => 'SAFETY_DECISION_UNSPECIFIED', + self::ACCEPTED_BY_SAFETY_CHECK => 'ACCEPTED_BY_SAFETY_CHECK', + self::REJECTED_BY_SAFETY_CHECK => 'REJECTED_BY_SAFETY_CHECK', + ]; + + 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(SafetyDecision::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_SafetySignals_SafetyDecision::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SearchSnippet.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SearchSnippet.php new file mode 100644 index 000000000000..68433b01ae90 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SearchSnippet.php @@ -0,0 +1,182 @@ +google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet + */ +class SearchSnippet extends \Google\Protobuf\Internal\Message +{ + /** + * Title of the enclosing document. + * + * Generated from protobuf field string document_title = 1; + */ + protected $document_title = ''; + /** + * Uri for the document. Present if specified for the document. + * + * Generated from protobuf field string document_uri = 2; + */ + protected $document_uri = ''; + /** + * Text included in the prompt. + * + * Generated from protobuf field string text = 3; + */ + protected $text = ''; + /** + * Metadata associated with the document. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 5; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document_title + * Title of the enclosing document. + * @type string $document_uri + * Uri for the document. Present if specified for the document. + * @type string $text + * Text included in the prompt. + * @type \Google\Protobuf\Struct $metadata + * Metadata associated with the document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); + parent::__construct($data); + } + + /** + * Title of the enclosing document. + * + * Generated from protobuf field string document_title = 1; + * @return string + */ + public function getDocumentTitle() + { + return $this->document_title; + } + + /** + * Title of the enclosing document. + * + * Generated from protobuf field string document_title = 1; + * @param string $var + * @return $this + */ + public function setDocumentTitle($var) + { + GPBUtil::checkString($var, True); + $this->document_title = $var; + + return $this; + } + + /** + * Uri for the document. Present if specified for the document. + * + * Generated from protobuf field string document_uri = 2; + * @return string + */ + public function getDocumentUri() + { + return $this->document_uri; + } + + /** + * Uri for the document. Present if specified for the document. + * + * Generated from protobuf field string document_uri = 2; + * @param string $var + * @return $this + */ + public function setDocumentUri($var) + { + GPBUtil::checkString($var, True); + $this->document_uri = $var; + + return $this; + } + + /** + * Text included in the prompt. + * + * Generated from protobuf field string text = 3; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Text included in the prompt. + * + * Generated from protobuf field string text = 3; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Metadata associated with the document. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 5; + * @return \Google\Protobuf\Struct|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Metadata associated with the document. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 5; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->metadata = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SearchSnippet::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_SearchSnippet::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreType.php new file mode 100644 index 000000000000..1821768ce42b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreType.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.cx.v3.DataStoreType + */ +class DataStoreType +{ + /** + * Not specified. This value indicates that the data store type is not + * specified, so it will not be used during search. + * + * Generated from protobuf enum DATA_STORE_TYPE_UNSPECIFIED = 0; + */ + const DATA_STORE_TYPE_UNSPECIFIED = 0; + /** + * A data store that contains public web content. + * + * Generated from protobuf enum PUBLIC_WEB = 1; + */ + const PUBLIC_WEB = 1; + /** + * A data store that contains unstructured private data. + * + * Generated from protobuf enum UNSTRUCTURED = 2; + */ + const UNSTRUCTURED = 2; + /** + * A data store that contains structured data (for example FAQ). + * + * Generated from protobuf enum STRUCTURED = 3; + */ + const STRUCTURED = 3; + + private static $valueToName = [ + self::DATA_STORE_TYPE_UNSPECIFIED => 'DATA_STORE_TYPE_UNSPECIFIED', + self::PUBLIC_WEB => 'PUBLIC_WEB', + self::UNSTRUCTURED => 'UNSTRUCTURED', + self::STRUCTURED => 'STRUCTURED', + ]; + + 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataType.php new file mode 100644 index 000000000000..6cb0572c06cb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataType.php @@ -0,0 +1,80 @@ +google.cloud.dialogflow.cx.v3.DataType + */ +class DataType +{ + /** + * Not specified. + * + * Generated from protobuf enum DATA_TYPE_UNSPECIFIED = 0; + */ + const DATA_TYPE_UNSPECIFIED = 0; + /** + * Represents any string value. + * + * Generated from protobuf enum STRING = 1; + */ + const STRING = 1; + /** + * Represents any number value. + * + * Generated from protobuf enum NUMBER = 2; + */ + const NUMBER = 2; + /** + * Represents a boolean value. + * + * Generated from protobuf enum BOOLEAN = 3; + */ + const BOOLEAN = 3; + /** + * Represents a repeated value. + * + * Generated from protobuf enum ARRAY = 6; + */ + const PBARRAY = 6; + + private static $valueToName = [ + self::DATA_TYPE_UNSPECIFIED => 'DATA_TYPE_UNSPECIFIED', + self::STRING => 'STRING', + self::NUMBER => 'NUMBER', + self::BOOLEAN => 'BOOLEAN', + self::PBARRAY => 'ARRAY', + ]; + + 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); + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteAgentRequest.php new file mode 100644 index 000000000000..eb1b6ddaa6e3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteAgentRequest.php @@ -0,0 +1,87 @@ +google.cloud.dialogflow.cx.v3.DeleteAgentRequest + */ +class DeleteAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the agent to delete. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the agent to delete. + * Format: `projects//locations//agents/`. Please see + * {@see AgentsClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteAgentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the agent to delete. + * Format: `projects//locations//agents/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the agent to delete. + * Format: `projects//locations//agents/`. + * + * 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 agent to delete. + * Format: `projects//locations//agents/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEntityTypeRequest.php new file mode 100644 index 000000000000..dea705ed203d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEntityTypeRequest.php @@ -0,0 +1,166 @@ +google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + */ +class DeleteEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entity type to delete. + * Format: + * `projects//locations//agents//entityTypes/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * This field has no effect for entity type not being used. + * For entity types that are used by intents or pages: + * * If `force` is set to false, an error will be returned with message + * indicating the referencing resources. + * * If `force` is set to true, Dialogflow will remove the entity type, as + * well as any references to the entity type (i.e. Page + * [parameter][google.cloud.dialogflow.cx.v3.Form.Parameter] of the entity + * type will be changed to + * '@sys.any' and intent + * [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] of the + * entity type will be removed). + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the entity type to delete. + * Format: + * `projects//locations//agents//entityTypes/`. Please see + * {@see EntityTypesClient::entityTypeName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteEntityTypeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entity type to delete. + * Format: + * `projects//locations//agents//entityTypes/`. + * @type bool $force + * This field has no effect for entity type not being used. + * For entity types that are used by intents or pages: + * * If `force` is set to false, an error will be returned with message + * indicating the referencing resources. + * * If `force` is set to true, Dialogflow will remove the entity type, as + * well as any references to the entity type (i.e. Page + * [parameter][google.cloud.dialogflow.cx.v3.Form.Parameter] of the entity + * type will be changed to + * '@sys.any' and intent + * [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] of the + * entity type will be removed). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entity type to delete. + * Format: + * `projects//locations//agents//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//locations//agents//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; + } + + /** + * This field has no effect for entity type not being used. + * For entity types that are used by intents or pages: + * * If `force` is set to false, an error will be returned with message + * indicating the referencing resources. + * * If `force` is set to true, Dialogflow will remove the entity type, as + * well as any references to the entity type (i.e. Page + * [parameter][google.cloud.dialogflow.cx.v3.Form.Parameter] of the entity + * type will be changed to + * '@sys.any' and intent + * [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] of the + * entity type will be removed). + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * This field has no effect for entity type not being used. + * For entity types that are used by intents or pages: + * * If `force` is set to false, an error will be returned with message + * indicating the referencing resources. + * * If `force` is set to true, Dialogflow will remove the entity type, as + * well as any references to the entity type (i.e. Page + * [parameter][google.cloud.dialogflow.cx.v3.Form.Parameter] of the entity + * type will be changed to + * '@sys.any' and intent + * [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] of the + * entity type will be removed). + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEnvironmentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEnvironmentRequest.php new file mode 100644 index 000000000000..e6c6bedcfb9b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEnvironmentRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + */ +class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: + * `projects//locations//agents//environments/`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteEnvironmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: + * `projects//locations//agents//environments/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: + * `projects//locations//agents//environments/`. + * + * 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][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: + * `projects//locations//agents//environments/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExampleRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExampleRequest.php new file mode 100644 index 000000000000..69db81da243b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExampleRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.DeleteExampleRequest + */ +class DeleteExampleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the example to delete. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the example to delete. + * Format: + * `projects//locations//agents//playbooks//examples/`. Please see + * {@see ExamplesClient::exampleName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteExampleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the example to delete. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Example::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the example to delete. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * + * 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 example to delete. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExperimentRequest.php new file mode 100644 index 000000000000..a71540139d64 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExperimentRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + */ +class DeleteExperimentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: + * `projects//locations//agents//environments//experiments/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: + * `projects//locations//agents//environments//experiments/`. Please see + * {@see ExperimentsClient::experimentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteExperimentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: + * `projects//locations//agents//environments//experiments/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: + * `projects//locations//agents//environments//experiments/`. + * + * 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][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: + * `projects//locations//agents//environments//experiments/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteFlowRequest.php new file mode 100644 index 000000000000..7bbcd2aba2ca --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteFlowRequest.php @@ -0,0 +1,158 @@ +google.cloud.dialogflow.cx.v3.DeleteFlowRequest + */ +class DeleteFlowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the flow to delete. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * This field has no effect for flows with no incoming transitions. + * For flows with incoming transitions: + * * If `force` is set to false, an error will be returned with message + * indicating the incoming transitions. + * * If `force` is set to true, Dialogflow will remove the flow, as well as + * any transitions to the flow (i.e. [Target + * flow][EventHandler.target_flow] in event handlers or [Target + * flow][TransitionRoute.target_flow] in transition routes that point to + * this flow will be cleared). + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the flow to delete. + * Format: + * `projects//locations//agents//flows/`. Please see + * {@see FlowsClient::flowName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteFlowRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the flow to delete. + * Format: + * `projects//locations//agents//flows/`. + * @type bool $force + * This field has no effect for flows with no incoming transitions. + * For flows with incoming transitions: + * * If `force` is set to false, an error will be returned with message + * indicating the incoming transitions. + * * If `force` is set to true, Dialogflow will remove the flow, as well as + * any transitions to the flow (i.e. [Target + * flow][EventHandler.target_flow] in event handlers or [Target + * flow][TransitionRoute.target_flow] in transition routes that point to + * this flow will be cleared). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the flow to delete. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 flow to delete. + * Format: + * `projects//locations//agents//flows/`. + * + * 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; + } + + /** + * This field has no effect for flows with no incoming transitions. + * For flows with incoming transitions: + * * If `force` is set to false, an error will be returned with message + * indicating the incoming transitions. + * * If `force` is set to true, Dialogflow will remove the flow, as well as + * any transitions to the flow (i.e. [Target + * flow][EventHandler.target_flow] in event handlers or [Target + * flow][TransitionRoute.target_flow] in transition routes that point to + * this flow will be cleared). + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * This field has no effect for flows with no incoming transitions. + * For flows with incoming transitions: + * * If `force` is set to false, an error will be returned with message + * indicating the incoming transitions. + * * If `force` is set to true, Dialogflow will remove the flow, as well as + * any transitions to the flow (i.e. [Target + * flow][EventHandler.target_flow] in event handlers or [Target + * flow][TransitionRoute.target_flow] in transition routes that point to + * this flow will be cleared). + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteGeneratorRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteGeneratorRequest.php new file mode 100644 index 000000000000..f1516d54364d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteGeneratorRequest.php @@ -0,0 +1,150 @@ +google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + */ +class DeleteGeneratorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the generator to delete. + * Format: + * `projects//locations//agents//generators/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * This field has no effect for generators not being used. + * For generators that are used by pages/flows/transition route groups: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the generator, as well + * as any references to the generator (i.e. + * [Generator][Fulfillment.generator]) in fulfillments. + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the generator to delete. + * Format: + * `projects//locations//agents//generators/`. Please see + * {@see GeneratorsClient::generatorName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteGeneratorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the generator to delete. + * Format: + * `projects//locations//agents//generators/`. + * @type bool $force + * This field has no effect for generators not being used. + * For generators that are used by pages/flows/transition route groups: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the generator, as well + * as any references to the generator (i.e. + * [Generator][Fulfillment.generator]) in fulfillments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the generator to delete. + * Format: + * `projects//locations//agents//generators/`. + * + * 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 generator to delete. + * Format: + * `projects//locations//agents//generators/`. + * + * 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; + } + + /** + * This field has no effect for generators not being used. + * For generators that are used by pages/flows/transition route groups: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the generator, as well + * as any references to the generator (i.e. + * [Generator][Fulfillment.generator]) in fulfillments. + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * This field has no effect for generators not being used. + * For generators that are used by pages/flows/transition route groups: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the generator, as well + * as any references to the generator (i.e. + * [Generator][Fulfillment.generator]) in fulfillments. + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteIntentRequest.php new file mode 100644 index 000000000000..033f90777f2a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteIntentRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.DeleteIntentRequest + */ +class DeleteIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the intent to delete. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the intent to delete. + * Format: + * `projects//locations//agents//intents/`. Please see + * {@see IntentsClient::intentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteIntentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the intent to delete. + * Format: + * `projects//locations//agents//intents/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the intent to delete. + * Format: + * `projects//locations//agents//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. + * Format: + * `projects//locations//agents//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePageRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePageRequest.php new file mode 100644 index 000000000000..8070937f94e0 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePageRequest.php @@ -0,0 +1,158 @@ +google.cloud.dialogflow.cx.v3.DeletePageRequest + */ +class DeletePageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the page to delete. + * Format: + * `projects//locations//agents//Flows//pages/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * This field has no effect for pages with no incoming transitions. + * For pages with incoming transitions: + * * If `force` is set to false, an error will be returned with message + * indicating the incoming transitions. + * * If `force` is set to true, Dialogflow will remove the page, as well as + * any transitions to the page (i.e. [Target + * page][EventHandler.target_page] in event handlers or [Target + * page][TransitionRoute.target_page] in transition routes that point to + * this page will be cleared). + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the page to delete. + * Format: + * `projects//locations//agents//Flows//pages/`. Please see + * {@see PagesClient::pageName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeletePageRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the page to delete. + * Format: + * `projects//locations//agents//Flows//pages/`. + * @type bool $force + * This field has no effect for pages with no incoming transitions. + * For pages with incoming transitions: + * * If `force` is set to false, an error will be returned with message + * indicating the incoming transitions. + * * If `force` is set to true, Dialogflow will remove the page, as well as + * any transitions to the page (i.e. [Target + * page][EventHandler.target_page] in event handlers or [Target + * page][TransitionRoute.target_page] in transition routes that point to + * this page will be cleared). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the page to delete. + * Format: + * `projects//locations//agents//Flows//pages/`. + * + * 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 page to delete. + * Format: + * `projects//locations//agents//Flows//pages/`. + * + * 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; + } + + /** + * This field has no effect for pages with no incoming transitions. + * For pages with incoming transitions: + * * If `force` is set to false, an error will be returned with message + * indicating the incoming transitions. + * * If `force` is set to true, Dialogflow will remove the page, as well as + * any transitions to the page (i.e. [Target + * page][EventHandler.target_page] in event handlers or [Target + * page][TransitionRoute.target_page] in transition routes that point to + * this page will be cleared). + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * This field has no effect for pages with no incoming transitions. + * For pages with incoming transitions: + * * If `force` is set to false, an error will be returned with message + * indicating the incoming transitions. + * * If `force` is set to true, Dialogflow will remove the page, as well as + * any transitions to the page (i.e. [Target + * page][EventHandler.target_page] in event handlers or [Target + * page][TransitionRoute.target_page] in transition routes that point to + * this page will be cleared). + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookRequest.php new file mode 100644 index 000000000000..f9fff61f2d2e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + */ +class DeletePlaybookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the playbook to delete. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the playbook to delete. + * Format: + * `projects//locations//agents//playbooks/`. Please see + * {@see PlaybooksClient::playbookName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeletePlaybookRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the playbook to delete. + * Format: + * `projects//locations//agents//playbooks/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the playbook to delete. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 playbook to delete. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookVersionRequest.php new file mode 100644 index 000000000000..bf26f312f44a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookVersionRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + */ +class DeletePlaybookVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the playbook version to delete. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the playbook version to delete. + * Format: + * `projects//locations//agents//playbooks//versions/`. Please see + * {@see PlaybooksClient::playbookVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeletePlaybookVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the playbook version to delete. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the playbook version to delete. + * Format: + * `projects//locations//agents//playbooks//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 playbook version to delete. + * Format: + * `projects//locations//agents//playbooks//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSecuritySettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSecuritySettingsRequest.php new file mode 100644 index 000000000000..748895a9a067 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSecuritySettingsRequest.php @@ -0,0 +1,96 @@ +google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + */ +class DeleteSecuritySettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to + * delete. Format: + * `projects//locations//securitySettings/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to + * delete. Format: + * `projects//locations//securitySettings/`. Please see + * {@see SecuritySettingsServiceClient::securitySettingsName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteSecuritySettingsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to + * delete. Format: + * `projects//locations//securitySettings/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to + * delete. Format: + * `projects//locations//securitySettings/`. + * + * 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 + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to + * delete. Format: + * `projects//locations//securitySettings/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSessionEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSessionEntityTypeRequest.php new file mode 100644 index 000000000000..628ffaacc6fd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSessionEntityTypeRequest.php @@ -0,0 +1,112 @@ +google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + */ +class DeleteSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session entity type to delete. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the session entity type to delete. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. Please see + * {@see SessionEntityTypesClient::sessionEntityTypeName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteSessionEntityTypeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the session entity type to delete. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session entity type to delete. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. + * + * 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 to delete. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolRequest.php new file mode 100644 index 000000000000..4a93d8242490 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolRequest.php @@ -0,0 +1,146 @@ +google.cloud.dialogflow.cx.v3.DeleteToolRequest + */ +class DeleteToolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Tool to be deleted. + * Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * This field has no effect for Tools not being used. + * For Tools that are used: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the Tool to be deleted. + * Format: + * `projects//locations//agents//tools/`. Please see + * {@see ToolsClient::toolName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteToolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Tool to be deleted. + * Format: + * `projects//locations//agents//tools/`. + * @type bool $force + * This field has no effect for Tools not being used. + * For Tools that are used: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Tool to be deleted. + * Format: + * `projects//locations//agents//tools/`. + * + * 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 Tool to be deleted. + * Format: + * `projects//locations//agents//tools/`. + * + * 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; + } + + /** + * This field has no effect for Tools not being used. + * For Tools that are used: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * This field has no effect for Tools not being used. + * For Tools that are used: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolVersionRequest.php new file mode 100644 index 000000000000..1a04d5fdf4b5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolVersionRequest.php @@ -0,0 +1,146 @@ +google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest + */ +class DeleteToolVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the tool version to delete. + * Format: + * `projects//locations//agents//tools//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. This field has no effect for Tools not being used. + * For Tools that are used: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the tool version to delete. + * Format: + * `projects//locations//agents//tools//versions/`. Please see + * {@see ToolsClient::toolVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteToolVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the tool version to delete. + * Format: + * `projects//locations//agents//tools//versions/`. + * @type bool $force + * Optional. This field has no effect for Tools not being used. + * For Tools that are used: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the tool version to delete. + * Format: + * `projects//locations//agents//tools//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 tool version to delete. + * Format: + * `projects//locations//agents//tools//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; + } + + /** + * Optional. This field has no effect for Tools not being used. + * For Tools that are used: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. This field has no effect for Tools not being used. + * For Tools that are used: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteTransitionRouteGroupRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteTransitionRouteGroupRequest.php new file mode 100644 index 000000000000..5be18f395885 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteTransitionRouteGroupRequest.php @@ -0,0 +1,161 @@ +google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + */ +class DeleteTransitionRouteGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * to delete. Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * This field has no effect for transition route group that no page is using. + * If the transition route group is referenced by any page: + * * If `force` is set to false, an error will be returned with message + * indicating pages that reference the transition route group. + * * If `force` is set to true, Dialogflow will remove the transition route + * group, as well as any reference to it. + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * to delete. Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. Please see + * {@see TransitionRouteGroupsClient::transitionRouteGroupName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteTransitionRouteGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * to delete. Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. + * @type bool $force + * This field has no effect for transition route group that no page is using. + * If the transition route group is referenced by any page: + * * If `force` is set to false, an error will be returned with message + * indicating pages that reference the transition route group. + * * If `force` is set to true, Dialogflow will remove the transition route + * group, as well as any reference to it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * to delete. Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. + * + * 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 + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * to delete. Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. + * + * 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; + } + + /** + * This field has no effect for transition route group that no page is using. + * If the transition route group is referenced by any page: + * * If `force` is set to false, an error will be returned with message + * indicating pages that reference the transition route group. + * * If `force` is set to true, Dialogflow will remove the transition route + * group, as well as any reference to it. + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * This field has no effect for transition route group that no page is using. + * If the transition route group is referenced by any page: + * * If `force` is set to false, an error will be returned with message + * indicating pages that reference the transition route group. + * * If `force` is set to true, Dialogflow will remove the transition route + * group, as well as any reference to it. + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteVersionRequest.php new file mode 100644 index 000000000000..626c94df2c3a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteVersionRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.DeleteVersionRequest + */ +class DeleteVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] + * to delete. Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] + * to delete. Format: + * `projects//locations//agents//flows//versions/`. Please see + * {@see VersionsClient::versionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] + * to delete. Format: + * `projects//locations//agents//flows//versions/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] + * to delete. Format: + * `projects//locations//agents//flows//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][google.cloud.dialogflow.cx.v3.Version] + * to delete. Format: + * `projects//locations//agents//flows//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteWebhookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteWebhookRequest.php new file mode 100644 index 000000000000..df7ac21131f8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteWebhookRequest.php @@ -0,0 +1,158 @@ +google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + */ +class DeleteWebhookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the webhook to delete. + * Format: + * `projects//locations//agents//webhooks/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * This field has no effect for webhook not being used. + * For webhooks that are used by pages/flows/transition route groups: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the webhook, as well + * as any references to the webhook (i.e. + * [Webhook][google.cloud.dialogflow.cx.v3.Fulfillment.webhook] and + * [tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag]in fulfillments that + * point to this webhook will be removed). + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the webhook to delete. + * Format: + * `projects//locations//agents//webhooks/`. Please see + * {@see WebhooksClient::webhookName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteWebhookRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the webhook to delete. + * Format: + * `projects//locations//agents//webhooks/`. + * @type bool $force + * This field has no effect for webhook not being used. + * For webhooks that are used by pages/flows/transition route groups: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the webhook, as well + * as any references to the webhook (i.e. + * [Webhook][google.cloud.dialogflow.cx.v3.Fulfillment.webhook] and + * [tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag]in fulfillments that + * point to this webhook will be removed). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the webhook to delete. + * Format: + * `projects//locations//agents//webhooks/`. + * + * 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 webhook to delete. + * Format: + * `projects//locations//agents//webhooks/`. + * + * 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; + } + + /** + * This field has no effect for webhook not being used. + * For webhooks that are used by pages/flows/transition route groups: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the webhook, as well + * as any references to the webhook (i.e. + * [Webhook][google.cloud.dialogflow.cx.v3.Fulfillment.webhook] and + * [tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag]in fulfillments that + * point to this webhook will be removed). + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * This field has no effect for webhook not being used. + * For webhooks that are used by pages/flows/transition route groups: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the webhook, as well + * as any references to the webhook (i.e. + * [Webhook][google.cloud.dialogflow.cx.v3.Fulfillment.webhook] and + * [tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag]in fulfillments that + * point to this webhook will be removed). + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowMetadata.php new file mode 100644 index 000000000000..4e17e1fa9810 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowMetadata.php @@ -0,0 +1,69 @@ +google.cloud.dialogflow.cx.v3.DeployFlowMetadata + */ +class DeployFlowMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Errors of running deployment tests. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + private $test_errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $test_errors + * Errors of running deployment tests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Errors of running deployment tests. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTestErrors() + { + return $this->test_errors; + } + + /** + * Errors of running deployment tests. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTestErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestError::class); + $this->test_errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowRequest.php new file mode 100644 index 000000000000..f9da9bee827c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowRequest.php @@ -0,0 +1,118 @@ +google.cloud.dialogflow.cx.v3.DeployFlowRequest + */ +class DeployFlowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The environment to deploy the flow to. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $environment = ''; + /** + * Required. The flow version to deploy. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $flow_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $environment + * Required. The environment to deploy the flow to. + * Format: + * `projects//locations//agents//environments/`. + * @type string $flow_version + * Required. The flow version to deploy. + * Format: + * `projects//locations//agents//flows//versions/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The environment to deploy the flow to. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Required. The environment to deploy the flow to. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + + /** + * Required. The flow version to deploy. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getFlowVersion() + { + return $this->flow_version; + } + + /** + * Required. The flow version to deploy. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setFlowVersion($var) + { + GPBUtil::checkString($var, True); + $this->flow_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowResponse.php new file mode 100644 index 000000000000..c95cb3d350e8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowResponse.php @@ -0,0 +1,120 @@ +google.cloud.dialogflow.cx.v3.DeployFlowResponse + */ +class DeployFlowResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The updated environment where the flow is deployed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment environment = 1; + */ + protected $environment = null; + /** + * The name of the flow version + * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: + * `projects//locations//agents//environments//deployments/`. + * + * Generated from protobuf field string deployment = 2; + */ + protected $deployment = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Environment $environment + * The updated environment where the flow is deployed. + * @type string $deployment + * The name of the flow version + * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: + * `projects//locations//agents//environments//deployments/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * The updated environment where the flow is deployed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment environment = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * The updated environment where the flow is deployed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment environment = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Environment::class); + $this->environment = $var; + + return $this; + } + + /** + * The name of the flow version + * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: + * `projects//locations//agents//environments//deployments/`. + * + * Generated from protobuf field string deployment = 2; + * @return string + */ + public function getDeployment() + { + return $this->deployment; + } + + /** + * The name of the flow version + * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: + * `projects//locations//agents//environments//deployments/`. + * + * Generated from protobuf field string deployment = 2; + * @param string $var + * @return $this + */ + public function setDeployment($var) + { + GPBUtil::checkString($var, True); + $this->deployment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment.php new file mode 100644 index 000000000000..860efcd56c61 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment.php @@ -0,0 +1,286 @@ +google.cloud.dialogflow.cx.v3.Deployment + */ +class Deployment extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the deployment. + * Format: + * projects//locations//agents//environments//deployments/. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The name of the flow version for this deployment. + * Format: + * projects//locations//agents//flows//versions/. + * + * Generated from protobuf field string flow_version = 2 [(.google.api.resource_reference) = { + */ + protected $flow_version = ''; + /** + * The current state of the deployment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.State state = 3; + */ + protected $state = 0; + /** + * Result of the deployment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; + */ + protected $result = null; + /** + * Start time of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + */ + protected $start_time = null; + /** + * End time of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the deployment. + * Format: + * projects//locations//agents//environments//deployments/. + * @type string $flow_version + * The name of the flow version for this deployment. + * Format: + * projects//locations//agents//flows//versions/. + * @type int $state + * The current state of the deployment. + * @type \Google\Cloud\Dialogflow\Cx\V3\Deployment\Result $result + * Result of the deployment. + * @type \Google\Protobuf\Timestamp $start_time + * Start time of this deployment. + * @type \Google\Protobuf\Timestamp $end_time + * End time of this deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Deployment::initOnce(); + parent::__construct($data); + } + + /** + * The name of the deployment. + * Format: + * projects//locations//agents//environments//deployments/. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the deployment. + * Format: + * projects//locations//agents//environments//deployments/. + * + * 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; + } + + /** + * The name of the flow version for this deployment. + * Format: + * projects//locations//agents//flows//versions/. + * + * Generated from protobuf field string flow_version = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getFlowVersion() + { + return $this->flow_version; + } + + /** + * The name of the flow version for this deployment. + * Format: + * projects//locations//agents//flows//versions/. + * + * Generated from protobuf field string flow_version = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setFlowVersion($var) + { + GPBUtil::checkString($var, True); + $this->flow_version = $var; + + return $this; + } + + /** + * The current state of the deployment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.State state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the deployment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.State state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Deployment\State::class); + $this->state = $var; + + return $this; + } + + /** + * Result of the deployment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\Deployment\Result|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Result of the deployment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\Deployment\Result $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Deployment\Result::class); + $this->result = $var; + + return $this; + } + + /** + * Start time of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + * @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); + } + + /** + * Start time of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * End time of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @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); + } + + /** + * End time of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/Result.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/Result.php new file mode 100644 index 000000000000..bfb689fa153f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/Result.php @@ -0,0 +1,120 @@ +google.cloud.dialogflow.cx.v3.Deployment.Result + */ +class Result extends \Google\Protobuf\Internal\Message +{ + /** + * Results of test cases running before the deployment. + * Format: + * `projects//locations//agents//testCases//results/`. + * + * Generated from protobuf field repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { + */ + private $deployment_test_results; + /** + * The name of the experiment triggered by this deployment. + * Format: + * projects//locations//agents//environments//experiments/. + * + * Generated from protobuf field string experiment = 2 [(.google.api.resource_reference) = { + */ + protected $experiment = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $deployment_test_results + * Results of test cases running before the deployment. + * Format: + * `projects//locations//agents//testCases//results/`. + * @type string $experiment + * The name of the experiment triggered by this deployment. + * Format: + * projects//locations//agents//environments//experiments/. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Deployment::initOnce(); + parent::__construct($data); + } + + /** + * Results of test cases running before the deployment. + * Format: + * `projects//locations//agents//testCases//results/`. + * + * Generated from protobuf field repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeploymentTestResults() + { + return $this->deployment_test_results; + } + + /** + * Results of test cases running before the deployment. + * Format: + * `projects//locations//agents//testCases//results/`. + * + * Generated from protobuf field repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeploymentTestResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->deployment_test_results = $arr; + + return $this; + } + + /** + * The name of the experiment triggered by this deployment. + * Format: + * projects//locations//agents//environments//experiments/. + * + * Generated from protobuf field string experiment = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getExperiment() + { + return $this->experiment; + } + + /** + * The name of the experiment triggered by this deployment. + * Format: + * projects//locations//agents//environments//experiments/. + * + * Generated from protobuf field string experiment = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setExperiment($var) + { + GPBUtil::checkString($var, True); + $this->experiment = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Result::class, \Google\Cloud\Dialogflow\Cx\V3\Deployment_Result::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/State.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/State.php new file mode 100644 index 000000000000..d7829f4b6501 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/State.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.cx.v3.Deployment.State + */ +class State +{ + /** + * State unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The deployment is running. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The deployment succeeded. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The deployment failed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + 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\Cx\V3\Deployment_State::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentRequest.php new file mode 100644 index 000000000000..7bf17368cf56 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentRequest.php @@ -0,0 +1,297 @@ +google.cloud.dialogflow.cx.v3.DetectIntentRequest + */ +class DetectIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session this query is sent to. + * Format: + * `projects//locations//agents//sessions/` or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * + * 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.cx.v3.QueryParameters query_params = 2; + */ + protected $query_params = null; + /** + * Required. The input specification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query_input = null; + /** + * Instructs the speech synthesizer how to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; + */ + protected $output_audio_config = null; + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $response_view = 0; + + /** + * 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//locations//agents//sessions/` or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * @type \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $query_params + * The parameters of this query. + * @type \Google\Cloud\Dialogflow\Cx\V3\QueryInput $query_input + * Required. The input specification. + * @type \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $output_audio_config + * Instructs the speech synthesizer how to generate the output audio. + * @type int $response_view + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session this query is sent to. + * Format: + * `projects//locations//agents//sessions/` or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * + * 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//locations//agents//sessions/` or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * + * 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.cx.v3.QueryParameters query_params = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.QueryParameters query_params = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $var + * @return $this + */ + public function setQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryParameters::class); + $this->query_params = $var; + + return $this; + } + + /** + * Required. The input specification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\QueryInput $var + * @return $this + */ + public function setQueryInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryInput::class); + $this->query_input = $var; + + return $this; + } + + /** + * Instructs the speech synthesizer how to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\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. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $var + * @return $this + */ + public function setOutputAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig::class); + $this->output_audio_config = $var; + + return $this; + } + + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponseView::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse.php new file mode 100644 index 000000000000..fc0fb78e21c2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse.php @@ -0,0 +1,305 @@ +google.cloud.dialogflow.cx.v3.DetectIntentResponse + */ +class DetectIntentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. 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 the conversational query. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; + */ + protected $query_result = 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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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.cx.v3.OutputAudioConfig output_audio_config = 5; + */ + protected $output_audio_config = null; + /** + * Response type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType response_type = 6; + */ + protected $response_type = 0; + /** + * Indicates whether the partial response can be cancelled when a later + * response arrives. e.g. if the agent specified some music as partial + * response, it can be cancelled. + * + * Generated from protobuf field bool allow_cancellation = 7; + */ + protected $allow_cancellation = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $response_id + * Output only. 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\Cx\V3\QueryResult $query_result + * The result of the conversational query. + * @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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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\Cx\V3\OutputAudioConfig $output_audio_config + * The config used by the speech synthesizer to generate the output audio. + * @type int $response_type + * Response type. + * @type bool $allow_cancellation + * Indicates whether the partial response can be cancelled when a later + * response arrives. e.g. if the agent specified some music as partial + * response, it can be cancelled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Output only. 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; + } + + /** + * Output only. 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 the conversational query. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\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. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\QueryResult $var + * @return $this + */ + public function setQueryResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryResult::class); + $this->query_result = $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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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.cx.v3.OutputAudioConfig output_audio_config = 5; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.OutputAudioConfig output_audio_config = 5; + * @param \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $var + * @return $this + */ + public function setOutputAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig::class); + $this->output_audio_config = $var; + + return $this; + } + + /** + * Response type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType response_type = 6; + * @return int + */ + public function getResponseType() + { + return $this->response_type; + } + + /** + * Response type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType response_type = 6; + * @param int $var + * @return $this + */ + public function setResponseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse\ResponseType::class); + $this->response_type = $var; + + return $this; + } + + /** + * Indicates whether the partial response can be cancelled when a later + * response arrives. e.g. if the agent specified some music as partial + * response, it can be cancelled. + * + * Generated from protobuf field bool allow_cancellation = 7; + * @return bool + */ + public function getAllowCancellation() + { + return $this->allow_cancellation; + } + + /** + * Indicates whether the partial response can be cancelled when a later + * response arrives. e.g. if the agent specified some music as partial + * response, it can be cancelled. + * + * Generated from protobuf field bool allow_cancellation = 7; + * @param bool $var + * @return $this + */ + public function setAllowCancellation($var) + { + GPBUtil::checkBool($var); + $this->allow_cancellation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse/ResponseType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse/ResponseType.php new file mode 100644 index 000000000000..12b6c3e071b4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse/ResponseType.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType + */ +class ResponseType +{ + /** + * Not specified. This should never happen. + * + * Generated from protobuf enum RESPONSE_TYPE_UNSPECIFIED = 0; + */ + const RESPONSE_TYPE_UNSPECIFIED = 0; + /** + * Partial response. e.g. Aggregated responses in a Fulfillment that enables + * `return_partial_response` can be returned as partial response. + * WARNING: partial response is not eligible for barge-in. + * + * Generated from protobuf enum PARTIAL = 1; + */ + const PARTIAL = 1; + /** + * Final response. + * + * Generated from protobuf enum FINAL = 2; + */ + const PBFINAL = 2; + + private static $valueToName = [ + self::RESPONSE_TYPE_UNSPECIFIED => 'RESPONSE_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(ResponseType::class, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse_ResponseType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponseView.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponseView.php new file mode 100644 index 000000000000..694f0dc28982 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponseView.php @@ -0,0 +1,73 @@ +google.cloud.dialogflow.cx.v3.DetectIntentResponseView + */ +class DetectIntentResponseView +{ + /** + * Not specified. `DETECT_INTENT_RESPONSE_VIEW_DEFAULT` will be used. + * + * Generated from protobuf enum DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED = 0; + */ + const DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED = 0; + /** + * Full response view includes all fields. + * + * Generated from protobuf enum DETECT_INTENT_RESPONSE_VIEW_FULL = 1; + */ + const DETECT_INTENT_RESPONSE_VIEW_FULL = 1; + /** + * Basic response view omits the following fields: + * - + * [QueryResult.diagnostic_info][google.cloud.dialogflow.cx.v3.QueryResult.diagnostic_info] + * + * Generated from protobuf enum DETECT_INTENT_RESPONSE_VIEW_BASIC = 2; + */ + const DETECT_INTENT_RESPONSE_VIEW_BASIC = 2; + /** + * Default response view omits the following fields: + * - + * [QueryResult.trace_blocks][google.cloud.dialogflow.cx.v3.QueryResult.trace_blocks] + * + * Generated from protobuf enum DETECT_INTENT_RESPONSE_VIEW_DEFAULT = 3; + */ + const DETECT_INTENT_RESPONSE_VIEW_DEFAULT = 3; + + private static $valueToName = [ + self::DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED => 'DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED', + self::DETECT_INTENT_RESPONSE_VIEW_FULL => 'DETECT_INTENT_RESPONSE_VIEW_FULL', + self::DETECT_INTENT_RESPONSE_VIEW_BASIC => 'DETECT_INTENT_RESPONSE_VIEW_BASIC', + self::DETECT_INTENT_RESPONSE_VIEW_DEFAULT => 'DETECT_INTENT_RESPONSE_VIEW_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); + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DocumentProcessingMode.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DocumentProcessingMode.php new file mode 100644 index 000000000000..4693742eb6cd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DocumentProcessingMode.php @@ -0,0 +1,63 @@ +google.cloud.dialogflow.cx.v3.DocumentProcessingMode + */ +class DocumentProcessingMode +{ + /** + * Not specified. This should be set for STRUCTURED type data stores. Due to + * legacy reasons this is considered as DOCUMENTS for STRUCTURED and + * PUBLIC_WEB data stores. + * + * Generated from protobuf enum DOCUMENT_PROCESSING_MODE_UNSPECIFIED = 0; + */ + const DOCUMENT_PROCESSING_MODE_UNSPECIFIED = 0; + /** + * Documents are processed as documents. + * + * Generated from protobuf enum DOCUMENTS = 1; + */ + const DOCUMENTS = 1; + /** + * Documents are converted to chunks. + * + * Generated from protobuf enum CHUNKS = 2; + */ + const CHUNKS = 2; + + private static $valueToName = [ + self::DOCUMENT_PROCESSING_MODE_UNSPECIFIED => 'DOCUMENT_PROCESSING_MODE_UNSPECIFIED', + self::DOCUMENTS => 'DOCUMENTS', + self::CHUNKS => 'CHUNKS', + ]; + + 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DtmfInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DtmfInput.php new file mode 100644 index 000000000000..654ce0c03572 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DtmfInput.php @@ -0,0 +1,101 @@ +google.cloud.dialogflow.cx.v3.DtmfInput + */ +class DtmfInput extends \Google\Protobuf\Internal\Message +{ + /** + * The dtmf digits. + * + * Generated from protobuf field string digits = 1; + */ + protected $digits = ''; + /** + * The finish digit (if any). + * + * Generated from protobuf field string finish_digit = 2; + */ + protected $finish_digit = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $digits + * The dtmf digits. + * @type string $finish_digit + * The finish digit (if any). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * The dtmf digits. + * + * Generated from protobuf field string digits = 1; + * @return string + */ + public function getDigits() + { + return $this->digits; + } + + /** + * The dtmf digits. + * + * Generated from protobuf field string digits = 1; + * @param string $var + * @return $this + */ + public function setDigits($var) + { + GPBUtil::checkString($var, True); + $this->digits = $var; + + return $this; + } + + /** + * The finish digit (if any). + * + * Generated from protobuf field string finish_digit = 2; + * @return string + */ + public function getFinishDigit() + { + return $this->finish_digit; + } + + /** + * The finish digit (if any). + * + * Generated from protobuf field string finish_digit = 2; + * @param string $var + * @return $this + */ + public function setFinishDigit($var) + { + GPBUtil::checkString($var, True); + $this->finish_digit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType.php new file mode 100644 index 000000000000..1bd168f35fcc --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType.php @@ -0,0 +1,371 @@ +google.cloud.dialogflow.cx.v3.EntityType + */ +class EntityType extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the entity type. + * Required for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityType]. + * Format: + * `projects//locations//agents//entityTypes/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the entity type, unique within the + * agent. + * + * 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.cx.v3.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kind = 0; + /** + * Indicates whether the entity type can be automatically expanded. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode auto_expansion_mode = 4; + */ + protected $auto_expansion_mode = 0; + /** + * The collection of entity entries associated with the entity type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5; + */ + private $entities; + /** + * Collection of exceptional words and phrases that shouldn't be matched. + * For example, if you have a size entity type with entry `giant`(an + * adjective), you might consider adding `giants`(a noun) as an exclusion. + * If the kind of entity type is `KIND_MAP`, then the phrases specified by + * entities and excluded phrases should be mutually exclusive. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6; + */ + private $excluded_phrases; + /** + * Enables fuzzy entity extraction during classification. + * + * Generated from protobuf field bool enable_fuzzy_extraction = 7; + */ + protected $enable_fuzzy_extraction = false; + /** + * Indicates whether parameters of the entity type should be redacted in log. + * If redaction is enabled, page parameters and intent parameters referring to + * the entity type will be replaced by parameter name when logging. + * + * Generated from protobuf field bool redact = 9; + */ + protected $redact = 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.cx.v3.EntityTypes.UpdateEntityType]. + * Format: + * `projects//locations//agents//entityTypes/`. + * @type string $display_name + * Required. The human-readable name of the entity type, unique within the + * agent. + * @type int $kind + * Required. Indicates the kind of entity type. + * @type int $auto_expansion_mode + * Indicates whether the entity type can be automatically expanded. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * The collection of entity entries associated with the entity type. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\EntityType\ExcludedPhrase>|\Google\Protobuf\Internal\RepeatedField $excluded_phrases + * Collection of exceptional words and phrases that shouldn't be matched. + * For example, if you have a size entity type with entry `giant`(an + * adjective), you might consider adding `giants`(a noun) as an exclusion. + * If the kind of entity type is `KIND_MAP`, then the phrases specified by + * entities and excluded phrases should be mutually exclusive. + * @type bool $enable_fuzzy_extraction + * Enables fuzzy entity extraction during classification. + * @type bool $redact + * Indicates whether parameters of the entity type should be redacted in log. + * If redaction is enabled, page parameters and intent parameters referring to + * the entity type will be replaced by parameter name when logging. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the entity type. + * Required for + * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityType]. + * Format: + * `projects//locations//agents//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.cx.v3.EntityTypes.UpdateEntityType]. + * Format: + * `projects//locations//agents//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 human-readable name of the entity type, unique within the + * 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 human-readable name of the entity type, unique within the + * 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. Indicates the kind of entity type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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.cx.v3.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\EntityType\Kind::class); + $this->kind = $var; + + return $this; + } + + /** + * Indicates whether the entity type can be automatically expanded. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode auto_expansion_mode = 4; + * @return int + */ + public function getAutoExpansionMode() + { + return $this->auto_expansion_mode; + } + + /** + * Indicates whether the entity type can be automatically expanded. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode auto_expansion_mode = 4; + * @param int $var + * @return $this + */ + public function setAutoExpansionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\EntityType\AutoExpansionMode::class); + $this->auto_expansion_mode = $var; + + return $this; + } + + /** + * The collection of entity entries associated with the entity type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * The collection of entity entries associated with the entity type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\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\Cx\V3\EntityType\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * Collection of exceptional words and phrases that shouldn't be matched. + * For example, if you have a size entity type with entry `giant`(an + * adjective), you might consider adding `giants`(a noun) as an exclusion. + * If the kind of entity type is `KIND_MAP`, then the phrases specified by + * entities and excluded phrases should be mutually exclusive. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedPhrases() + { + return $this->excluded_phrases; + } + + /** + * Collection of exceptional words and phrases that shouldn't be matched. + * For example, if you have a size entity type with entry `giant`(an + * adjective), you might consider adding `giants`(a noun) as an exclusion. + * If the kind of entity type is `KIND_MAP`, then the phrases specified by + * entities and excluded phrases should be mutually exclusive. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\EntityType\ExcludedPhrase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedPhrases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\EntityType\ExcludedPhrase::class); + $this->excluded_phrases = $arr; + + return $this; + } + + /** + * Enables fuzzy entity extraction during classification. + * + * Generated from protobuf field bool enable_fuzzy_extraction = 7; + * @return bool + */ + public function getEnableFuzzyExtraction() + { + return $this->enable_fuzzy_extraction; + } + + /** + * Enables fuzzy entity extraction during classification. + * + * Generated from protobuf field bool enable_fuzzy_extraction = 7; + * @param bool $var + * @return $this + */ + public function setEnableFuzzyExtraction($var) + { + GPBUtil::checkBool($var); + $this->enable_fuzzy_extraction = $var; + + return $this; + } + + /** + * Indicates whether parameters of the entity type should be redacted in log. + * If redaction is enabled, page parameters and intent parameters referring to + * the entity type will be replaced by parameter name when logging. + * + * Generated from protobuf field bool redact = 9; + * @return bool + */ + public function getRedact() + { + return $this->redact; + } + + /** + * Indicates whether parameters of the entity type should be redacted in log. + * If redaction is enabled, page parameters and intent parameters referring to + * the entity type will be replaced by parameter name when logging. + * + * Generated from protobuf field bool redact = 9; + * @param bool $var + * @return $this + */ + public function setRedact($var) + { + GPBUtil::checkBool($var); + $this->redact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/AutoExpansionMode.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/AutoExpansionMode.php new file mode 100644 index 000000000000..559d1962f4d5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/AutoExpansionMode.php @@ -0,0 +1,60 @@ +google.cloud.dialogflow.cx.v3.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\Cx\V3\EntityType_AutoExpansionMode::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Entity.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Entity.php new file mode 100644 index 000000000000..41a9b8368877 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Entity.php @@ -0,0 +1,148 @@ +google.cloud.dialogflow.cx.v3.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 canonical 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 canonical 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\Cx\V3\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 canonical 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 canonical 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\Cx\V3\EntityType_Entity::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/ExcludedPhrase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/ExcludedPhrase.php new file mode 100644 index 000000000000..5ac177826372 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/ExcludedPhrase.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + */ +class ExcludedPhrase extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The word or phrase to be excluded. + * + * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * Required. The word or phrase to be excluded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The word or phrase to be excluded. + * + * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Required. The word or phrase to be excluded. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExcludedPhrase::class, \Google\Cloud\Dialogflow\Cx\V3\EntityType_ExcludedPhrase::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Kind.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Kind.php new file mode 100644 index 000000000000..f7d9bcbfcc53 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Kind.php @@ -0,0 +1,75 @@ +google.cloud.dialogflow.cx.v3.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 canonical + * 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 canonical + * 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\Cx\V3\EntityType_Kind::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment.php new file mode 100644 index 000000000000..3674b1ac6cbd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment.php @@ -0,0 +1,336 @@ +google.cloud.dialogflow.cx.v3.Environment + */ +class Environment extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the environment. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the environment (unique in an agent). + * Limit of 64 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * The human-readable description of the environment. The maximum length is + * 500 characters. If exceeded, the request is rejected. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * A list of configurations for flow versions. You should include version + * configs for all flows that are reachable from [`Start + * Flow`][Agent.start_flow] in the agent. Otherwise, an error will be + * returned. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment.VersionConfig version_configs = 6; + */ + private $version_configs; + /** + * Output only. Update time of this environment. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The test cases config for continuous tests of this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; + */ + protected $test_cases_config = null; + /** + * The webhook configuration for this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.WebhookConfig webhook_config = 10; + */ + protected $webhook_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the environment. + * Format: + * `projects//locations//agents//environments/`. + * @type string $display_name + * Required. The human-readable name of the environment (unique in an agent). + * Limit of 64 characters. + * @type string $description + * The human-readable description of the environment. The maximum length is + * 500 characters. If exceeded, the request is rejected. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Environment\VersionConfig>|\Google\Protobuf\Internal\RepeatedField $version_configs + * A list of configurations for flow versions. You should include version + * configs for all flows that are reachable from [`Start + * Flow`][Agent.start_flow] in the agent. Otherwise, an error will be + * returned. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update time of this environment. + * @type \Google\Cloud\Dialogflow\Cx\V3\Environment\TestCasesConfig $test_cases_config + * The test cases config for continuous tests of this environment. + * @type \Google\Cloud\Dialogflow\Cx\V3\Environment\WebhookConfig $webhook_config + * The webhook configuration for this environment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * The name of the environment. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the environment. + * Format: + * `projects//locations//agents//environments/`. + * + * 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 human-readable name of the environment (unique in an agent). + * Limit of 64 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the environment (unique in an agent). + * Limit of 64 characters. + * + * 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; + } + + /** + * The human-readable description of the environment. The maximum length is + * 500 characters. If exceeded, the request is rejected. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The human-readable description of the environment. The maximum length is + * 500 characters. If exceeded, the request is rejected. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * A list of configurations for flow versions. You should include version + * configs for all flows that are reachable from [`Start + * Flow`][Agent.start_flow] in the agent. Otherwise, an error will be + * returned. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment.VersionConfig version_configs = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVersionConfigs() + { + return $this->version_configs; + } + + /** + * A list of configurations for flow versions. You should include version + * configs for all flows that are reachable from [`Start + * Flow`][Agent.start_flow] in the agent. Otherwise, an error will be + * returned. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment.VersionConfig version_configs = 6; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Environment\VersionConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVersionConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Environment\VersionConfig::class); + $this->version_configs = $arr; + + return $this; + } + + /** + * Output only. Update time of this environment. + * + * 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. Update time of this environment. + * + * 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; + } + + /** + * The test cases config for continuous tests of this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; + * @return \Google\Cloud\Dialogflow\Cx\V3\Environment\TestCasesConfig|null + */ + public function getTestCasesConfig() + { + return $this->test_cases_config; + } + + public function hasTestCasesConfig() + { + return isset($this->test_cases_config); + } + + public function clearTestCasesConfig() + { + unset($this->test_cases_config); + } + + /** + * The test cases config for continuous tests of this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; + * @param \Google\Cloud\Dialogflow\Cx\V3\Environment\TestCasesConfig $var + * @return $this + */ + public function setTestCasesConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Environment\TestCasesConfig::class); + $this->test_cases_config = $var; + + return $this; + } + + /** + * The webhook configuration for this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.WebhookConfig webhook_config = 10; + * @return \Google\Cloud\Dialogflow\Cx\V3\Environment\WebhookConfig|null + */ + public function getWebhookConfig() + { + return $this->webhook_config; + } + + public function hasWebhookConfig() + { + return isset($this->webhook_config); + } + + public function clearWebhookConfig() + { + unset($this->webhook_config); + } + + /** + * The webhook configuration for this environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.WebhookConfig webhook_config = 10; + * @param \Google\Cloud\Dialogflow\Cx\V3\Environment\WebhookConfig $var + * @return $this + */ + public function setWebhookConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Environment\WebhookConfig::class); + $this->webhook_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/TestCasesConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/TestCasesConfig.php new file mode 100644 index 000000000000..421b8d8587f9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/TestCasesConfig.php @@ -0,0 +1,162 @@ +google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + */ +class TestCasesConfig extends \Google\Protobuf\Internal\Message +{ + /** + * A list of test case names to run. They should be under the same agent. + * Format of each test case name: + * `projects//locations//agents//testCases/` + * + * Generated from protobuf field repeated string test_cases = 1 [(.google.api.resource_reference) = { + */ + private $test_cases; + /** + * Whether to run test cases in + * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] + * periodically. Default false. If set to true, run once a day. + * + * Generated from protobuf field bool enable_continuous_run = 2; + */ + protected $enable_continuous_run = false; + /** + * Whether to run test cases in + * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] + * before deploying a flow version to the environment. Default false. + * + * Generated from protobuf field bool enable_predeployment_run = 3; + */ + protected $enable_predeployment_run = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $test_cases + * A list of test case names to run. They should be under the same agent. + * Format of each test case name: + * `projects//locations//agents//testCases/` + * @type bool $enable_continuous_run + * Whether to run test cases in + * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] + * periodically. Default false. If set to true, run once a day. + * @type bool $enable_predeployment_run + * Whether to run test cases in + * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] + * before deploying a flow version to the environment. Default false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * A list of test case names to run. They should be under the same agent. + * Format of each test case name: + * `projects//locations//agents//testCases/` + * + * Generated from protobuf field repeated string test_cases = 1 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTestCases() + { + return $this->test_cases; + } + + /** + * A list of test case names to run. They should be under the same agent. + * Format of each test case name: + * `projects//locations//agents//testCases/` + * + * Generated from protobuf field repeated string test_cases = 1 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTestCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->test_cases = $arr; + + return $this; + } + + /** + * Whether to run test cases in + * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] + * periodically. Default false. If set to true, run once a day. + * + * Generated from protobuf field bool enable_continuous_run = 2; + * @return bool + */ + public function getEnableContinuousRun() + { + return $this->enable_continuous_run; + } + + /** + * Whether to run test cases in + * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] + * periodically. Default false. If set to true, run once a day. + * + * Generated from protobuf field bool enable_continuous_run = 2; + * @param bool $var + * @return $this + */ + public function setEnableContinuousRun($var) + { + GPBUtil::checkBool($var); + $this->enable_continuous_run = $var; + + return $this; + } + + /** + * Whether to run test cases in + * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] + * before deploying a flow version to the environment. Default false. + * + * Generated from protobuf field bool enable_predeployment_run = 3; + * @return bool + */ + public function getEnablePredeploymentRun() + { + return $this->enable_predeployment_run; + } + + /** + * Whether to run test cases in + * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] + * before deploying a flow version to the environment. Default false. + * + * Generated from protobuf field bool enable_predeployment_run = 3; + * @param bool $var + * @return $this + */ + public function setEnablePredeploymentRun($var) + { + GPBUtil::checkBool($var); + $this->enable_predeployment_run = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TestCasesConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Environment_TestCasesConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/VersionConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/VersionConfig.php new file mode 100644 index 000000000000..910929155724 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/VersionConfig.php @@ -0,0 +1,94 @@ +google.cloud.dialogflow.cx.v3.Environment.VersionConfig + */ +class VersionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Flow, playbook and tool versions are supported. + * Format for flow version: + * projects//locations//agents//flows//versions/. + * Format for playbook version: + * projects//locations//agents//playbooks//versions/. + * Format for tool version: + * projects//locations//agents//tools//versions/. + * + * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * Required. Flow, playbook and tool versions are supported. + * Format for flow version: + * projects//locations//agents//flows//versions/. + * Format for playbook version: + * projects//locations//agents//playbooks//versions/. + * Format for tool version: + * projects//locations//agents//tools//versions/. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. Flow, playbook and tool versions are supported. + * Format for flow version: + * projects//locations//agents//flows//versions/. + * Format for playbook version: + * projects//locations//agents//playbooks//versions/. + * Format for tool version: + * projects//locations//agents//tools//versions/. + * + * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Required. Flow, playbook and tool versions are supported. + * Format for flow version: + * projects//locations//agents//flows//versions/. + * Format for playbook version: + * projects//locations//agents//playbooks//versions/. + * Format for tool version: + * projects//locations//agents//tools//versions/. + * + * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VersionConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Environment_VersionConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/WebhookConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/WebhookConfig.php new file mode 100644 index 000000000000..482aabedcf25 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/WebhookConfig.php @@ -0,0 +1,86 @@ +google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + */ +class WebhookConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The list of webhooks to override for the agent environment. The webhook + * must exist in the agent. You can override fields in + * [`generic_web_service`][google.cloud.dialogflow.cx.v3.Webhook.generic_web_service] + * and + * [`service_directory`][google.cloud.dialogflow.cx.v3.Webhook.service_directory]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Webhook webhook_overrides = 1; + */ + private $webhook_overrides; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Webhook>|\Google\Protobuf\Internal\RepeatedField $webhook_overrides + * The list of webhooks to override for the agent environment. The webhook + * must exist in the agent. You can override fields in + * [`generic_web_service`][google.cloud.dialogflow.cx.v3.Webhook.generic_web_service] + * and + * [`service_directory`][google.cloud.dialogflow.cx.v3.Webhook.service_directory]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * The list of webhooks to override for the agent environment. The webhook + * must exist in the agent. You can override fields in + * [`generic_web_service`][google.cloud.dialogflow.cx.v3.Webhook.generic_web_service] + * and + * [`service_directory`][google.cloud.dialogflow.cx.v3.Webhook.service_directory]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Webhook webhook_overrides = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWebhookOverrides() + { + return $this->webhook_overrides; + } + + /** + * The list of webhooks to override for the agent environment. The webhook + * must exist in the agent. You can override fields in + * [`generic_web_service`][google.cloud.dialogflow.cx.v3.Webhook.generic_web_service] + * and + * [`service_directory`][google.cloud.dialogflow.cx.v3.Webhook.service_directory]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Webhook webhook_overrides = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Webhook>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWebhookOverrides($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Webhook::class); + $this->webhook_overrides = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebhookConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Environment_WebhookConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventHandler.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventHandler.php new file mode 100644 index 000000000000..69dc1970bcfc --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventHandler.php @@ -0,0 +1,297 @@ +google.cloud.dialogflow.cx.v3.EventHandler + */ +class EventHandler extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique identifier of this event handler. + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. The name of the event to handle. + * + * Generated from protobuf field string event = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event = ''; + /** + * The fulfillment to call when the event occurs. + * Handling webhook errors with a fulfillment enabled with webhook could + * cause infinite loop. It is invalid to specify such fulfillment for a + * handler handling webhooks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5; + */ + protected $trigger_fulfillment = null; + protected $target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique identifier of this event handler. + * @type string $event + * Required. The name of the event to handle. + * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $trigger_fulfillment + * The fulfillment to call when the event occurs. + * Handling webhook errors with a fulfillment enabled with webhook could + * cause infinite loop. It is invalid to specify such fulfillment for a + * handler handling webhooks. + * @type string $target_page + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * @type string $target_flow + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * @type string $target_playbook + * The target playbook to transition to. + * Format: + * `projects//locations//agents//playbooks/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique identifier of this event handler. + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique identifier of this event handler. + * + * Generated from protobuf field string name = 6 [(.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 name of the event to handle. + * + * Generated from protobuf field string event = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEvent() + { + return $this->event; + } + + /** + * Required. The name of the event to handle. + * + * Generated from protobuf field string event = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkString($var, True); + $this->event = $var; + + return $this; + } + + /** + * The fulfillment to call when the event occurs. + * Handling webhook errors with a fulfillment enabled with webhook could + * cause infinite loop. It is invalid to specify such fulfillment for a + * handler handling webhooks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5; + * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment|null + */ + public function getTriggerFulfillment() + { + return $this->trigger_fulfillment; + } + + public function hasTriggerFulfillment() + { + return isset($this->trigger_fulfillment); + } + + public function clearTriggerFulfillment() + { + unset($this->trigger_fulfillment); + } + + /** + * The fulfillment to call when the event occurs. + * Handling webhook errors with a fulfillment enabled with webhook could + * cause infinite loop. It is invalid to specify such fulfillment for a + * handler handling webhooks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5; + * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var + * @return $this + */ + public function setTriggerFulfillment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); + $this->trigger_fulfillment = $var; + + return $this; + } + + /** + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string target_page = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetPage() + { + return $this->readOneof(2); + } + + public function hasTargetPage() + { + return $this->hasOneof(2); + } + + /** + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string target_page = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetPage($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string target_flow = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetFlow() + { + return $this->readOneof(3); + } + + public function hasTargetFlow() + { + return $this->hasOneof(3); + } + + /** + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string target_flow = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetFlow($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The target playbook to transition to. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string target_playbook = 7 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetPlaybook() + { + return $this->readOneof(7); + } + + public function hasTargetPlaybook() + { + return $this->hasOneof(7); + } + + /** + * The target playbook to transition to. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string target_playbook = 7 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetPlaybook($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventInput.php new file mode 100644 index 000000000000..235626b202bd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventInput.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.cx.v3.EventInput + */ +class EventInput extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the event. + * + * Generated from protobuf field string event = 1; + */ + protected $event = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $event + * Name of the event. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Name of the event. + * + * Generated from protobuf field string event = 1; + * @return string + */ + public function getEvent() + { + return $this->event; + } + + /** + * Name of the event. + * + * Generated from protobuf field string event = 1; + * @param string $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkString($var, True); + $this->event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Example.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Example.php new file mode 100644 index 000000000000..6d4ee67a9e6b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Example.php @@ -0,0 +1,481 @@ +google.cloud.dialogflow.cx.v3.Example + */ +class Example extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the playbook example. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. The input to the playbook in the example. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $playbook_input = null; + /** + * Optional. The output of the playbook in the example. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $playbook_output = null; + /** + * Required. The ordered list of actions performed by the end user and the + * Dialogflow agent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $actions; + /** + * Required. The display name of the example. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. The high level concise description of the example. The max number + * of characters is 200. + * + * Generated from protobuf field string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Estimated number of tokes current example takes when sent to + * the LLM. + * + * Generated from protobuf field int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $token_count = 0; + /** + * Output only. The timestamp of initial example creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last time the example was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. Example's output state. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversation_state = 0; + /** + * Optional. The language code of the example. + * If not specified, the agent's default language is used. + * Note: languages must be enabled in the agent before they can be used. + * Note: example's language code is not currently used in dialogflow agents. + * + * Generated from protobuf field string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the playbook example. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\PlaybookInput $playbook_input + * Optional. The input to the playbook in the example. + * @type \Google\Cloud\Dialogflow\Cx\V3\PlaybookOutput $playbook_output + * Optional. The output of the playbook in the example. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Action>|\Google\Protobuf\Internal\RepeatedField $actions + * Required. The ordered list of actions performed by the end user and the + * Dialogflow agent. + * @type string $display_name + * Required. The display name of the example. + * @type string $description + * Optional. The high level concise description of the example. The max number + * of characters is 200. + * @type int|string $token_count + * Output only. Estimated number of tokes current example takes when sent to + * the LLM. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp of initial example creation. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last time the example was updated. + * @type int $conversation_state + * Required. Example's output state. + * @type string $language_code + * Optional. The language code of the example. + * If not specified, the agent's default language is used. + * Note: languages must be enabled in the agent before they can be used. + * Note: example's language code is not currently used in dialogflow agents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Example::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the playbook example. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the playbook example. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * + * 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 input to the playbook in the example. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\PlaybookInput|null + */ + public function getPlaybookInput() + { + return $this->playbook_input; + } + + public function hasPlaybookInput() + { + return isset($this->playbook_input); + } + + public function clearPlaybookInput() + { + unset($this->playbook_input); + } + + /** + * Optional. The input to the playbook in the example. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\PlaybookInput $var + * @return $this + */ + public function setPlaybookInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PlaybookInput::class); + $this->playbook_input = $var; + + return $this; + } + + /** + * Optional. The output of the playbook in the example. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\PlaybookOutput|null + */ + public function getPlaybookOutput() + { + return $this->playbook_output; + } + + public function hasPlaybookOutput() + { + return isset($this->playbook_output); + } + + public function clearPlaybookOutput() + { + unset($this->playbook_output); + } + + /** + * Optional. The output of the playbook in the example. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\PlaybookOutput $var + * @return $this + */ + public function setPlaybookOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PlaybookOutput::class); + $this->playbook_output = $var; + + return $this; + } + + /** + * Required. The ordered list of actions performed by the end user and the + * Dialogflow agent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActions() + { + return $this->actions; + } + + /** + * Required. The ordered list of actions performed by the end user and the + * Dialogflow agent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Action>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Action::class); + $this->actions = $arr; + + return $this; + } + + /** + * Required. The display name of the example. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the example. + * + * Generated from protobuf field string display_name = 6 [(.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 high level concise description of the example. The max number + * of characters is 200. + * + * Generated from protobuf field string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The high level concise description of the example. The max number + * of characters is 200. + * + * Generated from protobuf field string description = 8 [(.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. Estimated number of tokes current example takes when sent to + * the LLM. + * + * Generated from protobuf field int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTokenCount() + { + return $this->token_count; + } + + /** + * Output only. Estimated number of tokes current example takes when sent to + * the LLM. + * + * Generated from protobuf field int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTokenCount($var) + { + GPBUtil::checkInt64($var); + $this->token_count = $var; + + return $this; + } + + /** + * Output only. The timestamp of initial example creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.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 timestamp of initial example creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.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. Last time the example was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last time the example was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Required. Example's output state. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getConversationState() + { + return $this->conversation_state; + } + + /** + * Required. Example's output state. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setConversationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\OutputState::class); + $this->conversation_state = $var; + + return $this; + } + + /** + * Optional. The language code of the example. + * If not specified, the agent's default language is used. + * Note: languages must be enabled in the agent before they can be used. + * Note: example's language code is not currently used in dialogflow agents. + * + * Generated from protobuf field string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language code of the example. + * If not specified, the agent's default language is used. + * Note: languages must be enabled in the agent before they can be used. + * Note: example's language code is not currently used in dialogflow agents. + * + * Generated from protobuf field string language_code = 13 [(.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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment.php new file mode 100644 index 000000000000..84ed495da596 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment.php @@ -0,0 +1,685 @@ +google.cloud.dialogflow.cx.v3.Experiment + */ +class Experiment extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the experiment. + * Format: + * projects//locations//agents//environments//experiments/. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the experiment (unique in an + * environment). Limit of 64 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * The human-readable description of the experiment. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The current state of the experiment. + * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. + * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or + * RUNNING->DONE. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + */ + protected $state = 0; + /** + * The definition of the experiment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + */ + protected $definition = null; + /** + * The configuration for auto rollout. If set, there should be exactly two + * variants in the experiment (control variant being the default version of + * the flow), the traffic allocation for the non-control variant will + * gradually increase to 100% when conditions are met, and eventually + * replace the control variant to become the default version of the flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + */ + protected $rollout_config = null; + /** + * State of the auto rollout process. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + */ + protected $rollout_state = null; + /** + * The reason why rollout has failed. Should only be set when state is + * ROLLOUT_FAILED. + * + * Generated from protobuf field string rollout_failure_reason = 16; + */ + protected $rollout_failure_reason = ''; + /** + * Inference result of the experiment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + */ + protected $result = null; + /** + * Creation time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + */ + protected $create_time = null; + /** + * Start time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + */ + protected $start_time = null; + /** + * End time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 9; + */ + protected $end_time = null; + /** + * Last update time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 10; + */ + protected $last_update_time = null; + /** + * Maximum number of days to run the experiment/rollout. If auto-rollout is + * not enabled, default value and maximum will be 30 days. If auto-rollout is + * enabled, default value and maximum will be 6 days. + * + * Generated from protobuf field .google.protobuf.Duration experiment_length = 11; + */ + protected $experiment_length = null; + /** + * The history of updates to the experiment variants. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + */ + private $variants_history; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the experiment. + * Format: + * projects//locations//agents//environments//experiments/. + * @type string $display_name + * Required. The human-readable name of the experiment (unique in an + * environment). Limit of 64 characters. + * @type string $description + * The human-readable description of the experiment. + * @type int $state + * The current state of the experiment. + * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. + * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or + * RUNNING->DONE. + * @type \Google\Cloud\Dialogflow\Cx\V3\Experiment\Definition $definition + * The definition of the experiment. + * @type \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig $rollout_config + * The configuration for auto rollout. If set, there should be exactly two + * variants in the experiment (control variant being the default version of + * the flow), the traffic allocation for the non-control variant will + * gradually increase to 100% when conditions are met, and eventually + * replace the control variant to become the default version of the flow. + * @type \Google\Cloud\Dialogflow\Cx\V3\RolloutState $rollout_state + * State of the auto rollout process. + * @type string $rollout_failure_reason + * The reason why rollout has failed. Should only be set when state is + * ROLLOUT_FAILED. + * @type \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result $result + * Inference result of the experiment. + * @type \Google\Protobuf\Timestamp $create_time + * Creation time of this experiment. + * @type \Google\Protobuf\Timestamp $start_time + * Start time of this experiment. + * @type \Google\Protobuf\Timestamp $end_time + * End time of this experiment. + * @type \Google\Protobuf\Timestamp $last_update_time + * Last update time of this experiment. + * @type \Google\Protobuf\Duration $experiment_length + * Maximum number of days to run the experiment/rollout. If auto-rollout is + * not enabled, default value and maximum will be 30 days. If auto-rollout is + * enabled, default value and maximum will be 6 days. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\VariantsHistory>|\Google\Protobuf\Internal\RepeatedField $variants_history + * The history of updates to the experiment variants. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * The name of the experiment. + * Format: + * projects//locations//agents//environments//experiments/. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the experiment. + * Format: + * projects//locations//agents//environments//experiments/. + * + * 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 human-readable name of the experiment (unique in an + * environment). Limit of 64 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the experiment (unique in an + * environment). Limit of 64 characters. + * + * 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; + } + + /** + * The human-readable description of the experiment. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The human-readable description of the experiment. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The current state of the experiment. + * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. + * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or + * RUNNING->DONE. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the experiment. + * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. + * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or + * RUNNING->DONE. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\State::class); + $this->state = $var; + + return $this; + } + + /** + * The definition of the experiment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + * @return \Google\Cloud\Dialogflow\Cx\V3\Experiment\Definition|null + */ + public function getDefinition() + { + return $this->definition; + } + + public function hasDefinition() + { + return isset($this->definition); + } + + public function clearDefinition() + { + unset($this->definition); + } + + /** + * The definition of the experiment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; + * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment\Definition $var + * @return $this + */ + public function setDefinition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Definition::class); + $this->definition = $var; + + return $this; + } + + /** + * The configuration for auto rollout. If set, there should be exactly two + * variants in the experiment (control variant being the default version of + * the flow), the traffic allocation for the non-control variant will + * gradually increase to 100% when conditions are met, and eventually + * replace the control variant to become the default version of the flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + * @return \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig|null + */ + public function getRolloutConfig() + { + return $this->rollout_config; + } + + public function hasRolloutConfig() + { + return isset($this->rollout_config); + } + + public function clearRolloutConfig() + { + unset($this->rollout_config); + } + + /** + * The configuration for auto rollout. If set, there should be exactly two + * variants in the experiment (control variant being the default version of + * the flow), the traffic allocation for the non-control variant will + * gradually increase to 100% when conditions are met, and eventually + * replace the control variant to become the default version of the flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + * @param \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig $var + * @return $this + */ + public function setRolloutConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig::class); + $this->rollout_config = $var; + + return $this; + } + + /** + * State of the auto rollout process. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + * @return \Google\Cloud\Dialogflow\Cx\V3\RolloutState|null + */ + public function getRolloutState() + { + return $this->rollout_state; + } + + public function hasRolloutState() + { + return isset($this->rollout_state); + } + + public function clearRolloutState() + { + unset($this->rollout_state); + } + + /** + * State of the auto rollout process. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + * @param \Google\Cloud\Dialogflow\Cx\V3\RolloutState $var + * @return $this + */ + public function setRolloutState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\RolloutState::class); + $this->rollout_state = $var; + + return $this; + } + + /** + * The reason why rollout has failed. Should only be set when state is + * ROLLOUT_FAILED. + * + * Generated from protobuf field string rollout_failure_reason = 16; + * @return string + */ + public function getRolloutFailureReason() + { + return $this->rollout_failure_reason; + } + + /** + * The reason why rollout has failed. Should only be set when state is + * ROLLOUT_FAILED. + * + * Generated from protobuf field string rollout_failure_reason = 16; + * @param string $var + * @return $this + */ + public function setRolloutFailureReason($var) + { + GPBUtil::checkString($var, True); + $this->rollout_failure_reason = $var; + + return $this; + } + + /** + * Inference result of the experiment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + * @return \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Inference result of the experiment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; + * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result::class); + $this->result = $var; + + return $this; + } + + /** + * Creation time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + * @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); + } + + /** + * Creation time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Start time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + * @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); + } + + /** + * Start time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * End time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 9; + * @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); + } + + /** + * End time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Last update time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Last update time of this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + + /** + * Maximum number of days to run the experiment/rollout. If auto-rollout is + * not enabled, default value and maximum will be 30 days. If auto-rollout is + * enabled, default value and maximum will be 6 days. + * + * Generated from protobuf field .google.protobuf.Duration experiment_length = 11; + * @return \Google\Protobuf\Duration|null + */ + public function getExperimentLength() + { + return $this->experiment_length; + } + + public function hasExperimentLength() + { + return isset($this->experiment_length); + } + + public function clearExperimentLength() + { + unset($this->experiment_length); + } + + /** + * Maximum number of days to run the experiment/rollout. If auto-rollout is + * not enabled, default value and maximum will be 30 days. If auto-rollout is + * enabled, default value and maximum will be 6 days. + * + * Generated from protobuf field .google.protobuf.Duration experiment_length = 11; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setExperimentLength($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->experiment_length = $var; + + return $this; + } + + /** + * The history of updates to the experiment variants. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVariantsHistory() + { + return $this->variants_history; + } + + /** + * The history of updates to the experiment variants. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\VariantsHistory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVariantsHistory($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\VariantsHistory::class); + $this->variants_history = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Definition.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Definition.php new file mode 100644 index 000000000000..172590bccc9a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Definition.php @@ -0,0 +1,124 @@ +google.cloud.dialogflow.cx.v3.Experiment.Definition + */ +class Definition extends \Google\Protobuf\Internal\Message +{ + /** + * The condition defines which subset of sessions are selected for + * this experiment. If not specified, all sessions are eligible. E.g. + * "query_input.language_code=en" See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string condition = 1; + */ + protected $condition = ''; + protected $variants; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $condition + * The condition defines which subset of sessions are selected for + * this experiment. If not specified, all sessions are eligible. E.g. + * "query_input.language_code=en" See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * @type \Google\Cloud\Dialogflow\Cx\V3\VersionVariants $version_variants + * The flow versions as the variants of this experiment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * The condition defines which subset of sessions are selected for + * this experiment. If not specified, all sessions are eligible. E.g. + * "query_input.language_code=en" See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string condition = 1; + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * The condition defines which subset of sessions are selected for + * this experiment. If not specified, all sessions are eligible. E.g. + * "query_input.language_code=en" See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string condition = 1; + * @param string $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkString($var, True); + $this->condition = $var; + + return $this; + } + + /** + * The flow versions as the variants of this experiment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\VersionVariants|null + */ + public function getVersionVariants() + { + return $this->readOneof(2); + } + + public function hasVersionVariants() + { + return $this->hasOneof(2); + } + + /** + * The flow versions as the variants of this experiment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\VersionVariants $var + * @return $this + */ + public function setVersionVariants($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\VersionVariants::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getVariants() + { + return $this->whichOneof("variants"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Definition::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Definition::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result.php new file mode 100644 index 000000000000..611a18954cf4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result.php @@ -0,0 +1,119 @@ +google.cloud.dialogflow.cx.v3.Experiment.Result + */ +class Result extends \Google\Protobuf\Internal\Message +{ + /** + * Version variants and metrics. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + */ + private $version_metrics; + /** + * The last time the experiment's stats data was updated. Will have default + * value if stats have never been computed for this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2; + */ + protected $last_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\VersionMetrics>|\Google\Protobuf\Internal\RepeatedField $version_metrics + * Version variants and metrics. + * @type \Google\Protobuf\Timestamp $last_update_time + * The last time the experiment's stats data was updated. Will have default + * value if stats have never been computed for this experiment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Version variants and metrics. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVersionMetrics() + { + return $this->version_metrics; + } + + /** + * Version variants and metrics. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\VersionMetrics>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVersionMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\VersionMetrics::class); + $this->version_metrics = $arr; + + return $this; + } + + /** + * The last time the experiment's stats data was updated. Will have default + * value if stats have never been computed for this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * The last time the experiment's stats data was updated. Will have default + * value if stats have never been computed for this experiment. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Result::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/ConfidenceInterval.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/ConfidenceInterval.php new file mode 100644 index 000000000000..4f033010b23a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/ConfidenceInterval.php @@ -0,0 +1,181 @@ +google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + */ +class ConfidenceInterval extends \Google\Protobuf\Internal\Message +{ + /** + * The confidence level used to construct the interval, i.e. there is X% + * chance that the true value is within this interval. + * + * Generated from protobuf field double confidence_level = 1; + */ + protected $confidence_level = 0.0; + /** + * The percent change between an experiment metric's value and the value + * for its control. + * + * Generated from protobuf field double ratio = 2; + */ + protected $ratio = 0.0; + /** + * Lower bound of the interval. + * + * Generated from protobuf field double lower_bound = 3; + */ + protected $lower_bound = 0.0; + /** + * Upper bound of the interval. + * + * Generated from protobuf field double upper_bound = 4; + */ + protected $upper_bound = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $confidence_level + * The confidence level used to construct the interval, i.e. there is X% + * chance that the true value is within this interval. + * @type float $ratio + * The percent change between an experiment metric's value and the value + * for its control. + * @type float $lower_bound + * Lower bound of the interval. + * @type float $upper_bound + * Upper bound of the interval. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * The confidence level used to construct the interval, i.e. there is X% + * chance that the true value is within this interval. + * + * Generated from protobuf field double confidence_level = 1; + * @return float + */ + public function getConfidenceLevel() + { + return $this->confidence_level; + } + + /** + * The confidence level used to construct the interval, i.e. there is X% + * chance that the true value is within this interval. + * + * Generated from protobuf field double confidence_level = 1; + * @param float $var + * @return $this + */ + public function setConfidenceLevel($var) + { + GPBUtil::checkDouble($var); + $this->confidence_level = $var; + + return $this; + } + + /** + * The percent change between an experiment metric's value and the value + * for its control. + * + * Generated from protobuf field double ratio = 2; + * @return float + */ + public function getRatio() + { + return $this->ratio; + } + + /** + * The percent change between an experiment metric's value and the value + * for its control. + * + * Generated from protobuf field double ratio = 2; + * @param float $var + * @return $this + */ + public function setRatio($var) + { + GPBUtil::checkDouble($var); + $this->ratio = $var; + + return $this; + } + + /** + * Lower bound of the interval. + * + * Generated from protobuf field double lower_bound = 3; + * @return float + */ + public function getLowerBound() + { + return $this->lower_bound; + } + + /** + * Lower bound of the interval. + * + * Generated from protobuf field double lower_bound = 3; + * @param float $var + * @return $this + */ + public function setLowerBound($var) + { + GPBUtil::checkDouble($var); + $this->lower_bound = $var; + + return $this; + } + + /** + * Upper bound of the interval. + * + * Generated from protobuf field double upper_bound = 4; + * @return float + */ + public function getUpperBound() + { + return $this->upper_bound; + } + + /** + * Upper bound of the interval. + * + * Generated from protobuf field double upper_bound = 4; + * @param float $var + * @return $this + */ + public function setUpperBound($var) + { + GPBUtil::checkDouble($var); + $this->upper_bound = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConfidenceInterval::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result_ConfidenceInterval::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/CountType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/CountType.php new file mode 100644 index 000000000000..00c5ab3ddc33 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/CountType.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.cx.v3.Experiment.Result.CountType + */ +class CountType +{ + /** + * Count type unspecified. + * + * Generated from protobuf enum COUNT_TYPE_UNSPECIFIED = 0; + */ + const COUNT_TYPE_UNSPECIFIED = 0; + /** + * Total number of occurrences of a 'NO_MATCH'. + * + * Generated from protobuf enum TOTAL_NO_MATCH_COUNT = 1; + */ + const TOTAL_NO_MATCH_COUNT = 1; + /** + * Total number of turn counts. + * + * Generated from protobuf enum TOTAL_TURN_COUNT = 2; + */ + const TOTAL_TURN_COUNT = 2; + /** + * Average turn count in a session. + * + * Generated from protobuf enum AVERAGE_TURN_COUNT = 3; + */ + const AVERAGE_TURN_COUNT = 3; + + private static $valueToName = [ + self::COUNT_TYPE_UNSPECIFIED => 'COUNT_TYPE_UNSPECIFIED', + self::TOTAL_NO_MATCH_COUNT => 'TOTAL_NO_MATCH_COUNT', + self::TOTAL_TURN_COUNT => 'TOTAL_TURN_COUNT', + self::AVERAGE_TURN_COUNT => 'AVERAGE_TURN_COUNT', + ]; + + 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(CountType::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result_CountType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/Metric.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/Metric.php new file mode 100644 index 000000000000..60ee2f923168 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/Metric.php @@ -0,0 +1,235 @@ +google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + */ +class Metric extends \Google\Protobuf\Internal\Message +{ + /** + * Ratio-based metric type. Only one of type or count_type is specified in + * each Metric. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + */ + protected $type = 0; + /** + * Count-based metric type. Only one of type or count_type is specified in + * each Metric. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + */ + protected $count_type = 0; + /** + * The probability that the treatment is better than all other treatments + * in the experiment + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + */ + protected $confidence_interval = null; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Ratio-based metric type. Only one of type or count_type is specified in + * each Metric. + * @type int $count_type + * Count-based metric type. Only one of type or count_type is specified in + * each Metric. + * @type float $ratio + * Ratio value of a metric. + * @type float $count + * Count value of a metric. + * @type \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\ConfidenceInterval $confidence_interval + * The probability that the treatment is better than all other treatments + * in the experiment + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Ratio-based metric type. Only one of type or count_type is specified in + * each Metric. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Ratio-based metric type. Only one of type or count_type is specified in + * each Metric. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\MetricType::class); + $this->type = $var; + + return $this; + } + + /** + * Count-based metric type. Only one of type or count_type is specified in + * each Metric. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * @return int + */ + public function getCountType() + { + return $this->count_type; + } + + /** + * Count-based metric type. Only one of type or count_type is specified in + * each Metric. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; + * @param int $var + * @return $this + */ + public function setCountType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\CountType::class); + $this->count_type = $var; + + return $this; + } + + /** + * Ratio value of a metric. + * + * Generated from protobuf field double ratio = 2; + * @return float + */ + public function getRatio() + { + return $this->readOneof(2); + } + + public function hasRatio() + { + return $this->hasOneof(2); + } + + /** + * Ratio value of a metric. + * + * Generated from protobuf field double ratio = 2; + * @param float $var + * @return $this + */ + public function setRatio($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Count value of a metric. + * + * Generated from protobuf field double count = 4; + * @return float + */ + public function getCount() + { + return $this->readOneof(4); + } + + public function hasCount() + { + return $this->hasOneof(4); + } + + /** + * Count value of a metric. + * + * Generated from protobuf field double count = 4; + * @param float $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The probability that the treatment is better than all other treatments + * in the experiment + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\ConfidenceInterval|null + */ + public function getConfidenceInterval() + { + return $this->confidence_interval; + } + + public function hasConfidenceInterval() + { + return isset($this->confidence_interval); + } + + public function clearConfidenceInterval() + { + unset($this->confidence_interval); + } + + /** + * The probability that the treatment is better than all other treatments + * in the experiment + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\ConfidenceInterval $var + * @return $this + */ + public function setConfidenceInterval($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\ConfidenceInterval::class); + $this->confidence_interval = $var; + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Metric::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result_Metric::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/MetricType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/MetricType.php new file mode 100644 index 000000000000..7f79de48fa8f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/MetricType.php @@ -0,0 +1,86 @@ +google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType + */ +class MetricType +{ + /** + * Metric unspecified. + * + * Generated from protobuf enum METRIC_UNSPECIFIED = 0; + */ + const METRIC_UNSPECIFIED = 0; + /** + * Percentage of contained sessions without user calling back in 24 hours. + * + * Generated from protobuf enum CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + */ + const CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + /** + * Percentage of sessions that were handed to a human agent. + * + * Generated from protobuf enum LIVE_AGENT_HANDOFF_RATE = 2; + */ + const LIVE_AGENT_HANDOFF_RATE = 2; + /** + * Percentage of sessions with the same user calling back. + * + * Generated from protobuf enum CALLBACK_SESSION_RATE = 3; + */ + const CALLBACK_SESSION_RATE = 3; + /** + * Percentage of sessions where user hung up. + * + * Generated from protobuf enum ABANDONED_SESSION_RATE = 4; + */ + const ABANDONED_SESSION_RATE = 4; + /** + * Percentage of sessions reached Dialogflow 'END_PAGE' or + * 'END_SESSION'. + * + * Generated from protobuf enum SESSION_END_RATE = 5; + */ + const SESSION_END_RATE = 5; + + private static $valueToName = [ + self::METRIC_UNSPECIFIED => 'METRIC_UNSPECIFIED', + self::CONTAINED_SESSION_NO_CALLBACK_RATE => 'CONTAINED_SESSION_NO_CALLBACK_RATE', + self::LIVE_AGENT_HANDOFF_RATE => 'LIVE_AGENT_HANDOFF_RATE', + self::CALLBACK_SESSION_RATE => 'CALLBACK_SESSION_RATE', + self::ABANDONED_SESSION_RATE => 'ABANDONED_SESSION_RATE', + self::SESSION_END_RATE => 'SESSION_END_RATE', + ]; + + 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(MetricType::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result_MetricType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/VersionMetrics.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/VersionMetrics.php new file mode 100644 index 000000000000..c8b37c557518 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/VersionMetrics.php @@ -0,0 +1,150 @@ +google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + */ +class VersionMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { + */ + protected $version = ''; + /** + * The metrics and corresponding confidence intervals in the inference + * result. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + */ + private $metrics; + /** + * Number of sessions that were allocated to this version. + * + * Generated from protobuf field int32 session_count = 3; + */ + protected $session_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. + * Format: + * `projects//locations//agents//flows//versions/`. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\Metric>|\Google\Protobuf\Internal\RepeatedField $metrics + * The metrics and corresponding confidence intervals in the inference + * result. + * @type int $session_count + * Number of sessions that were allocated to this version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * The metrics and corresponding confidence intervals in the inference + * result. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * The metrics and corresponding confidence intervals in the inference + * result. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\Metric>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\Metric::class); + $this->metrics = $arr; + + return $this; + } + + /** + * Number of sessions that were allocated to this version. + * + * Generated from protobuf field int32 session_count = 3; + * @return int + */ + public function getSessionCount() + { + return $this->session_count; + } + + /** + * Number of sessions that were allocated to this version. + * + * Generated from protobuf field int32 session_count = 3; + * @param int $var + * @return $this + */ + public function setSessionCount($var) + { + GPBUtil::checkInt32($var); + $this->session_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VersionMetrics::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result_VersionMetrics::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/State.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/State.php new file mode 100644 index 000000000000..02f99268812a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/State.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.cx.v3.Experiment.State + */ +class State +{ + /** + * State unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The experiment is created but not started yet. + * + * Generated from protobuf enum DRAFT = 1; + */ + const DRAFT = 1; + /** + * The experiment is running. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The experiment is done. + * + * Generated from protobuf enum DONE = 3; + */ + const DONE = 3; + /** + * The experiment with auto-rollout enabled has failed. + * + * Generated from protobuf enum ROLLOUT_FAILED = 4; + */ + const ROLLOUT_FAILED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::DRAFT => 'DRAFT', + self::RUNNING => 'RUNNING', + self::DONE => 'DONE', + self::ROLLOUT_FAILED => 'ROLLOUT_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\Cx\V3\Experiment_State::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest.php new file mode 100644 index 000000000000..fbeb8f65dc9b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest.php @@ -0,0 +1,296 @@ +google.cloud.dialogflow.cx.v3.ExportAgentRequest + */ +class ExportAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the agent to export. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. 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) = OPTIONAL]; + */ + protected $agent_uri = ''; + /** + * Optional. The data format of the exported agent. If not specified, `BLOB` + * is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_format = 0; + /** + * Optional. Environment name. If not set, draft environment is assumed. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $environment = ''; + /** + * Optional. The Git branch to export the agent to. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.GitDestination git_destination = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $git_destination = null; + /** + * Optional. Whether to include BigQuery Export setting. + * + * Generated from protobuf field bool include_bigquery_export_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $include_bigquery_export_settings = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the agent to export. + * Format: `projects//locations//agents/`. + * @type string $agent_uri + * Optional. 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). + * @type int $data_format + * Optional. The data format of the exported agent. If not specified, `BLOB` + * is assumed. + * @type string $environment + * Optional. Environment name. If not set, draft environment is assumed. + * Format: + * `projects//locations//agents//environments/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest\GitDestination $git_destination + * Optional. The Git branch to export the agent to. + * @type bool $include_bigquery_export_settings + * Optional. Whether to include BigQuery Export setting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the agent to export. + * Format: `projects//locations//agents/`. + * + * 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 agent to export. + * Format: `projects//locations//agents/`. + * + * 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 [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) = OPTIONAL]; + * @return string + */ + public function getAgentUri() + { + return $this->agent_uri; + } + + /** + * Optional. 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) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAgentUri($var) + { + GPBUtil::checkString($var, True); + $this->agent_uri = $var; + + return $this; + } + + /** + * Optional. The data format of the exported agent. If not specified, `BLOB` + * is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * Optional. The data format of the exported agent. If not specified, `BLOB` + * is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * Optional. Environment name. If not set, draft environment is assumed. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Optional. Environment name. If not set, draft environment is assumed. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + + /** + * Optional. The Git branch to export the agent to. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.GitDestination git_destination = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest\GitDestination|null + */ + public function getGitDestination() + { + return $this->git_destination; + } + + public function hasGitDestination() + { + return isset($this->git_destination); + } + + public function clearGitDestination() + { + unset($this->git_destination); + } + + /** + * Optional. The Git branch to export the agent to. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.GitDestination git_destination = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest\GitDestination $var + * @return $this + */ + public function setGitDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest\GitDestination::class); + $this->git_destination = $var; + + return $this; + } + + /** + * Optional. Whether to include BigQuery Export setting. + * + * Generated from protobuf field bool include_bigquery_export_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIncludeBigqueryExportSettings() + { + return $this->include_bigquery_export_settings; + } + + /** + * Optional. Whether to include BigQuery Export setting. + * + * Generated from protobuf field bool include_bigquery_export_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIncludeBigqueryExportSettings($var) + { + GPBUtil::checkBool($var); + $this->include_bigquery_export_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/DataFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/DataFormat.php new file mode 100644 index 000000000000..d4ddefd918ca --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/DataFormat.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat + */ +class DataFormat +{ + /** + * Unspecified format. + * + * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; + */ + const DATA_FORMAT_UNSPECIFIED = 0; + /** + * Agent content will be exported as raw bytes. + * + * Generated from protobuf enum BLOB = 1; + */ + const BLOB = 1; + /** + * Agent content will be exported in JSON Package format. + * + * Generated from protobuf enum JSON_PACKAGE = 4; + */ + const JSON_PACKAGE = 4; + + private static $valueToName = [ + self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', + self::BLOB => 'BLOB', + self::JSON_PACKAGE => 'JSON_PACKAGE', + ]; + + 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(DataFormat::class, \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest_DataFormat::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/GitDestination.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/GitDestination.php new file mode 100644 index 000000000000..7ddfe1c3a33b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/GitDestination.php @@ -0,0 +1,104 @@ +google.cloud.dialogflow.cx.v3.ExportAgentRequest.GitDestination + */ +class GitDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Tracking branch for the git push. + * + * Generated from protobuf field string tracking_branch = 1; + */ + protected $tracking_branch = ''; + /** + * Commit message for the git push. + * + * Generated from protobuf field string commit_message = 2; + */ + protected $commit_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tracking_branch + * Tracking branch for the git push. + * @type string $commit_message + * Commit message for the git push. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Tracking branch for the git push. + * + * Generated from protobuf field string tracking_branch = 1; + * @return string + */ + public function getTrackingBranch() + { + return $this->tracking_branch; + } + + /** + * Tracking branch for the git push. + * + * Generated from protobuf field string tracking_branch = 1; + * @param string $var + * @return $this + */ + public function setTrackingBranch($var) + { + GPBUtil::checkString($var, True); + $this->tracking_branch = $var; + + return $this; + } + + /** + * Commit message for the git push. + * + * Generated from protobuf field string commit_message = 2; + * @return string + */ + public function getCommitMessage() + { + return $this->commit_message; + } + + /** + * Commit message for the git push. + * + * Generated from protobuf field string commit_message = 2; + * @param string $var + * @return $this + */ + public function setCommitMessage($var) + { + GPBUtil::checkString($var, True); + $this->commit_message = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GitDestination::class, \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest_GitDestination::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentResponse.php new file mode 100644 index 000000000000..934b8c9d04d3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentResponse.php @@ -0,0 +1,160 @@ +google.cloud.dialogflow.cx.v3.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 + * if `agent_uri` is specified in + * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. + * @type string $agent_content + * Uncompressed raw byte content for agent. This field is populated + * if none of `agent_uri` and `git_destination` are specified in + * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. + * @type string $commit_sha + * Commit SHA of the git push. This field is populated if + * `git_destination` is specified in + * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * The URI to a file containing the exported agent. This field is populated + * if `agent_uri` is specified in + * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.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 + * if `agent_uri` is specified in + * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.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; + } + + /** + * Uncompressed raw byte content for agent. This field is populated + * if none of `agent_uri` and `git_destination` are specified in + * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. + * + * Generated from protobuf field bytes agent_content = 2; + * @return string + */ + public function getAgentContent() + { + return $this->readOneof(2); + } + + public function hasAgentContent() + { + return $this->hasOneof(2); + } + + /** + * Uncompressed raw byte content for agent. This field is populated + * if none of `agent_uri` and `git_destination` are specified in + * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. + * + * 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; + } + + /** + * Commit SHA of the git push. This field is populated if + * `git_destination` is specified in + * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. + * + * Generated from protobuf field string commit_sha = 3; + * @return string + */ + public function getCommitSha() + { + return $this->readOneof(3); + } + + public function hasCommitSha() + { + return $this->hasOneof(3); + } + + /** + * Commit SHA of the git push. This field is populated if + * `git_destination` is specified in + * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. + * + * Generated from protobuf field string commit_sha = 3; + * @param string $var + * @return $this + */ + public function setCommitSha($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getAgent() + { + return $this->whichOneof("agent"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesMetadata.php new file mode 100644 index 000000000000..e57e46a31ee8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesMetadata.php @@ -0,0 +1,35 @@ +google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata + */ +class ExportEntityTypesMetadata 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\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest.php new file mode 100644 index 000000000000..abd0830d226c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest.php @@ -0,0 +1,321 @@ +google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + */ +class ExportEntityTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent agent to export entity types. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The name of the entity types to export. + * Format: + * `projects//locations//agents//entityTypes/`. + * + * Generated from protobuf field repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $entity_types; + /** + * Optional. The data format of the exported entity types. If not specified, + * `BLOB` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_format = 0; + /** + * Optional. The language to retrieve the entity type for. The following + * fields are language dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, all language dependent fields will be retrieved. + * [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 = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent agent to export entity types. + * Format: `projects//locations//agents/`. + * @type array|\Google\Protobuf\Internal\RepeatedField $entity_types + * Required. The name of the entity types to export. + * Format: + * `projects//locations//agents//entityTypes/`. + * @type string $entity_types_uri + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the entity + * types to. The format of this URI must be + * `gs:///`. + * 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). + * @type bool $entity_types_content_inline + * Optional. The option to return the serialized entity types inline. + * @type int $data_format + * Optional. The data format of the exported entity types. If not specified, + * `BLOB` is assumed. + * @type string $language_code + * Optional. The language to retrieve the entity type for. The following + * fields are language dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, all language dependent fields will be retrieved. + * [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\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent agent to export entity types. + * Format: `projects//locations//agents/`. + * + * 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 parent agent to export entity types. + * Format: `projects//locations//agents/`. + * + * 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 the entity types to export. + * Format: + * `projects//locations//agents//entityTypes/`. + * + * Generated from protobuf field repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityTypes() + { + return $this->entity_types; + } + + /** + * Required. The name of the entity types to export. + * Format: + * `projects//locations//agents//entityTypes/`. + * + * Generated from protobuf field repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->entity_types = $arr; + + return $this; + } + + /** + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the entity + * types to. The format of this URI must be + * `gs:///`. + * 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 entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEntityTypesUri() + { + return $this->readOneof(3); + } + + public function hasEntityTypesUri() + { + return $this->hasOneof(3); + } + + /** + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the entity + * types to. The format of this URI must be + * `gs:///`. + * 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 entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEntityTypesUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. The option to return the serialized entity types inline. + * + * Generated from protobuf field bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEntityTypesContentInline() + { + return $this->readOneof(4); + } + + public function hasEntityTypesContentInline() + { + return $this->hasOneof(4); + } + + /** + * Optional. The option to return the serialized entity types inline. + * + * Generated from protobuf field bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEntityTypesContentInline($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. The data format of the exported entity types. If not specified, + * `BLOB` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * Optional. The data format of the exported entity types. If not specified, + * `BLOB` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ExportEntityTypesRequest\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * Optional. The language to retrieve the entity type for. The following + * fields are language dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, all language dependent fields will be retrieved. + * [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 = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. The language to retrieve the entity type for. The following + * fields are language dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, all language dependent fields will be retrieved. + * [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 = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest/DataFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest/DataFormat.php new file mode 100644 index 000000000000..8739cd3e6684 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest/DataFormat.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat + */ +class DataFormat +{ + /** + * Unspecified format. Treated as `BLOB`. + * + * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; + */ + const DATA_FORMAT_UNSPECIFIED = 0; + /** + * EntityTypes will be exported as raw bytes. + * + * Generated from protobuf enum BLOB = 1; + */ + const BLOB = 1; + /** + * EntityTypes will be exported in JSON Package format. + * + * Generated from protobuf enum JSON_PACKAGE = 5; + */ + const JSON_PACKAGE = 5; + + private static $valueToName = [ + self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', + self::BLOB => 'BLOB', + self::JSON_PACKAGE => 'JSON_PACKAGE', + ]; + + 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(DataFormat::class, \Google\Cloud\Dialogflow\Cx\V3\ExportEntityTypesRequest_DataFormat::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesResponse.php new file mode 100644 index 000000000000..0d57a8fe6781 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesResponse.php @@ -0,0 +1,121 @@ +google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + */ +class ExportEntityTypesResponse extends \Google\Protobuf\Internal\Message +{ + protected $exported_entity_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $entity_types_uri + * The URI to a file containing the exported entity types. This field is + * populated only if `entity_types_uri` is specified in + * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. + * @type \Google\Cloud\Dialogflow\Cx\V3\InlineDestination $entity_types_content + * Uncompressed byte content for entity types. This field is populated only + * if `entity_types_content_inline` is set to true in + * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * The URI to a file containing the exported entity types. This field is + * populated only if `entity_types_uri` is specified in + * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. + * + * Generated from protobuf field string entity_types_uri = 1; + * @return string + */ + public function getEntityTypesUri() + { + return $this->readOneof(1); + } + + public function hasEntityTypesUri() + { + return $this->hasOneof(1); + } + + /** + * The URI to a file containing the exported entity types. This field is + * populated only if `entity_types_uri` is specified in + * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. + * + * Generated from protobuf field string entity_types_uri = 1; + * @param string $var + * @return $this + */ + public function setEntityTypesUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Uncompressed byte content for entity types. This field is populated only + * if `entity_types_content_inline` is set to true in + * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\InlineDestination|null + */ + public function getEntityTypesContent() + { + return $this->readOneof(2); + } + + public function hasEntityTypesContent() + { + return $this->hasOneof(2); + } + + /** + * Uncompressed byte content for entity types. This field is populated only + * if `entity_types_content_inline` is set to true in + * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\InlineDestination $var + * @return $this + */ + public function setEntityTypesContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InlineDestination::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getExportedEntityTypes() + { + return $this->whichOneof("exported_entity_types"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowRequest.php new file mode 100644 index 000000000000..52a18b27dc1e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowRequest.php @@ -0,0 +1,176 @@ +google.cloud.dialogflow.cx.v3.ExportFlowRequest + */ +class ExportFlowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the flow to export. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the flow to. + * The format of this URI must be `gs:///`. If left + * unspecified, the serialized flow 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 flow_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $flow_uri = ''; + /** + * Optional. Whether to export flows referenced by the specified flow. + * + * Generated from protobuf field bool include_referenced_flows = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $include_referenced_flows = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the flow to export. + * Format: + * `projects//locations//agents//flows/`. + * @type string $flow_uri + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the flow to. + * The format of this URI must be `gs:///`. If left + * unspecified, the serialized flow 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). + * @type bool $include_referenced_flows + * Optional. Whether to export flows referenced by the specified flow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the flow to export. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 flow to export. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the flow to. + * The format of this URI must be `gs:///`. If left + * unspecified, the serialized flow 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 flow_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFlowUri() + { + return $this->flow_uri; + } + + /** + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the flow to. + * The format of this URI must be `gs:///`. If left + * unspecified, the serialized flow 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 flow_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFlowUri($var) + { + GPBUtil::checkString($var, True); + $this->flow_uri = $var; + + return $this; + } + + /** + * Optional. Whether to export flows referenced by the specified flow. + * + * Generated from protobuf field bool include_referenced_flows = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIncludeReferencedFlows() + { + return $this->include_referenced_flows; + } + + /** + * Optional. Whether to export flows referenced by the specified flow. + * + * Generated from protobuf field bool include_referenced_flows = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIncludeReferencedFlows($var) + { + GPBUtil::checkBool($var); + $this->include_referenced_flows = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowResponse.php new file mode 100644 index 000000000000..c849cee8ef79 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowResponse.php @@ -0,0 +1,115 @@ +google.cloud.dialogflow.cx.v3.ExportFlowResponse + */ +class ExportFlowResponse extends \Google\Protobuf\Internal\Message +{ + protected $flow; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $flow_uri + * The URI to a file containing the exported flow. This field is populated + * only if `flow_uri` is specified in + * [ExportFlowRequest][google.cloud.dialogflow.cx.v3.ExportFlowRequest]. + * @type string $flow_content + * Uncompressed raw byte content for flow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * The URI to a file containing the exported flow. This field is populated + * only if `flow_uri` is specified in + * [ExportFlowRequest][google.cloud.dialogflow.cx.v3.ExportFlowRequest]. + * + * Generated from protobuf field string flow_uri = 1; + * @return string + */ + public function getFlowUri() + { + return $this->readOneof(1); + } + + public function hasFlowUri() + { + return $this->hasOneof(1); + } + + /** + * The URI to a file containing the exported flow. This field is populated + * only if `flow_uri` is specified in + * [ExportFlowRequest][google.cloud.dialogflow.cx.v3.ExportFlowRequest]. + * + * Generated from protobuf field string flow_uri = 1; + * @param string $var + * @return $this + */ + public function setFlowUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Uncompressed raw byte content for flow. + * + * Generated from protobuf field bytes flow_content = 2; + * @return string + */ + public function getFlowContent() + { + return $this->readOneof(2); + } + + public function hasFlowContent() + { + return $this->hasOneof(2); + } + + /** + * Uncompressed raw byte content for flow. + * + * Generated from protobuf field bytes flow_content = 2; + * @param string $var + * @return $this + */ + public function setFlowContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getFlow() + { + return $this->whichOneof("flow"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsMetadata.php new file mode 100644 index 000000000000..af1c826764e4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsMetadata.php @@ -0,0 +1,35 @@ +google.cloud.dialogflow.cx.v3.ExportIntentsMetadata + */ +class ExportIntentsMetadata 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\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest.php new file mode 100644 index 000000000000..4b9f7ca27d1a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest.php @@ -0,0 +1,251 @@ +google.cloud.dialogflow.cx.v3.ExportIntentsRequest + */ +class ExportIntentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent agent to export intents. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The name of the intents to export. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $intents; + /** + * Optional. The data format of the exported intents. If not specified, `BLOB` + * is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_format = 0; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent agent to export intents. + * Format: `projects//locations//agents/`. + * @type array|\Google\Protobuf\Internal\RepeatedField $intents + * Required. The name of the intents to export. + * Format: + * `projects//locations//agents//intents/`. + * @type string $intents_uri + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the + * intents to. The format of this URI must be + * `gs:///`. + * 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). + * @type bool $intents_content_inline + * Optional. The option to return the serialized intents inline. + * @type int $data_format + * Optional. The data format of the exported intents. If not specified, `BLOB` + * is assumed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent agent to export intents. + * Format: `projects//locations//agents/`. + * + * 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 parent agent to export intents. + * Format: `projects//locations//agents/`. + * + * 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 the intents to export. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntents() + { + return $this->intents; + } + + /** + * Required. The name of the intents to export. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->intents = $arr; + + return $this; + } + + /** + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the + * intents to. The format of this URI must be + * `gs:///`. + * 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 intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIntentsUri() + { + return $this->readOneof(3); + } + + public function hasIntentsUri() + { + return $this->hasOneof(3); + } + + /** + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the + * intents to. The format of this URI must be + * `gs:///`. + * 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 intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIntentsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. The option to return the serialized intents inline. + * + * Generated from protobuf field bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIntentsContentInline() + { + return $this->readOneof(4); + } + + public function hasIntentsContentInline() + { + return $this->hasOneof(4); + } + + /** + * Optional. The option to return the serialized intents inline. + * + * Generated from protobuf field bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIntentsContentInline($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. The data format of the exported intents. If not specified, `BLOB` + * is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * Optional. The data format of the exported intents. If not specified, `BLOB` + * is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ExportIntentsRequest\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest/DataFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest/DataFormat.php new file mode 100644 index 000000000000..05837d20e807 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest/DataFormat.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat + */ +class DataFormat +{ + /** + * Unspecified format. Treated as `BLOB`. + * + * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; + */ + const DATA_FORMAT_UNSPECIFIED = 0; + /** + * Intents will be exported as raw bytes. + * + * Generated from protobuf enum BLOB = 1; + */ + const BLOB = 1; + /** + * Intents will be exported in JSON format. + * + * Generated from protobuf enum JSON = 2; + */ + const JSON = 2; + /** + * Intents will be exported in CSV format. + * + * Generated from protobuf enum CSV = 3; + */ + const CSV = 3; + + private static $valueToName = [ + self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', + self::BLOB => 'BLOB', + self::JSON => 'JSON', + self::CSV => 'CSV', + ]; + + 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(DataFormat::class, \Google\Cloud\Dialogflow\Cx\V3\ExportIntentsRequest_DataFormat::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsResponse.php new file mode 100644 index 000000000000..6700f6cc1ba1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsResponse.php @@ -0,0 +1,121 @@ +google.cloud.dialogflow.cx.v3.ExportIntentsResponse + */ +class ExportIntentsResponse extends \Google\Protobuf\Internal\Message +{ + protected $intents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $intents_uri + * The URI to a file containing the exported intents. This field is + * populated only if `intents_uri` is specified in + * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. + * @type \Google\Cloud\Dialogflow\Cx\V3\InlineDestination $intents_content + * Uncompressed byte content for intents. This field is populated only if + * `intents_content_inline` is set to true in + * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * The URI to a file containing the exported intents. This field is + * populated only if `intents_uri` is specified in + * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. + * + * Generated from protobuf field string intents_uri = 1; + * @return string + */ + public function getIntentsUri() + { + return $this->readOneof(1); + } + + public function hasIntentsUri() + { + return $this->hasOneof(1); + } + + /** + * The URI to a file containing the exported intents. This field is + * populated only if `intents_uri` is specified in + * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. + * + * Generated from protobuf field string intents_uri = 1; + * @param string $var + * @return $this + */ + public function setIntentsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Uncompressed byte content for intents. This field is populated only if + * `intents_content_inline` is set to true in + * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineDestination intents_content = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\InlineDestination|null + */ + public function getIntentsContent() + { + return $this->readOneof(2); + } + + public function hasIntentsContent() + { + return $this->hasOneof(2); + } + + /** + * Uncompressed byte content for intents. This field is populated only if + * `intents_content_inline` is set to true in + * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineDestination intents_content = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\InlineDestination $var + * @return $this + */ + public function setIntentsContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InlineDestination::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getIntents() + { + return $this->whichOneof("intents"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest.php new file mode 100644 index 000000000000..4a6094668946 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest.php @@ -0,0 +1,180 @@ +google.cloud.dialogflow.cx.v3.ExportPlaybookRequest + */ +class ExportPlaybookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the playbook to export. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized playbook 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $playbook_uri = ''; + /** + * Optional. The data format of the exported agent. If not specified, `BLOB` + * is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_format = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the playbook to export. + * Format: + * `projects//locations//agents//playbooks/`. + * @type string $playbook_uri + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized playbook 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). + * @type int $data_format + * Optional. The data format of the exported agent. If not specified, `BLOB` + * is assumed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the playbook to export. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 playbook to export. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized playbook 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPlaybookUri() + { + return $this->playbook_uri; + } + + /** + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized playbook 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPlaybookUri($var) + { + GPBUtil::checkString($var, True); + $this->playbook_uri = $var; + + return $this; + } + + /** + * Optional. The data format of the exported agent. If not specified, `BLOB` + * is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * Optional. The data format of the exported agent. If not specified, `BLOB` + * is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ExportPlaybookRequest\DataFormat::class); + $this->data_format = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest/DataFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest/DataFormat.php new file mode 100644 index 000000000000..3581edf75805 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest/DataFormat.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat + */ +class DataFormat +{ + /** + * Unspecified format. + * + * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; + */ + const DATA_FORMAT_UNSPECIFIED = 0; + /** + * Flow content will be exported as raw bytes. + * + * Generated from protobuf enum BLOB = 1; + */ + const BLOB = 1; + /** + * Flow content will be exported in JSON format. + * + * Generated from protobuf enum JSON = 2; + */ + const JSON = 2; + + private static $valueToName = [ + self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', + self::BLOB => 'BLOB', + 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(DataFormat::class, \Google\Cloud\Dialogflow\Cx\V3\ExportPlaybookRequest_DataFormat::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookResponse.php new file mode 100644 index 000000000000..52e8c73e1ac4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookResponse.php @@ -0,0 +1,115 @@ +google.cloud.dialogflow.cx.v3.ExportPlaybookResponse + */ +class ExportPlaybookResponse extends \Google\Protobuf\Internal\Message +{ + protected $playbook; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $playbook_uri + * The URI to a file containing the exported playbook. This field is + * populated only if `playbook_uri` is specified in + * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest]. + * @type string $playbook_content + * Uncompressed raw byte content for playbook. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * The URI to a file containing the exported playbook. This field is + * populated only if `playbook_uri` is specified in + * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest]. + * + * Generated from protobuf field string playbook_uri = 1; + * @return string + */ + public function getPlaybookUri() + { + return $this->readOneof(1); + } + + public function hasPlaybookUri() + { + return $this->hasOneof(1); + } + + /** + * The URI to a file containing the exported playbook. This field is + * populated only if `playbook_uri` is specified in + * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest]. + * + * Generated from protobuf field string playbook_uri = 1; + * @param string $var + * @return $this + */ + public function setPlaybookUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Uncompressed raw byte content for playbook. + * + * Generated from protobuf field bytes playbook_content = 2; + * @return string + */ + public function getPlaybookContent() + { + return $this->readOneof(2); + } + + public function hasPlaybookContent() + { + return $this->hasOneof(2); + } + + /** + * Uncompressed raw byte content for playbook. + * + * Generated from protobuf field bytes playbook_content = 2; + * @param string $var + * @return $this + */ + public function setPlaybookContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getPlaybook() + { + return $this->whichOneof("playbook"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesMetadata.php new file mode 100644 index 000000000000..b4c4d009858d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesMetadata.php @@ -0,0 +1,35 @@ +google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + */ +class ExportTestCasesMetadata 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\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest.php new file mode 100644 index 000000000000..00969237f19d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest.php @@ -0,0 +1,234 @@ +google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + */ +class ExportTestCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent where to export test cases from. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The data format of the exported test cases. If not specified, `BLOB` is + * assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + */ + protected $data_format = 0; + /** + * The filter expression used to filter exported test cases, see + * [API Filtering](https://aip.dev/160). The expression is case insensitive + * and supports the following syntax: + * name = [OR name = ] ... + * For example: + * * "name = t1 OR name = t2" matches the test case with the exact resource + * name "t1" or "t2". + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent where to export test cases from. + * Format: `projects//locations//agents/`. + * @type string $gcs_uri + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to + * export the test cases to. The format of this URI must be + * `gs:///`. If unspecified, the serialized test + * cases 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). + * @type int $data_format + * The data format of the exported test cases. If not specified, `BLOB` is + * assumed. + * @type string $filter + * The filter expression used to filter exported test cases, see + * [API Filtering](https://aip.dev/160). The expression is case insensitive + * and supports the following syntax: + * name = [OR name = ] ... + * For example: + * * "name = t1 OR name = t2" matches the test case with the exact resource + * name "t1" or "t2". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent where to export test cases from. + * Format: `projects//locations//agents/`. + * + * 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 where to export test cases from. + * Format: `projects//locations//agents/`. + * + * 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](https://cloud.google.com/storage/docs/) URI to + * export the test cases to. The format of this URI must be + * `gs:///`. If unspecified, the serialized test + * cases 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 gcs_uri = 2; + * @return string + */ + public function getGcsUri() + { + return $this->readOneof(2); + } + + public function hasGcsUri() + { + return $this->hasOneof(2); + } + + /** + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to + * export the test cases to. The format of this URI must be + * `gs:///`. If unspecified, the serialized test + * cases 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 gcs_uri = 2; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The data format of the exported test cases. If not specified, `BLOB` is + * assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * The data format of the exported test cases. If not specified, `BLOB` is + * assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ExportTestCasesRequest\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * The filter expression used to filter exported test cases, see + * [API Filtering](https://aip.dev/160). The expression is case insensitive + * and supports the following syntax: + * name = [OR name = ] ... + * For example: + * * "name = t1 OR name = t2" matches the test case with the exact resource + * name "t1" or "t2". + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression used to filter exported test cases, see + * [API Filtering](https://aip.dev/160). The expression is case insensitive + * and supports the following syntax: + * name = [OR name = ] ... + * For example: + * * "name = t1 OR name = t2" matches the test case with the exact resource + * name "t1" or "t2". + * + * 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; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest/DataFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest/DataFormat.php new file mode 100644 index 000000000000..9dca1dd0c7b9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest/DataFormat.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat + */ +class DataFormat +{ + /** + * Unspecified format. + * + * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; + */ + const DATA_FORMAT_UNSPECIFIED = 0; + /** + * Raw bytes. + * + * Generated from protobuf enum BLOB = 1; + */ + const BLOB = 1; + /** + * JSON format. + * + * Generated from protobuf enum JSON = 2; + */ + const JSON = 2; + + private static $valueToName = [ + self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', + self::BLOB => 'BLOB', + 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(DataFormat::class, \Google\Cloud\Dialogflow\Cx\V3\ExportTestCasesRequest_DataFormat::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesResponse.php new file mode 100644 index 000000000000..5fbeeedaea5e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesResponse.php @@ -0,0 +1,115 @@ +google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + */ +class ExportTestCasesResponse extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_uri + * The URI to a file containing the exported test cases. This field is + * populated only if `gcs_uri` is specified in + * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. + * @type string $content + * Uncompressed raw byte content for test cases. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The URI to a file containing the exported test cases. This field is + * populated only if `gcs_uri` is specified in + * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. + * + * Generated from protobuf field string gcs_uri = 1; + * @return string + */ + public function getGcsUri() + { + return $this->readOneof(1); + } + + public function hasGcsUri() + { + return $this->hasOneof(1); + } + + /** + * The URI to a file containing the exported test cases. This field is + * populated only if `gcs_uri` is specified in + * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. + * + * Generated from protobuf field string gcs_uri = 1; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Uncompressed raw byte content for test cases. + * + * Generated from protobuf field bytes content = 2; + * @return string + */ + public function getContent() + { + return $this->readOneof(2); + } + + public function hasContent() + { + return $this->hasOneof(2); + } + + /** + * Uncompressed raw byte content for test cases. + * + * Generated from protobuf field bytes content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FilterSpecs.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FilterSpecs.php new file mode 100644 index 000000000000..a77bd97fae07 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FilterSpecs.php @@ -0,0 +1,121 @@ +google.cloud.dialogflow.cx.v3.FilterSpecs + */ +class FilterSpecs extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Data Stores where the boosting configuration is applied. The full + * names of the referenced data stores. Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * + * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $data_stores; + /** + * Optional. The filter expression to be applied. + * Expression syntax is documented at + * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $data_stores + * Optional. Data Stores where the boosting configuration is applied. The full + * names of the referenced data stores. Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * @type string $filter + * Optional. The filter expression to be applied. + * Expression syntax is documented at + * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Data Stores where the boosting configuration is applied. The full + * names of the referenced data stores. Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * + * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataStores() + { + return $this->data_stores; + } + + /** + * Optional. Data Stores where the boosting configuration is applied. The full + * names of the referenced data stores. Formats: + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `projects/{project}/locations/{location}/dataStores/{data_store}` + * + * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataStores($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_stores = $arr; + + return $this; + } + + /** + * Optional. The filter expression to be applied. + * Expression syntax is documented at + * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter expression to be applied. + * Expression syntax is documented at + * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow.php new file mode 100644 index 000000000000..f2e0f44fc815 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow.php @@ -0,0 +1,670 @@ +google.cloud.dialogflow.cx.v3.Flow + */ +class Flow extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the flow. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the flow. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * The description of the flow. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * A flow's transition routes serve two purposes: + * * They are responsible for matching the user's first utterances in the + * flow. + * * They are inherited by every page's [transition + * routes][Page.transition_routes] and can support use cases such as the user + * saying "help" or "can I talk to a human?", which can be handled in a common + * way regardless of the current page. Transition routes defined in the page + * have higher priority than those defined in the flow. + * TransitionRoutes are evaluated in the following order: + * * TransitionRoutes with intent specified. + * * TransitionRoutes with only condition specified. + * TransitionRoutes with intent specified are inherited by pages in the flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4; + */ + private $transition_routes; + /** + * A flow's event handlers serve two purposes: + * * They are responsible for handling events (e.g. no match, + * webhook errors) in the flow. + * * They are inherited by every page's [event + * handlers][Page.event_handlers], which can be used to handle common events + * regardless of the current page. Event handlers defined in the page + * have higher priority than those defined in the flow. + * Unlike + * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], + * these handlers are evaluated on a first-match basis. The first one that + * matches the event get executed, with the rest being ignored. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; + */ + private $event_handlers; + /** + * A flow's transition route group serve two purposes: + * * They are responsible for matching the user's first utterances in the + * flow. + * * They are inherited by every page's [transition + * route groups][Page.transition_route_groups]. Transition route groups + * defined in the page have higher priority than those defined in the flow. + * Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/` + * for agent-level groups. + * + * Generated from protobuf field repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { + */ + private $transition_route_groups; + /** + * NLU related settings of the flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; + */ + protected $nlu_settings = null; + /** + * Hierarchical advanced settings for this flow. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 14; + */ + protected $advanced_settings = null; + /** + * Optional. Knowledge connector configuration. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $knowledge_connector_settings = null; + /** + * Optional. Defined structured input parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $input_parameter_definitions; + /** + * Optional. Defined structured output parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $output_parameter_definitions; + /** + * Optional. Multi-lingual agent settings for this flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $multi_language_settings = null; + /** + * Indicates whether the flow is locked for changes. If the flow is locked, + * modifications to the flow will be rejected. + * + * Generated from protobuf field bool locked = 30; + */ + protected $locked = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the flow. + * Format: + * `projects//locations//agents//flows/`. + * @type string $display_name + * Required. The human-readable name of the flow. + * @type string $description + * The description of the flow. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $transition_routes + * A flow's transition routes serve two purposes: + * * They are responsible for matching the user's first utterances in the + * flow. + * * They are inherited by every page's [transition + * routes][Page.transition_routes] and can support use cases such as the user + * saying "help" or "can I talk to a human?", which can be handled in a common + * way regardless of the current page. Transition routes defined in the page + * have higher priority than those defined in the flow. + * TransitionRoutes are evaluated in the following order: + * * TransitionRoutes with intent specified. + * * TransitionRoutes with only condition specified. + * TransitionRoutes with intent specified are inherited by pages in the flow. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $event_handlers + * A flow's event handlers serve two purposes: + * * They are responsible for handling events (e.g. no match, + * webhook errors) in the flow. + * * They are inherited by every page's [event + * handlers][Page.event_handlers], which can be used to handle common events + * regardless of the current page. Event handlers defined in the page + * have higher priority than those defined in the flow. + * Unlike + * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], + * these handlers are evaluated on a first-match basis. The first one that + * matches the event get executed, with the rest being ignored. + * @type array|\Google\Protobuf\Internal\RepeatedField $transition_route_groups + * A flow's transition route group serve two purposes: + * * They are responsible for matching the user's first utterances in the + * flow. + * * They are inherited by every page's [transition + * route groups][Page.transition_route_groups]. Transition route groups + * defined in the page have higher priority than those defined in the flow. + * Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/` + * for agent-level groups. + * @type \Google\Cloud\Dialogflow\Cx\V3\NluSettings $nlu_settings + * NLU related settings of the flow. + * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings + * Hierarchical advanced settings for this flow. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * @type \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings $knowledge_connector_settings + * Optional. Knowledge connector configuration. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $input_parameter_definitions + * Optional. Defined structured input parameters for this flow. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $output_parameter_definitions + * Optional. Defined structured output parameters for this flow. + * @type \Google\Cloud\Dialogflow\Cx\V3\Flow\MultiLanguageSettings $multi_language_settings + * Optional. Multi-lingual agent settings for this flow. + * @type bool $locked + * Indicates whether the flow is locked for changes. If the flow is locked, + * modifications to the flow will be rejected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the flow. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the flow. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 human-readable name of the flow. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the flow. + * + * 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; + } + + /** + * The description of the flow. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the flow. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * A flow's transition routes serve two purposes: + * * They are responsible for matching the user's first utterances in the + * flow. + * * They are inherited by every page's [transition + * routes][Page.transition_routes] and can support use cases such as the user + * saying "help" or "can I talk to a human?", which can be handled in a common + * way regardless of the current page. Transition routes defined in the page + * have higher priority than those defined in the flow. + * TransitionRoutes are evaluated in the following order: + * * TransitionRoutes with intent specified. + * * TransitionRoutes with only condition specified. + * TransitionRoutes with intent specified are inherited by pages in the flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitionRoutes() + { + return $this->transition_routes; + } + + /** + * A flow's transition routes serve two purposes: + * * They are responsible for matching the user's first utterances in the + * flow. + * * They are inherited by every page's [transition + * routes][Page.transition_routes] and can support use cases such as the user + * saying "help" or "can I talk to a human?", which can be handled in a common + * way regardless of the current page. Transition routes defined in the page + * have higher priority than those defined in the flow. + * TransitionRoutes are evaluated in the following order: + * * TransitionRoutes with intent specified. + * * TransitionRoutes with only condition specified. + * TransitionRoutes with intent specified are inherited by pages in the flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitionRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute::class); + $this->transition_routes = $arr; + + return $this; + } + + /** + * A flow's event handlers serve two purposes: + * * They are responsible for handling events (e.g. no match, + * webhook errors) in the flow. + * * They are inherited by every page's [event + * handlers][Page.event_handlers], which can be used to handle common events + * regardless of the current page. Event handlers defined in the page + * have higher priority than those defined in the flow. + * Unlike + * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], + * these handlers are evaluated on a first-match basis. The first one that + * matches the event get executed, with the rest being ignored. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventHandlers() + { + return $this->event_handlers; + } + + /** + * A flow's event handlers serve two purposes: + * * They are responsible for handling events (e.g. no match, + * webhook errors) in the flow. + * * They are inherited by every page's [event + * handlers][Page.event_handlers], which can be used to handle common events + * regardless of the current page. Event handlers defined in the page + * have higher priority than those defined in the flow. + * Unlike + * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], + * these handlers are evaluated on a first-match basis. The first one that + * matches the event get executed, with the rest being ignored. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventHandlers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\EventHandler::class); + $this->event_handlers = $arr; + + return $this; + } + + /** + * A flow's transition route group serve two purposes: + * * They are responsible for matching the user's first utterances in the + * flow. + * * They are inherited by every page's [transition + * route groups][Page.transition_route_groups]. Transition route groups + * defined in the page have higher priority than those defined in the flow. + * Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/` + * for agent-level groups. + * + * Generated from protobuf field repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitionRouteGroups() + { + return $this->transition_route_groups; + } + + /** + * A flow's transition route group serve two purposes: + * * They are responsible for matching the user's first utterances in the + * flow. + * * They are inherited by every page's [transition + * route groups][Page.transition_route_groups]. Transition route groups + * defined in the page have higher priority than those defined in the flow. + * Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/` + * for agent-level groups. + * + * Generated from protobuf field repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitionRouteGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->transition_route_groups = $arr; + + return $this; + } + + /** + * NLU related settings of the flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; + * @return \Google\Cloud\Dialogflow\Cx\V3\NluSettings|null + */ + public function getNluSettings() + { + return $this->nlu_settings; + } + + public function hasNluSettings() + { + return isset($this->nlu_settings); + } + + public function clearNluSettings() + { + unset($this->nlu_settings); + } + + /** + * NLU related settings of the flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; + * @param \Google\Cloud\Dialogflow\Cx\V3\NluSettings $var + * @return $this + */ + public function setNluSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\NluSettings::class); + $this->nlu_settings = $var; + + return $this; + } + + /** + * Hierarchical advanced settings for this flow. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 14; + * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null + */ + public function getAdvancedSettings() + { + return $this->advanced_settings; + } + + public function hasAdvancedSettings() + { + return isset($this->advanced_settings); + } + + public function clearAdvancedSettings() + { + unset($this->advanced_settings); + } + + /** + * Hierarchical advanced settings for this flow. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 14; + * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var + * @return $this + */ + public function setAdvancedSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); + $this->advanced_settings = $var; + + return $this; + } + + /** + * Optional. Knowledge connector configuration. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings|null + */ + public function getKnowledgeConnectorSettings() + { + return $this->knowledge_connector_settings; + } + + public function hasKnowledgeConnectorSettings() + { + return isset($this->knowledge_connector_settings); + } + + public function clearKnowledgeConnectorSettings() + { + unset($this->knowledge_connector_settings); + } + + /** + * Optional. Knowledge connector configuration. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings $var + * @return $this + */ + public function setKnowledgeConnectorSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings::class); + $this->knowledge_connector_settings = $var; + + return $this; + } + + /** + * Optional. Defined structured input parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputParameterDefinitions() + { + return $this->input_parameter_definitions; + } + + /** + * Optional. Defined structured input parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputParameterDefinitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::class); + $this->input_parameter_definitions = $arr; + + return $this; + } + + /** + * Optional. Defined structured output parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOutputParameterDefinitions() + { + return $this->output_parameter_definitions; + } + + /** + * Optional. Defined structured output parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOutputParameterDefinitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::class); + $this->output_parameter_definitions = $arr; + + return $this; + } + + /** + * Optional. Multi-lingual agent settings for this flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Flow\MultiLanguageSettings|null + */ + public function getMultiLanguageSettings() + { + return $this->multi_language_settings; + } + + public function hasMultiLanguageSettings() + { + return isset($this->multi_language_settings); + } + + public function clearMultiLanguageSettings() + { + unset($this->multi_language_settings); + } + + /** + * Optional. Multi-lingual agent settings for this flow. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Flow\MultiLanguageSettings $var + * @return $this + */ + public function setMultiLanguageSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Flow\MultiLanguageSettings::class); + $this->multi_language_settings = $var; + + return $this; + } + + /** + * Indicates whether the flow is locked for changes. If the flow is locked, + * modifications to the flow will be rejected. + * + * Generated from protobuf field bool locked = 30; + * @return bool + */ + public function getLocked() + { + return $this->locked; + } + + /** + * Indicates whether the flow is locked for changes. If the flow is locked, + * modifications to the flow will be rejected. + * + * Generated from protobuf field bool locked = 30; + * @param bool $var + * @return $this + */ + public function setLocked($var) + { + GPBUtil::checkBool($var); + $this->locked = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow/MultiLanguageSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow/MultiLanguageSettings.php new file mode 100644 index 000000000000..7ddd34148664 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow/MultiLanguageSettings.php @@ -0,0 +1,140 @@ +google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings + */ +class MultiLanguageSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Enable multi-language detection for this flow. This can be set + * only if [agent level multi language + * setting][Agent.enable_multi_language_training] is enabled. + * + * Generated from protobuf field bool enable_multi_language_detection = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_multi_language_detection = false; + /** + * Optional. Agent will respond in the detected language if the detected + * language code is in the supported resolved languages for this flow. This + * will be used only if multi-language training is enabled in the + * [agent][google.cloud.dialogflow.cx.v3.Agent.enable_multi_language_training] + * and multi-language detection is enabled in the + * [flow][google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.enable_multi_language_detection]. + * The supported languages must be a subset of the languages supported by + * the agent. + * + * Generated from protobuf field repeated string supported_response_language_codes = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $supported_response_language_codes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_multi_language_detection + * Optional. Enable multi-language detection for this flow. This can be set + * only if [agent level multi language + * setting][Agent.enable_multi_language_training] is enabled. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_response_language_codes + * Optional. Agent will respond in the detected language if the detected + * language code is in the supported resolved languages for this flow. This + * will be used only if multi-language training is enabled in the + * [agent][google.cloud.dialogflow.cx.v3.Agent.enable_multi_language_training] + * and multi-language detection is enabled in the + * [flow][google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.enable_multi_language_detection]. + * The supported languages must be a subset of the languages supported by + * the agent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Enable multi-language detection for this flow. This can be set + * only if [agent level multi language + * setting][Agent.enable_multi_language_training] is enabled. + * + * Generated from protobuf field bool enable_multi_language_detection = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableMultiLanguageDetection() + { + return $this->enable_multi_language_detection; + } + + /** + * Optional. Enable multi-language detection for this flow. This can be set + * only if [agent level multi language + * setting][Agent.enable_multi_language_training] is enabled. + * + * Generated from protobuf field bool enable_multi_language_detection = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableMultiLanguageDetection($var) + { + GPBUtil::checkBool($var); + $this->enable_multi_language_detection = $var; + + return $this; + } + + /** + * Optional. Agent will respond in the detected language if the detected + * language code is in the supported resolved languages for this flow. This + * will be used only if multi-language training is enabled in the + * [agent][google.cloud.dialogflow.cx.v3.Agent.enable_multi_language_training] + * and multi-language detection is enabled in the + * [flow][google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.enable_multi_language_detection]. + * The supported languages must be a subset of the languages supported by + * the agent. + * + * Generated from protobuf field repeated string supported_response_language_codes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedResponseLanguageCodes() + { + return $this->supported_response_language_codes; + } + + /** + * Optional. Agent will respond in the detected language if the detected + * language code is in the supported resolved languages for this flow. This + * will be used only if multi-language training is enabled in the + * [agent][google.cloud.dialogflow.cx.v3.Agent.enable_multi_language_training] + * and multi-language detection is enabled in the + * [flow][google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.enable_multi_language_detection]. + * The supported languages must be a subset of the languages supported by + * the agent. + * + * Generated from protobuf field repeated string supported_response_language_codes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedResponseLanguageCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->supported_response_language_codes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MultiLanguageSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Flow_MultiLanguageSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowImportStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowImportStrategy.php new file mode 100644 index 000000000000..8967acb7001e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowImportStrategy.php @@ -0,0 +1,80 @@ +google.cloud.dialogflow.cx.v3.FlowImportStrategy + */ +class FlowImportStrategy extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Import strategy for resource conflict resolution, applied + * globally throughout the flow. It will be applied for all display name + * conflicts in the imported content. If not specified, 'CREATE_NEW' is + * assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $global_import_strategy = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $global_import_strategy + * Optional. Import strategy for resource conflict resolution, applied + * globally throughout the flow. It will be applied for all display name + * conflicts in the imported content. If not specified, 'CREATE_NEW' is + * assumed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Import strategy for resource conflict resolution, applied + * globally throughout the flow. It will be applied for all display name + * conflicts in the imported content. If not specified, 'CREATE_NEW' is + * assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getGlobalImportStrategy() + { + return $this->global_import_strategy; + } + + /** + * Optional. Import strategy for resource conflict resolution, applied + * globally throughout the flow. It will be applied for all display name + * conflicts in the imported content. If not specified, 'CREATE_NEW' is + * assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setGlobalImportStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportStrategy::class); + $this->global_import_strategy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowInvocation.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowInvocation.php new file mode 100644 index 000000000000..678f25173aae --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowInvocation.php @@ -0,0 +1,143 @@ +google.cloud.dialogflow.cx.v3.FlowInvocation + */ +class FlowInvocation extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of the flow. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $flow = ''; + /** + * Output only. The display name of the flow. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Required. Flow invocation's output state. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $flow_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $flow + * Required. The unique identifier of the flow. + * Format: + * `projects//locations//agents//flows/`. + * @type string $display_name + * Output only. The display name of the flow. + * @type int $flow_state + * Required. Flow invocation's output state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of the flow. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getFlow() + { + return $this->flow; + } + + /** + * Required. The unique identifier of the flow. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setFlow($var) + { + GPBUtil::checkString($var, True); + $this->flow = $var; + + return $this; + } + + /** + * Output only. The display name of the flow. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name of the flow. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Flow invocation's output state. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getFlowState() + { + return $this->flow_state; + } + + /** + * Required. Flow invocation's output state. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setFlowState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\OutputState::class); + $this->flow_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowTransition.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowTransition.php new file mode 100644 index 000000000000..2f6c7f05d2ad --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowTransition.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.FlowTransition + */ +class FlowTransition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of the flow. + * Format: + * `projects//locations//agents/`. + * + * Generated from protobuf field string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $flow = ''; + /** + * Output only. The display name of the flow. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $flow + * Required. The unique identifier of the flow. + * Format: + * `projects//locations//agents/`. + * @type string $display_name + * Output only. The display name of the flow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of the flow. + * Format: + * `projects//locations//agents/`. + * + * Generated from protobuf field string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getFlow() + { + return $this->flow; + } + + /** + * Required. The unique identifier of the flow. + * Format: + * `projects//locations//agents/`. + * + * Generated from protobuf field string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setFlow($var) + { + GPBUtil::checkString($var, True); + $this->flow = $var; + + return $this; + } + + /** + * Output only. The display name of the flow. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name of the flow. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowValidationResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowValidationResult.php new file mode 100644 index 000000000000..63ce87551bc0 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowValidationResult.php @@ -0,0 +1,154 @@ +google.cloud.dialogflow.cx.v3.FlowValidationResult + */ +class FlowValidationResult extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the flow validation result. + * Format: + * `projects//locations//agents//flows//validationResult`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Contains all validation messages. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + */ + private $validation_messages; + /** + * Last time the flow was validated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the flow validation result. + * Format: + * `projects//locations//agents//flows//validationResult`. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ValidationMessage>|\Google\Protobuf\Internal\RepeatedField $validation_messages + * Contains all validation messages. + * @type \Google\Protobuf\Timestamp $update_time + * Last time the flow was validated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the flow validation result. + * Format: + * `projects//locations//agents//flows//validationResult`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the flow validation result. + * Format: + * `projects//locations//agents//flows//validationResult`. + * + * 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; + } + + /** + * Contains all validation messages. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValidationMessages() + { + return $this->validation_messages; + } + + /** + * Contains all validation messages. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ValidationMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValidationMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ValidationMessage::class); + $this->validation_messages = $arr; + + return $this; + } + + /** + * Last time the flow was validated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @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); + } + + /** + * Last time the flow was validated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form.php new file mode 100644 index 000000000000..a2f44b1d9c2a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.cx.v3.Form + */ +class Form extends \Google\Protobuf\Internal\Message +{ + /** + * Parameters to collect from the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Form.Parameter parameters = 1; + */ + private $parameters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Form\Parameter>|\Google\Protobuf\Internal\RepeatedField $parameters + * Parameters to collect from the user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Parameters to collect from the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Form.Parameter parameters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Parameters to collect from the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Form.Parameter parameters = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Form\Parameter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Form\Parameter::class); + $this->parameters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter.php new file mode 100644 index 000000000000..47ef2c349094 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter.php @@ -0,0 +1,402 @@ +google.cloud.dialogflow.cx.v3.Form.Parameter + */ +class Parameter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The human-readable name of the parameter, unique within the + * form. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Indicates whether the parameter is required. Optional parameters will not + * trigger prompts; however, they are filled if the user specifies them. + * Required parameters must be filled before form filling concludes. + * + * Generated from protobuf field bool required = 2; + */ + protected $required = false; + /** + * Required. The entity type of the parameter. + * Format: + * `projects/-/locations/-/agents/-/entityTypes/` for + * system entity types (for example, + * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or + * `projects//locations//agents//entityTypes/` + * for developer entity types. + * + * Generated from protobuf field string entity_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $entity_type = ''; + /** + * Indicates whether the parameter represents a list of values. + * + * Generated from protobuf field bool is_list = 4; + */ + protected $is_list = false; + /** + * Required. Defines fill behavior for the parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior fill_behavior = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fill_behavior = null; + /** + * The default value of an optional parameter. If the parameter is required, + * the default value will be ignored. + * + * Generated from protobuf field .google.protobuf.Value default_value = 9; + */ + protected $default_value = null; + /** + * Indicates whether the parameter content should be redacted in log. If + * redaction is enabled, the parameter content will be replaced by parameter + * name during logging. + * Note: the parameter content is subject to redaction if either parameter + * level redaction or [entity type level + * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. + * + * Generated from protobuf field bool redact = 11; + */ + protected $redact = false; + /** + * Hierarchical advanced settings for this parameter. The settings exposed + * at the lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 12; + */ + protected $advanced_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Required. The human-readable name of the parameter, unique within the + * form. + * @type bool $required + * Indicates whether the parameter is required. Optional parameters will not + * trigger prompts; however, they are filled if the user specifies them. + * Required parameters must be filled before form filling concludes. + * @type string $entity_type + * Required. The entity type of the parameter. + * Format: + * `projects/-/locations/-/agents/-/entityTypes/` for + * system entity types (for example, + * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or + * `projects//locations//agents//entityTypes/` + * for developer entity types. + * @type bool $is_list + * Indicates whether the parameter represents a list of values. + * @type \Google\Cloud\Dialogflow\Cx\V3\Form\Parameter\FillBehavior $fill_behavior + * Required. Defines fill behavior for the parameter. + * @type \Google\Protobuf\Value $default_value + * The default value of an optional parameter. If the parameter is required, + * the default value will be ignored. + * @type bool $redact + * Indicates whether the parameter content should be redacted in log. If + * redaction is enabled, the parameter content will be replaced by parameter + * name during logging. + * Note: the parameter content is subject to redaction if either parameter + * level redaction or [entity type level + * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. + * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings + * Hierarchical advanced settings for this parameter. The settings exposed + * at the lower level overrides the settings exposed at the higher level. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Required. The human-readable name of the parameter, unique within the + * form. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the parameter, unique within the + * form. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Indicates whether the parameter is required. Optional parameters will not + * trigger prompts; however, they are filled if the user specifies them. + * Required parameters must be filled before form filling concludes. + * + * Generated from protobuf field bool required = 2; + * @return bool + */ + public function getRequired() + { + return $this->required; + } + + /** + * Indicates whether the parameter is required. Optional parameters will not + * trigger prompts; however, they are filled if the user specifies them. + * Required parameters must be filled before form filling concludes. + * + * Generated from protobuf field bool required = 2; + * @param bool $var + * @return $this + */ + public function setRequired($var) + { + GPBUtil::checkBool($var); + $this->required = $var; + + return $this; + } + + /** + * Required. The entity type of the parameter. + * Format: + * `projects/-/locations/-/agents/-/entityTypes/` for + * system entity types (for example, + * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or + * `projects//locations//agents//entityTypes/` + * for developer entity types. + * + * Generated from protobuf field string entity_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEntityType() + { + return $this->entity_type; + } + + /** + * Required. The entity type of the parameter. + * Format: + * `projects/-/locations/-/agents/-/entityTypes/` for + * system entity types (for example, + * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or + * `projects//locations//agents//entityTypes/` + * for developer entity types. + * + * Generated from protobuf field string entity_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkString($var, True); + $this->entity_type = $var; + + return $this; + } + + /** + * Indicates whether the parameter represents a list of values. + * + * Generated from protobuf field bool is_list = 4; + * @return bool + */ + public function getIsList() + { + return $this->is_list; + } + + /** + * Indicates whether the parameter represents a list of values. + * + * Generated from protobuf field bool is_list = 4; + * @param bool $var + * @return $this + */ + public function setIsList($var) + { + GPBUtil::checkBool($var); + $this->is_list = $var; + + return $this; + } + + /** + * Required. Defines fill behavior for the parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior fill_behavior = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Form\Parameter\FillBehavior|null + */ + public function getFillBehavior() + { + return $this->fill_behavior; + } + + public function hasFillBehavior() + { + return isset($this->fill_behavior); + } + + public function clearFillBehavior() + { + unset($this->fill_behavior); + } + + /** + * Required. Defines fill behavior for the parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior fill_behavior = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Form\Parameter\FillBehavior $var + * @return $this + */ + public function setFillBehavior($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Form\Parameter\FillBehavior::class); + $this->fill_behavior = $var; + + return $this; + } + + /** + * The default value of an optional parameter. If the parameter is required, + * the default value will be ignored. + * + * Generated from protobuf field .google.protobuf.Value default_value = 9; + * @return \Google\Protobuf\Value|null + */ + public function getDefaultValue() + { + return $this->default_value; + } + + public function hasDefaultValue() + { + return isset($this->default_value); + } + + public function clearDefaultValue() + { + unset($this->default_value); + } + + /** + * The default value of an optional parameter. If the parameter is required, + * the default value will be ignored. + * + * Generated from protobuf field .google.protobuf.Value default_value = 9; + * @param \Google\Protobuf\Value $var + * @return $this + */ + public function setDefaultValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); + $this->default_value = $var; + + return $this; + } + + /** + * Indicates whether the parameter content should be redacted in log. If + * redaction is enabled, the parameter content will be replaced by parameter + * name during logging. + * Note: the parameter content is subject to redaction if either parameter + * level redaction or [entity type level + * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. + * + * Generated from protobuf field bool redact = 11; + * @return bool + */ + public function getRedact() + { + return $this->redact; + } + + /** + * Indicates whether the parameter content should be redacted in log. If + * redaction is enabled, the parameter content will be replaced by parameter + * name during logging. + * Note: the parameter content is subject to redaction if either parameter + * level redaction or [entity type level + * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. + * + * Generated from protobuf field bool redact = 11; + * @param bool $var + * @return $this + */ + public function setRedact($var) + { + GPBUtil::checkBool($var); + $this->redact = $var; + + return $this; + } + + /** + * Hierarchical advanced settings for this parameter. The settings exposed + * at the lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 12; + * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null + */ + public function getAdvancedSettings() + { + return $this->advanced_settings; + } + + public function hasAdvancedSettings() + { + return isset($this->advanced_settings); + } + + public function clearAdvancedSettings() + { + unset($this->advanced_settings); + } + + /** + * Hierarchical advanced settings for this parameter. The settings exposed + * at the lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 12; + * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var + * @return $this + */ + public function setAdvancedSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); + $this->advanced_settings = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Parameter::class, \Google\Cloud\Dialogflow\Cx\V3\Form_Parameter::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter/FillBehavior.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter/FillBehavior.php new file mode 100644 index 000000000000..25908b3d5388 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter/FillBehavior.php @@ -0,0 +1,222 @@ +google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + */ +class FillBehavior extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fulfillment to provide the initial prompt that the agent + * can present to the user in order to fill the parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment initial_prompt_fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $initial_prompt_fulfillment = null; + /** + * The handlers for parameter-level events, used to provide reprompt for + * the parameter or transition to a different page/flow. The supported + * events are: + * * `sys.no-match-`, where N can be from 1 to 6 + * * `sys.no-match-default` + * * `sys.no-input-`, where N can be from 1 to 6 + * * `sys.no-input-default` + * * `sys.invalid-parameter` + * `initial_prompt_fulfillment` provides the first prompt for the + * parameter. + * If the user's response does not fill the parameter, a + * no-match/no-input event will be triggered, and the fulfillment + * associated with the `sys.no-match-1`/`sys.no-input-1` handler (if + * defined) will be called to provide a prompt. The + * `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to + * the next no-match/no-input event, and so on. + * A `sys.no-match-default` or `sys.no-input-default` handler will be used + * to handle all following no-match/no-input events after all numbered + * no-match/no-input handlers for the parameter are consumed. + * A `sys.invalid-parameter` handler can be defined to handle the case + * where the parameter values have been `invalidated` by webhook. For + * example, if the user's response fill the parameter, however the + * parameter was invalidated by webhook, the fulfillment associated with + * the `sys.invalid-parameter` handler (if defined) will be called to + * provide a prompt. + * If the event handler for the corresponding event can't be found on the + * parameter, `initial_prompt_fulfillment` will be re-prompted. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler reprompt_event_handlers = 5; + */ + private $reprompt_event_handlers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $initial_prompt_fulfillment + * Required. The fulfillment to provide the initial prompt that the agent + * can present to the user in order to fill the parameter. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $reprompt_event_handlers + * The handlers for parameter-level events, used to provide reprompt for + * the parameter or transition to a different page/flow. The supported + * events are: + * * `sys.no-match-`, where N can be from 1 to 6 + * * `sys.no-match-default` + * * `sys.no-input-`, where N can be from 1 to 6 + * * `sys.no-input-default` + * * `sys.invalid-parameter` + * `initial_prompt_fulfillment` provides the first prompt for the + * parameter. + * If the user's response does not fill the parameter, a + * no-match/no-input event will be triggered, and the fulfillment + * associated with the `sys.no-match-1`/`sys.no-input-1` handler (if + * defined) will be called to provide a prompt. The + * `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to + * the next no-match/no-input event, and so on. + * A `sys.no-match-default` or `sys.no-input-default` handler will be used + * to handle all following no-match/no-input events after all numbered + * no-match/no-input handlers for the parameter are consumed. + * A `sys.invalid-parameter` handler can be defined to handle the case + * where the parameter values have been `invalidated` by webhook. For + * example, if the user's response fill the parameter, however the + * parameter was invalidated by webhook, the fulfillment associated with + * the `sys.invalid-parameter` handler (if defined) will be called to + * provide a prompt. + * If the event handler for the corresponding event can't be found on the + * parameter, `initial_prompt_fulfillment` will be re-prompted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fulfillment to provide the initial prompt that the agent + * can present to the user in order to fill the parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment initial_prompt_fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment|null + */ + public function getInitialPromptFulfillment() + { + return $this->initial_prompt_fulfillment; + } + + public function hasInitialPromptFulfillment() + { + return isset($this->initial_prompt_fulfillment); + } + + public function clearInitialPromptFulfillment() + { + unset($this->initial_prompt_fulfillment); + } + + /** + * Required. The fulfillment to provide the initial prompt that the agent + * can present to the user in order to fill the parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment initial_prompt_fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var + * @return $this + */ + public function setInitialPromptFulfillment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); + $this->initial_prompt_fulfillment = $var; + + return $this; + } + + /** + * The handlers for parameter-level events, used to provide reprompt for + * the parameter or transition to a different page/flow. The supported + * events are: + * * `sys.no-match-`, where N can be from 1 to 6 + * * `sys.no-match-default` + * * `sys.no-input-`, where N can be from 1 to 6 + * * `sys.no-input-default` + * * `sys.invalid-parameter` + * `initial_prompt_fulfillment` provides the first prompt for the + * parameter. + * If the user's response does not fill the parameter, a + * no-match/no-input event will be triggered, and the fulfillment + * associated with the `sys.no-match-1`/`sys.no-input-1` handler (if + * defined) will be called to provide a prompt. The + * `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to + * the next no-match/no-input event, and so on. + * A `sys.no-match-default` or `sys.no-input-default` handler will be used + * to handle all following no-match/no-input events after all numbered + * no-match/no-input handlers for the parameter are consumed. + * A `sys.invalid-parameter` handler can be defined to handle the case + * where the parameter values have been `invalidated` by webhook. For + * example, if the user's response fill the parameter, however the + * parameter was invalidated by webhook, the fulfillment associated with + * the `sys.invalid-parameter` handler (if defined) will be called to + * provide a prompt. + * If the event handler for the corresponding event can't be found on the + * parameter, `initial_prompt_fulfillment` will be re-prompted. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler reprompt_event_handlers = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRepromptEventHandlers() + { + return $this->reprompt_event_handlers; + } + + /** + * The handlers for parameter-level events, used to provide reprompt for + * the parameter or transition to a different page/flow. The supported + * events are: + * * `sys.no-match-`, where N can be from 1 to 6 + * * `sys.no-match-default` + * * `sys.no-input-`, where N can be from 1 to 6 + * * `sys.no-input-default` + * * `sys.invalid-parameter` + * `initial_prompt_fulfillment` provides the first prompt for the + * parameter. + * If the user's response does not fill the parameter, a + * no-match/no-input event will be triggered, and the fulfillment + * associated with the `sys.no-match-1`/`sys.no-input-1` handler (if + * defined) will be called to provide a prompt. The + * `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to + * the next no-match/no-input event, and so on. + * A `sys.no-match-default` or `sys.no-input-default` handler will be used + * to handle all following no-match/no-input events after all numbered + * no-match/no-input handlers for the parameter are consumed. + * A `sys.invalid-parameter` handler can be defined to handle the case + * where the parameter values have been `invalidated` by webhook. For + * example, if the user's response fill the parameter, however the + * parameter was invalidated by webhook, the fulfillment associated with + * the `sys.invalid-parameter` handler (if defined) will be called to + * provide a prompt. + * If the event handler for the corresponding event can't be found on the + * parameter, `initial_prompt_fulfillment` will be re-prompted. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler reprompt_event_handlers = 5; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRepromptEventHandlers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\EventHandler::class); + $this->reprompt_event_handlers = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FillBehavior::class, \Google\Cloud\Dialogflow\Cx\V3\Form_Parameter_FillBehavior::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentRequest.php new file mode 100644 index 000000000000..c6f30da68ac9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentRequest.php @@ -0,0 +1,169 @@ +google.cloud.dialogflow.cx.v3.FulfillIntentRequest + */ +class FulfillIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Must be same as the corresponding MatchIntent request, otherwise the + * behavior is undefined. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.MatchIntentRequest match_intent_request = 1; + */ + protected $match_intent_request = null; + /** + * The matched intent/event to fulfill. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 2; + */ + protected $match = null; + /** + * Instructs the speech synthesizer how to generate output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 3; + */ + protected $output_audio_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\MatchIntentRequest $match_intent_request + * Must be same as the corresponding MatchIntent request, otherwise the + * behavior is undefined. + * @type \Google\Cloud\Dialogflow\Cx\V3\PBMatch $match + * The matched intent/event to fulfill. + * @type \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $output_audio_config + * Instructs the speech synthesizer how to generate output audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Must be same as the corresponding MatchIntent request, otherwise the + * behavior is undefined. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.MatchIntentRequest match_intent_request = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\MatchIntentRequest|null + */ + public function getMatchIntentRequest() + { + return $this->match_intent_request; + } + + public function hasMatchIntentRequest() + { + return isset($this->match_intent_request); + } + + public function clearMatchIntentRequest() + { + unset($this->match_intent_request); + } + + /** + * Must be same as the corresponding MatchIntent request, otherwise the + * behavior is undefined. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.MatchIntentRequest match_intent_request = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\MatchIntentRequest $var + * @return $this + */ + public function setMatchIntentRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\MatchIntentRequest::class); + $this->match_intent_request = $var; + + return $this; + } + + /** + * The matched intent/event to fulfill. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\PBMatch|null + */ + public function getMatch() + { + return $this->match; + } + + public function hasMatch() + { + return isset($this->match); + } + + public function clearMatch() + { + unset($this->match); + } + + /** + * The matched intent/event to fulfill. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\PBMatch $var + * @return $this + */ + public function setMatch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PBMatch::class); + $this->match = $var; + + return $this; + } + + /** + * Instructs the speech synthesizer how to generate output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\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 output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $var + * @return $this + */ + public function setOutputAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig::class); + $this->output_audio_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentResponse.php new file mode 100644 index 000000000000..9840a9a3b515 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentResponse.php @@ -0,0 +1,229 @@ +google.cloud.dialogflow.cx.v3.FulfillIntentResponse + */ +class FulfillIntentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. 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 the conversational query. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; + */ + protected $query_result = 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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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 = 3; + */ + protected $output_audio = ''; + /** + * The config used by the speech synthesizer to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; + */ + protected $output_audio_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $response_id + * Output only. 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\Cx\V3\QueryResult $query_result + * The result of the conversational query. + * @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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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\Cx\V3\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\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Output only. 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; + } + + /** + * Output only. 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 the conversational query. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\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. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\QueryResult $var + * @return $this + */ + public function setQueryResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryResult::class); + $this->query_result = $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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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 = 3; + * @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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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 = 3; + * @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.cx.v3.OutputAudioConfig output_audio_config = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.OutputAudioConfig output_audio_config = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $var + * @return $this + */ + public function setOutputAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig::class); + $this->output_audio_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php new file mode 100644 index 000000000000..3b4e807f161c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php @@ -0,0 +1,445 @@ +google.cloud.dialogflow.cx.v3.Fulfillment + */ +class Fulfillment extends \Google\Protobuf\Internal\Message +{ + /** + * The list of rich message responses to present to the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; + */ + private $messages; + /** + * The webhook to call. + * Format: + * `projects//locations//agents//webhooks/`. + * + * Generated from protobuf field string webhook = 2 [(.google.api.resource_reference) = { + */ + protected $webhook = ''; + /** + * Whether Dialogflow should return currently queued fulfillment response + * messages in streaming APIs. If a webhook is specified, it happens before + * Dialogflow invokes webhook. + * Warning: + * 1) This flag only affects streaming API. Responses are still queued + * and returned once in non-streaming API. + * 2) The flag can be enabled in any fulfillment but only the first 3 partial + * responses will be returned. You may only want to apply it to fulfillments + * that have slow webhooks. + * + * Generated from protobuf field bool return_partial_responses = 8; + */ + protected $return_partial_responses = false; + /** + * The value of this field will be populated in the + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] + * `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is + * called. + * The tag is typically used by the webhook service to identify which + * fulfillment is being called, but it could be used for other purposes. + * This field is required if `webhook` is specified. + * + * Generated from protobuf field string tag = 3; + */ + protected $tag = ''; + /** + * Set parameter values before executing the webhook. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4; + */ + private $set_parameter_actions; + /** + * Conditional cases for this fulfillment. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5; + */ + private $conditional_cases; + /** + * Hierarchical advanced settings for this fulfillment. The settings exposed + * at the lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 7; + */ + protected $advanced_settings = null; + /** + * If the flag is true, the agent will utilize LLM to generate a text + * response. If LLM generation fails, the defined + * [responses][google.cloud.dialogflow.cx.v3.Fulfillment.messages] in the + * fulfillment will be respected. This flag is only useful for fulfillments + * associated with no-match event handlers. + * + * Generated from protobuf field bool enable_generative_fallback = 12; + */ + protected $enable_generative_fallback = false; + /** + * A list of Generators to be called during this fulfillment. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings generators = 13; + */ + private $generators; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $messages + * The list of rich message responses to present to the user. + * @type string $webhook + * The webhook to call. + * Format: + * `projects//locations//agents//webhooks/`. + * @type bool $return_partial_responses + * Whether Dialogflow should return currently queued fulfillment response + * messages in streaming APIs. If a webhook is specified, it happens before + * Dialogflow invokes webhook. + * Warning: + * 1) This flag only affects streaming API. Responses are still queued + * and returned once in non-streaming API. + * 2) The flag can be enabled in any fulfillment but only the first 3 partial + * responses will be returned. You may only want to apply it to fulfillments + * that have slow webhooks. + * @type string $tag + * The value of this field will be populated in the + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] + * `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is + * called. + * The tag is typically used by the webhook service to identify which + * fulfillment is being called, but it could be used for other purposes. + * This field is required if `webhook` is specified. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\SetParameterAction>|\Google\Protobuf\Internal\RepeatedField $set_parameter_actions + * Set parameter values before executing the webhook. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases>|\Google\Protobuf\Internal\RepeatedField $conditional_cases + * Conditional cases for this fulfillment. + * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings + * Hierarchical advanced settings for this fulfillment. The settings exposed + * at the lower level overrides the settings exposed at the higher level. + * @type bool $enable_generative_fallback + * If the flag is true, the agent will utilize LLM to generate a text + * response. If LLM generation fails, the defined + * [responses][google.cloud.dialogflow.cx.v3.Fulfillment.messages] in the + * fulfillment will be respected. This flag is only useful for fulfillments + * associated with no-match event handlers. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\GeneratorSettings>|\Google\Protobuf\Internal\RepeatedField $generators + * A list of Generators to be called during this fulfillment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * The list of rich message responses to present to the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * The list of rich message responses to present to the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::class); + $this->messages = $arr; + + return $this; + } + + /** + * The webhook to call. + * Format: + * `projects//locations//agents//webhooks/`. + * + * Generated from protobuf field string webhook = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getWebhook() + { + return $this->webhook; + } + + /** + * The webhook to call. + * Format: + * `projects//locations//agents//webhooks/`. + * + * Generated from protobuf field string webhook = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setWebhook($var) + { + GPBUtil::checkString($var, True); + $this->webhook = $var; + + return $this; + } + + /** + * Whether Dialogflow should return currently queued fulfillment response + * messages in streaming APIs. If a webhook is specified, it happens before + * Dialogflow invokes webhook. + * Warning: + * 1) This flag only affects streaming API. Responses are still queued + * and returned once in non-streaming API. + * 2) The flag can be enabled in any fulfillment but only the first 3 partial + * responses will be returned. You may only want to apply it to fulfillments + * that have slow webhooks. + * + * Generated from protobuf field bool return_partial_responses = 8; + * @return bool + */ + public function getReturnPartialResponses() + { + return $this->return_partial_responses; + } + + /** + * Whether Dialogflow should return currently queued fulfillment response + * messages in streaming APIs. If a webhook is specified, it happens before + * Dialogflow invokes webhook. + * Warning: + * 1) This flag only affects streaming API. Responses are still queued + * and returned once in non-streaming API. + * 2) The flag can be enabled in any fulfillment but only the first 3 partial + * responses will be returned. You may only want to apply it to fulfillments + * that have slow webhooks. + * + * Generated from protobuf field bool return_partial_responses = 8; + * @param bool $var + * @return $this + */ + public function setReturnPartialResponses($var) + { + GPBUtil::checkBool($var); + $this->return_partial_responses = $var; + + return $this; + } + + /** + * The value of this field will be populated in the + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] + * `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is + * called. + * The tag is typically used by the webhook service to identify which + * fulfillment is being called, but it could be used for other purposes. + * This field is required if `webhook` is specified. + * + * Generated from protobuf field string tag = 3; + * @return string + */ + public function getTag() + { + return $this->tag; + } + + /** + * The value of this field will be populated in the + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] + * `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is + * called. + * The tag is typically used by the webhook service to identify which + * fulfillment is being called, but it could be used for other purposes. + * This field is required if `webhook` is specified. + * + * Generated from protobuf field string tag = 3; + * @param string $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkString($var, True); + $this->tag = $var; + + return $this; + } + + /** + * Set parameter values before executing the webhook. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSetParameterActions() + { + return $this->set_parameter_actions; + } + + /** + * Set parameter values before executing the webhook. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\SetParameterAction>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSetParameterActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\SetParameterAction::class); + $this->set_parameter_actions = $arr; + + return $this; + } + + /** + * Conditional cases for this fulfillment. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditionalCases() + { + return $this->conditional_cases; + } + + /** + * Conditional cases for this fulfillment. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditionalCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases::class); + $this->conditional_cases = $arr; + + return $this; + } + + /** + * Hierarchical advanced settings for this fulfillment. The settings exposed + * at the lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 7; + * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null + */ + public function getAdvancedSettings() + { + return $this->advanced_settings; + } + + public function hasAdvancedSettings() + { + return isset($this->advanced_settings); + } + + public function clearAdvancedSettings() + { + unset($this->advanced_settings); + } + + /** + * Hierarchical advanced settings for this fulfillment. The settings exposed + * at the lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 7; + * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var + * @return $this + */ + public function setAdvancedSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); + $this->advanced_settings = $var; + + return $this; + } + + /** + * If the flag is true, the agent will utilize LLM to generate a text + * response. If LLM generation fails, the defined + * [responses][google.cloud.dialogflow.cx.v3.Fulfillment.messages] in the + * fulfillment will be respected. This flag is only useful for fulfillments + * associated with no-match event handlers. + * + * Generated from protobuf field bool enable_generative_fallback = 12; + * @return bool + */ + public function getEnableGenerativeFallback() + { + return $this->enable_generative_fallback; + } + + /** + * If the flag is true, the agent will utilize LLM to generate a text + * response. If LLM generation fails, the defined + * [responses][google.cloud.dialogflow.cx.v3.Fulfillment.messages] in the + * fulfillment will be respected. This flag is only useful for fulfillments + * associated with no-match event handlers. + * + * Generated from protobuf field bool enable_generative_fallback = 12; + * @param bool $var + * @return $this + */ + public function setEnableGenerativeFallback($var) + { + GPBUtil::checkBool($var); + $this->enable_generative_fallback = $var; + + return $this; + } + + /** + * A list of Generators to be called during this fulfillment. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings generators = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGenerators() + { + return $this->generators; + } + + /** + * A list of Generators to be called during this fulfillment. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings generators = 13; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\GeneratorSettings>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGenerators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\GeneratorSettings::class); + $this->generators = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases.php new file mode 100644 index 000000000000..b0086c08edd4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases + */ +class ConditionalCases extends \Google\Protobuf\Internal\Message +{ + /** + * A list of cascading if-else conditions. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case cases = 1; + */ + private $cases; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase>|\Google\Protobuf\Internal\RepeatedField $cases + * A list of cascading if-else conditions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * A list of cascading if-else conditions. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case cases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCases() + { + return $this->cases; + } + + /** + * A list of cascading if-else conditions. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case cases = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase::class); + $this->cases = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConditionalCases::class, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment_ConditionalCases::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase.php new file mode 100644 index 000000000000..f856088de549 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase.php @@ -0,0 +1,125 @@ +google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + */ +class PBCase extends \Google\Protobuf\Internal\Message +{ + /** + * The condition to activate and select this case. Empty means the + * condition is always true. The condition is evaluated against [form + * parameters][Form.parameters] or [session + * parameters][SessionInfo.parameters]. + * See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string condition = 1; + */ + protected $condition = ''; + /** + * A list of case content. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent case_content = 2; + */ + private $case_content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $condition + * The condition to activate and select this case. Empty means the + * condition is always true. The condition is evaluated against [form + * parameters][Form.parameters] or [session + * parameters][SessionInfo.parameters]. + * See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase\CaseContent>|\Google\Protobuf\Internal\RepeatedField $case_content + * A list of case content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * The condition to activate and select this case. Empty means the + * condition is always true. The condition is evaluated against [form + * parameters][Form.parameters] or [session + * parameters][SessionInfo.parameters]. + * See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string condition = 1; + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * The condition to activate and select this case. Empty means the + * condition is always true. The condition is evaluated against [form + * parameters][Form.parameters] or [session + * parameters][SessionInfo.parameters]. + * See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string condition = 1; + * @param string $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkString($var, True); + $this->condition = $var; + + return $this; + } + + /** + * A list of case content. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent case_content = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCaseContent() + { + return $this->case_content; + } + + /** + * A list of case content. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent case_content = 2; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase\CaseContent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCaseContent($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase\CaseContent::class); + $this->case_content = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBCase::class, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment_ConditionalCases_Case::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase/CaseContent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase/CaseContent.php new file mode 100644 index 000000000000..593cb50927b1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase/CaseContent.php @@ -0,0 +1,111 @@ +google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + */ +class CaseContent extends \Google\Protobuf\Internal\Message +{ + protected $cases_or_message; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage $message + * Returned message. + * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases $additional_cases + * Additional cases to be evaluated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * Returned message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage message = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage|null + */ + public function getMessage() + { + return $this->readOneof(1); + } + + public function hasMessage() + { + return $this->hasOneof(1); + } + + /** + * Returned message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage message = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Additional cases to be evaluated. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases additional_cases = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases|null + */ + public function getAdditionalCases() + { + return $this->readOneof(2); + } + + public function hasAdditionalCases() + { + return $this->hasOneof(2); + } + + /** + * Additional cases to be evaluated. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases additional_cases = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases $var + * @return $this + */ + public function setAdditionalCases($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getCasesOrMessage() + { + return $this->whichOneof("cases_or_message"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CaseContent::class, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment_ConditionalCases_Case_CaseContent::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/GeneratorSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/GeneratorSettings.php new file mode 100644 index 000000000000..2f7f66ba85d3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/GeneratorSettings.php @@ -0,0 +1,182 @@ +google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + */ +class GeneratorSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The generator to call. + * Format: + * `projects//locations//agents//generators/`. + * + * Generated from protobuf field string generator = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $generator = ''; + /** + * Map from [placeholder parameter][Generator.Parameter.id] in the + * [Generator][google.cloud.dialogflow.cx.v3.Generator] to corresponding + * session parameters. By default, Dialogflow uses the session parameter + * with the same name to fill in the generator template. e.g. If there is a + * placeholder parameter `city` in the Generator, Dialogflow default to fill + * in the `$city` with + * `$session.params.city`. However, you may choose to fill `$city` with + * `$session.params.desination-city`. + * - Map key: [parameter ID][Genrator.Parameter.id] + * - Map value: session parameter name + * + * Generated from protobuf field map input_parameters = 2; + */ + private $input_parameters; + /** + * Required. Output parameter which should contain the generator response. + * + * Generated from protobuf field string output_parameter = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_parameter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $generator + * Required. The generator to call. + * Format: + * `projects//locations//agents//generators/`. + * @type array|\Google\Protobuf\Internal\MapField $input_parameters + * Map from [placeholder parameter][Generator.Parameter.id] in the + * [Generator][google.cloud.dialogflow.cx.v3.Generator] to corresponding + * session parameters. By default, Dialogflow uses the session parameter + * with the same name to fill in the generator template. e.g. If there is a + * placeholder parameter `city` in the Generator, Dialogflow default to fill + * in the `$city` with + * `$session.params.city`. However, you may choose to fill `$city` with + * `$session.params.desination-city`. + * - Map key: [parameter ID][Genrator.Parameter.id] + * - Map value: session parameter name + * @type string $output_parameter + * Required. Output parameter which should contain the generator response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The generator to call. + * Format: + * `projects//locations//agents//generators/`. + * + * Generated from protobuf field string generator = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGenerator() + { + return $this->generator; + } + + /** + * Required. The generator to call. + * Format: + * `projects//locations//agents//generators/`. + * + * Generated from protobuf field string generator = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGenerator($var) + { + GPBUtil::checkString($var, True); + $this->generator = $var; + + return $this; + } + + /** + * Map from [placeholder parameter][Generator.Parameter.id] in the + * [Generator][google.cloud.dialogflow.cx.v3.Generator] to corresponding + * session parameters. By default, Dialogflow uses the session parameter + * with the same name to fill in the generator template. e.g. If there is a + * placeholder parameter `city` in the Generator, Dialogflow default to fill + * in the `$city` with + * `$session.params.city`. However, you may choose to fill `$city` with + * `$session.params.desination-city`. + * - Map key: [parameter ID][Genrator.Parameter.id] + * - Map value: session parameter name + * + * Generated from protobuf field map input_parameters = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getInputParameters() + { + return $this->input_parameters; + } + + /** + * Map from [placeholder parameter][Generator.Parameter.id] in the + * [Generator][google.cloud.dialogflow.cx.v3.Generator] to corresponding + * session parameters. By default, Dialogflow uses the session parameter + * with the same name to fill in the generator template. e.g. If there is a + * placeholder parameter `city` in the Generator, Dialogflow default to fill + * in the `$city` with + * `$session.params.city`. However, you may choose to fill `$city` with + * `$session.params.desination-city`. + * - Map key: [parameter ID][Genrator.Parameter.id] + * - Map value: session parameter name + * + * Generated from protobuf field map input_parameters = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setInputParameters($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->input_parameters = $arr; + + return $this; + } + + /** + * Required. Output parameter which should contain the generator response. + * + * Generated from protobuf field string output_parameter = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOutputParameter() + { + return $this->output_parameter; + } + + /** + * Required. Output parameter which should contain the generator response. + * + * Generated from protobuf field string output_parameter = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOutputParameter($var) + { + GPBUtil::checkString($var, True); + $this->output_parameter = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GeneratorSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment_GeneratorSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/SetParameterAction.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/SetParameterAction.php new file mode 100644 index 000000000000..4d41e2c153a3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/SetParameterAction.php @@ -0,0 +1,114 @@ +google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction + */ +class SetParameterAction extends \Google\Protobuf\Internal\Message +{ + /** + * Display name of the parameter. + * + * Generated from protobuf field string parameter = 1; + */ + protected $parameter = ''; + /** + * The new value of the parameter. A null value clears the parameter. + * + * Generated from protobuf field .google.protobuf.Value value = 2; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parameter + * Display name of the parameter. + * @type \Google\Protobuf\Value $value + * The new value of the parameter. A null value clears the parameter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); + parent::__construct($data); + } + + /** + * Display name of the parameter. + * + * Generated from protobuf field string parameter = 1; + * @return string + */ + public function getParameter() + { + return $this->parameter; + } + + /** + * Display name of the parameter. + * + * Generated from protobuf field string parameter = 1; + * @param string $var + * @return $this + */ + public function setParameter($var) + { + GPBUtil::checkString($var, True); + $this->parameter = $var; + + return $this; + } + + /** + * The new value of the parameter. A null value clears the parameter. + * + * Generated from protobuf field .google.protobuf.Value value = 2; + * @return \Google\Protobuf\Value|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * The new value of the parameter. A null value clears the parameter. + * + * Generated from protobuf field .google.protobuf.Value value = 2; + * @param \Google\Protobuf\Value $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SetParameterAction::class, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment_SetParameterAction::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GcsDestination.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GcsDestination.php new file mode 100644 index 000000000000..b69c376b01ac --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GcsDestination.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.cx.v3.GcsDestination + */ +class GcsDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Google Cloud Storage URI for the exported objects. A URI is + * of the form: `gs://bucket/object-name-or-prefix` Whether a full object + * name, or just a prefix, its usage depends on the Dialogflow operation. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. The Google Cloud Storage URI for the exported objects. A URI is + * of the form: `gs://bucket/object-name-or-prefix` Whether a full object + * name, or just a prefix, its usage depends on the Dialogflow operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Gcs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Google Cloud Storage URI for the exported objects. A URI is + * of the form: `gs://bucket/object-name-or-prefix` Whether a full object + * name, or just a prefix, its usage depends on the Dialogflow operation. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. The Google Cloud Storage URI for the exported objects. A URI is + * of the form: `gs://bucket/object-name-or-prefix` Whether a full object + * name, or just a prefix, its usage depends on the Dialogflow operation. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php new file mode 100644 index 000000000000..6d92099d4244 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php @@ -0,0 +1,281 @@ +google.cloud.dialogflow.cx.v3.GenerativeSettings + */ +class GenerativeSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Format: + * `projects//locations//agents//generativeSettings`. + * + * Generated from protobuf field string name = 5; + */ + protected $name = ''; + /** + * Settings for Generative Fallback. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + */ + protected $fallback_settings = null; + /** + * Settings for Generative Safety. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + */ + protected $generative_safety_settings = null; + /** + * Settings for knowledge connector. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + */ + protected $knowledge_connector_settings = null; + /** + * Language for this settings. + * + * Generated from protobuf field string language_code = 4; + */ + protected $language_code = ''; + /** + * LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + protected $llm_model_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Format: + * `projects//locations//agents//generativeSettings`. + * @type \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings $fallback_settings + * Settings for Generative Fallback. + * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings $generative_safety_settings + * Settings for Generative Safety. + * @type \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\KnowledgeConnectorSettings $knowledge_connector_settings + * Settings for knowledge connector. + * @type string $language_code + * Language for this settings. + * @type \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $llm_model_settings + * LLM model settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::initOnce(); + parent::__construct($data); + } + + /** + * Format: + * `projects//locations//agents//generativeSettings`. + * + * Generated from protobuf field string name = 5; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Format: + * `projects//locations//agents//generativeSettings`. + * + * Generated from protobuf field string name = 5; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Settings for Generative Fallback. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings|null + */ + public function getFallbackSettings() + { + return $this->fallback_settings; + } + + public function hasFallbackSettings() + { + return isset($this->fallback_settings); + } + + public function clearFallbackSettings() + { + unset($this->fallback_settings); + } + + /** + * Settings for Generative Fallback. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings $var + * @return $this + */ + public function setFallbackSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings::class); + $this->fallback_settings = $var; + + return $this; + } + + /** + * Settings for Generative Safety. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings|null + */ + public function getGenerativeSafetySettings() + { + return $this->generative_safety_settings; + } + + public function hasGenerativeSafetySettings() + { + return isset($this->generative_safety_settings); + } + + public function clearGenerativeSafetySettings() + { + unset($this->generative_safety_settings); + } + + /** + * Settings for Generative Safety. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings $var + * @return $this + */ + public function setGenerativeSafetySettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings::class); + $this->generative_safety_settings = $var; + + return $this; + } + + /** + * Settings for knowledge connector. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * @return \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\KnowledgeConnectorSettings|null + */ + public function getKnowledgeConnectorSettings() + { + return $this->knowledge_connector_settings; + } + + public function hasKnowledgeConnectorSettings() + { + return isset($this->knowledge_connector_settings); + } + + public function clearKnowledgeConnectorSettings() + { + unset($this->knowledge_connector_settings); + } + + /** + * Settings for knowledge connector. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; + * @param \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\KnowledgeConnectorSettings $var + * @return $this + */ + public function setKnowledgeConnectorSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\KnowledgeConnectorSettings::class); + $this->knowledge_connector_settings = $var; + + return $this; + } + + /** + * Language for this settings. + * + * Generated from protobuf field string language_code = 4; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Language for this settings. + * + * 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; + } + + /** + * LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + * @return \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings|null + */ + public function getLlmModelSettings() + { + return $this->llm_model_settings; + } + + public function hasLlmModelSettings() + { + return isset($this->llm_model_settings); + } + + public function clearLlmModelSettings() + { + unset($this->llm_model_settings); + } + + /** + * LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + * @param \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $var + * @return $this + */ + public function setLlmModelSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings::class); + $this->llm_model_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings.php new file mode 100644 index 000000000000..c63b3365fbd6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings.php @@ -0,0 +1,108 @@ +google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + */ +class FallbackSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Display name of the selected prompt. + * + * Generated from protobuf field string selected_prompt = 3; + */ + protected $selected_prompt = ''; + /** + * Stored prompts that can be selected, for example default templates like + * "conservative" or "chatty", or user defined ones. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + */ + private $prompt_templates; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $selected_prompt + * Display name of the selected prompt. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings\PromptTemplate>|\Google\Protobuf\Internal\RepeatedField $prompt_templates + * Stored prompts that can be selected, for example default templates like + * "conservative" or "chatty", or user defined ones. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::initOnce(); + parent::__construct($data); + } + + /** + * Display name of the selected prompt. + * + * Generated from protobuf field string selected_prompt = 3; + * @return string + */ + public function getSelectedPrompt() + { + return $this->selected_prompt; + } + + /** + * Display name of the selected prompt. + * + * Generated from protobuf field string selected_prompt = 3; + * @param string $var + * @return $this + */ + public function setSelectedPrompt($var) + { + GPBUtil::checkString($var, True); + $this->selected_prompt = $var; + + return $this; + } + + /** + * Stored prompts that can be selected, for example default templates like + * "conservative" or "chatty", or user defined ones. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPromptTemplates() + { + return $this->prompt_templates; + } + + /** + * Stored prompts that can be selected, for example default templates like + * "conservative" or "chatty", or user defined ones. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings\PromptTemplate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPromptTemplates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings\PromptTemplate::class); + $this->prompt_templates = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FallbackSettings::class, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings_FallbackSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings/PromptTemplate.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings/PromptTemplate.php new file mode 100644 index 000000000000..ecda9e522486 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings/PromptTemplate.php @@ -0,0 +1,150 @@ +google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + */ +class PromptTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Prompt name. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * Prompt text that is sent to a LLM on no-match default, placeholders are + * filled downstream. For example: "Here is a conversation $conversation, + * a response is: " + * + * Generated from protobuf field string prompt_text = 2; + */ + protected $prompt_text = ''; + /** + * If the flag is true, the prompt is frozen and cannot be modified by + * users. + * + * Generated from protobuf field bool frozen = 3; + */ + protected $frozen = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Prompt name. + * @type string $prompt_text + * Prompt text that is sent to a LLM on no-match default, placeholders are + * filled downstream. For example: "Here is a conversation $conversation, + * a response is: " + * @type bool $frozen + * If the flag is true, the prompt is frozen and cannot be modified by + * users. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::initOnce(); + parent::__construct($data); + } + + /** + * Prompt name. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Prompt name. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Prompt text that is sent to a LLM on no-match default, placeholders are + * filled downstream. For example: "Here is a conversation $conversation, + * a response is: " + * + * Generated from protobuf field string prompt_text = 2; + * @return string + */ + public function getPromptText() + { + return $this->prompt_text; + } + + /** + * Prompt text that is sent to a LLM on no-match default, placeholders are + * filled downstream. For example: "Here is a conversation $conversation, + * a response is: " + * + * Generated from protobuf field string prompt_text = 2; + * @param string $var + * @return $this + */ + public function setPromptText($var) + { + GPBUtil::checkString($var, True); + $this->prompt_text = $var; + + return $this; + } + + /** + * If the flag is true, the prompt is frozen and cannot be modified by + * users. + * + * Generated from protobuf field bool frozen = 3; + * @return bool + */ + public function getFrozen() + { + return $this->frozen; + } + + /** + * If the flag is true, the prompt is frozen and cannot be modified by + * users. + * + * Generated from protobuf field bool frozen = 3; + * @param bool $var + * @return $this + */ + public function setFrozen($var) + { + GPBUtil::checkBool($var); + $this->frozen = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PromptTemplate::class, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings_FallbackSettings_PromptTemplate::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/KnowledgeConnectorSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/KnowledgeConnectorSettings.php new file mode 100644 index 000000000000..2703e8eb1766 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/KnowledgeConnectorSettings.php @@ -0,0 +1,263 @@ +. You are a helpful and verbose at + * , . Your task is to help humans on + * ". + * + * Generated from protobuf message google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + */ +class KnowledgeConnectorSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the company, organization or other entity that the agent + * represents. Used for knowledge connector LLM prompt and for knowledge + * search. + * + * Generated from protobuf field string business = 1; + */ + protected $business = ''; + /** + * Name of the virtual agent. Used for LLM prompt. Can be left empty. + * + * Generated from protobuf field string agent = 2; + */ + protected $agent = ''; + /** + * Identity of the agent, e.g. "virtual agent", "AI assistant". + * + * Generated from protobuf field string agent_identity = 3; + */ + protected $agent_identity = ''; + /** + * Company description, used for LLM prompt, e.g. "a family company selling + * freshly roasted coffee beans". + * + * Generated from protobuf field string business_description = 4; + */ + protected $business_description = ''; + /** + * Agent scope, e.g. "Example company website", "internal Example + * company website for employees", "manual of car owner". + * + * Generated from protobuf field string agent_scope = 5; + */ + protected $agent_scope = ''; + /** + * Whether to disable fallback to Data Store search results (in case the LLM + * couldn't pick a proper answer). Per default the feature is enabled. + * + * Generated from protobuf field bool disable_data_store_fallback = 8; + */ + protected $disable_data_store_fallback = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $business + * Name of the company, organization or other entity that the agent + * represents. Used for knowledge connector LLM prompt and for knowledge + * search. + * @type string $agent + * Name of the virtual agent. Used for LLM prompt. Can be left empty. + * @type string $agent_identity + * Identity of the agent, e.g. "virtual agent", "AI assistant". + * @type string $business_description + * Company description, used for LLM prompt, e.g. "a family company selling + * freshly roasted coffee beans". + * @type string $agent_scope + * Agent scope, e.g. "Example company website", "internal Example + * company website for employees", "manual of car owner". + * @type bool $disable_data_store_fallback + * Whether to disable fallback to Data Store search results (in case the LLM + * couldn't pick a proper answer). Per default the feature is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::initOnce(); + parent::__construct($data); + } + + /** + * Name of the company, organization or other entity that the agent + * represents. Used for knowledge connector LLM prompt and for knowledge + * search. + * + * Generated from protobuf field string business = 1; + * @return string + */ + public function getBusiness() + { + return $this->business; + } + + /** + * Name of the company, organization or other entity that the agent + * represents. Used for knowledge connector LLM prompt and for knowledge + * search. + * + * Generated from protobuf field string business = 1; + * @param string $var + * @return $this + */ + public function setBusiness($var) + { + GPBUtil::checkString($var, True); + $this->business = $var; + + return $this; + } + + /** + * Name of the virtual agent. Used for LLM prompt. Can be left empty. + * + * Generated from protobuf field string agent = 2; + * @return string + */ + public function getAgent() + { + return $this->agent; + } + + /** + * Name of the virtual agent. Used for LLM prompt. Can be left empty. + * + * Generated from protobuf field string agent = 2; + * @param string $var + * @return $this + */ + public function setAgent($var) + { + GPBUtil::checkString($var, True); + $this->agent = $var; + + return $this; + } + + /** + * Identity of the agent, e.g. "virtual agent", "AI assistant". + * + * Generated from protobuf field string agent_identity = 3; + * @return string + */ + public function getAgentIdentity() + { + return $this->agent_identity; + } + + /** + * Identity of the agent, e.g. "virtual agent", "AI assistant". + * + * Generated from protobuf field string agent_identity = 3; + * @param string $var + * @return $this + */ + public function setAgentIdentity($var) + { + GPBUtil::checkString($var, True); + $this->agent_identity = $var; + + return $this; + } + + /** + * Company description, used for LLM prompt, e.g. "a family company selling + * freshly roasted coffee beans". + * + * Generated from protobuf field string business_description = 4; + * @return string + */ + public function getBusinessDescription() + { + return $this->business_description; + } + + /** + * Company description, used for LLM prompt, e.g. "a family company selling + * freshly roasted coffee beans". + * + * Generated from protobuf field string business_description = 4; + * @param string $var + * @return $this + */ + public function setBusinessDescription($var) + { + GPBUtil::checkString($var, True); + $this->business_description = $var; + + return $this; + } + + /** + * Agent scope, e.g. "Example company website", "internal Example + * company website for employees", "manual of car owner". + * + * Generated from protobuf field string agent_scope = 5; + * @return string + */ + public function getAgentScope() + { + return $this->agent_scope; + } + + /** + * Agent scope, e.g. "Example company website", "internal Example + * company website for employees", "manual of car owner". + * + * Generated from protobuf field string agent_scope = 5; + * @param string $var + * @return $this + */ + public function setAgentScope($var) + { + GPBUtil::checkString($var, True); + $this->agent_scope = $var; + + return $this; + } + + /** + * Whether to disable fallback to Data Store search results (in case the LLM + * couldn't pick a proper answer). Per default the feature is enabled. + * + * Generated from protobuf field bool disable_data_store_fallback = 8; + * @return bool + */ + public function getDisableDataStoreFallback() + { + return $this->disable_data_store_fallback; + } + + /** + * Whether to disable fallback to Data Store search results (in case the LLM + * couldn't pick a proper answer). Per default the feature is enabled. + * + * Generated from protobuf field bool disable_data_store_fallback = 8; + * @param bool $var + * @return $this + */ + public function setDisableDataStoreFallback($var) + { + GPBUtil::checkBool($var); + $this->disable_data_store_fallback = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KnowledgeConnectorSettings::class, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings_KnowledgeConnectorSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator.php new file mode 100644 index 000000000000..4dbfcbb0f94e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator.php @@ -0,0 +1,302 @@ +google.cloud.dialogflow.cx.v3.Generator + */ +class Generator extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the generator. + * Must be set for the + * [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] + * method. [Generators.CreateGenerate][] populates the name automatically. + * Format: + * `projects//locations//agents//generators/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the generator, unique within the + * agent. The prompt contains pre-defined parameters such as $conversation, + * $last-user-utterance, etc. populated by Dialogflow. It can also contain + * custom placeholders which will be resolved during fulfillment. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. Prompt for the LLM model. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prompt_text = null; + /** + * Optional. List of custom placeholders in the prompt text. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $placeholders; + /** + * The LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + protected $llm_model_settings = null; + /** + * Parameters passed to the LLM to configure its behavior. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator.ModelParameter model_parameter = 8; + */ + protected $model_parameter = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the generator. + * Must be set for the + * [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] + * method. [Generators.CreateGenerate][] populates the name automatically. + * Format: + * `projects//locations//agents//generators/`. + * @type string $display_name + * Required. The human-readable name of the generator, unique within the + * agent. The prompt contains pre-defined parameters such as $conversation, + * $last-user-utterance, etc. populated by Dialogflow. It can also contain + * custom placeholders which will be resolved during fulfillment. + * @type \Google\Cloud\Dialogflow\Cx\V3\Phrase $prompt_text + * Required. Prompt for the LLM model. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Generator\Placeholder>|\Google\Protobuf\Internal\RepeatedField $placeholders + * Optional. List of custom placeholders in the prompt text. + * @type \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $llm_model_settings + * The LLM model settings. + * @type \Google\Cloud\Dialogflow\Cx\V3\Generator\ModelParameter $model_parameter + * Parameters passed to the LLM to configure its behavior. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the generator. + * Must be set for the + * [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] + * method. [Generators.CreateGenerate][] populates the name automatically. + * Format: + * `projects//locations//agents//generators/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the generator. + * Must be set for the + * [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] + * method. [Generators.CreateGenerate][] populates the name automatically. + * Format: + * `projects//locations//agents//generators/`. + * + * 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 human-readable name of the generator, unique within the + * agent. The prompt contains pre-defined parameters such as $conversation, + * $last-user-utterance, etc. populated by Dialogflow. It can also contain + * custom placeholders which will be resolved during fulfillment. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the generator, unique within the + * agent. The prompt contains pre-defined parameters such as $conversation, + * $last-user-utterance, etc. populated by Dialogflow. It can also contain + * custom placeholders which will be resolved during fulfillment. + * + * 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. Prompt for the LLM model. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Phrase|null + */ + public function getPromptText() + { + return $this->prompt_text; + } + + public function hasPromptText() + { + return isset($this->prompt_text); + } + + public function clearPromptText() + { + unset($this->prompt_text); + } + + /** + * Required. Prompt for the LLM model. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Phrase $var + * @return $this + */ + public function setPromptText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Phrase::class); + $this->prompt_text = $var; + + return $this; + } + + /** + * Optional. List of custom placeholders in the prompt text. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPlaceholders() + { + return $this->placeholders; + } + + /** + * Optional. List of custom placeholders in the prompt text. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Generator\Placeholder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPlaceholders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Generator\Placeholder::class); + $this->placeholders = $arr; + + return $this; + } + + /** + * The LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + * @return \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings|null + */ + public function getLlmModelSettings() + { + return $this->llm_model_settings; + } + + public function hasLlmModelSettings() + { + return isset($this->llm_model_settings); + } + + public function clearLlmModelSettings() + { + unset($this->llm_model_settings); + } + + /** + * The LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + * @param \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $var + * @return $this + */ + public function setLlmModelSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings::class); + $this->llm_model_settings = $var; + + return $this; + } + + /** + * Parameters passed to the LLM to configure its behavior. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator.ModelParameter model_parameter = 8; + * @return \Google\Cloud\Dialogflow\Cx\V3\Generator\ModelParameter|null + */ + public function getModelParameter() + { + return $this->model_parameter; + } + + public function hasModelParameter() + { + return isset($this->model_parameter); + } + + public function clearModelParameter() + { + unset($this->model_parameter); + } + + /** + * Parameters passed to the LLM to configure its behavior. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator.ModelParameter model_parameter = 8; + * @param \Google\Cloud\Dialogflow\Cx\V3\Generator\ModelParameter $var + * @return $this + */ + public function setModelParameter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Generator\ModelParameter::class); + $this->model_parameter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/ModelParameter.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/ModelParameter.php new file mode 100644 index 000000000000..e2edd6e3cabc --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/ModelParameter.php @@ -0,0 +1,257 @@ +google.cloud.dialogflow.cx.v3.Generator.ModelParameter + */ +class ModelParameter extends \Google\Protobuf\Internal\Message +{ + /** + * The temperature used for sampling. Temperature sampling occurs after both + * topP and topK have been applied. + * Valid range: [0.0, 1.0] + * Low temperature = less random. High temperature = more random. + * + * Generated from protobuf field optional float temperature = 1; + */ + protected $temperature = null; + /** + * The maximum number of tokens to generate. + * + * Generated from protobuf field optional int32 max_decode_steps = 2; + */ + protected $max_decode_steps = null; + /** + * If set, only the tokens comprising the top top_p probability mass are + * considered. If both top_p and top_k are + * set, top_p will be used for further refining candidates selected with + * top_k. + * Valid range: (0.0, 1.0]. + * Small topP = less random. Large topP = more random. + * + * Generated from protobuf field optional float top_p = 3; + */ + protected $top_p = null; + /** + * If set, the sampling process in each step is limited to the top_k tokens + * with highest probabilities. + * Valid range: [1, 40] or 1000+. + * Small topK = less random. Large topK = more random. + * + * Generated from protobuf field optional int32 top_k = 4; + */ + protected $top_k = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $temperature + * The temperature used for sampling. Temperature sampling occurs after both + * topP and topK have been applied. + * Valid range: [0.0, 1.0] + * Low temperature = less random. High temperature = more random. + * @type int $max_decode_steps + * The maximum number of tokens to generate. + * @type float $top_p + * If set, only the tokens comprising the top top_p probability mass are + * considered. If both top_p and top_k are + * set, top_p will be used for further refining candidates selected with + * top_k. + * Valid range: (0.0, 1.0]. + * Small topP = less random. Large topP = more random. + * @type int $top_k + * If set, the sampling process in each step is limited to the top_k tokens + * with highest probabilities. + * Valid range: [1, 40] or 1000+. + * Small topK = less random. Large topK = more random. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); + parent::__construct($data); + } + + /** + * The temperature used for sampling. Temperature sampling occurs after both + * topP and topK have been applied. + * Valid range: [0.0, 1.0] + * Low temperature = less random. High temperature = more random. + * + * Generated from protobuf field optional float temperature = 1; + * @return float + */ + public function getTemperature() + { + return isset($this->temperature) ? $this->temperature : 0.0; + } + + public function hasTemperature() + { + return isset($this->temperature); + } + + public function clearTemperature() + { + unset($this->temperature); + } + + /** + * The temperature used for sampling. Temperature sampling occurs after both + * topP and topK have been applied. + * Valid range: [0.0, 1.0] + * Low temperature = less random. High temperature = more random. + * + * Generated from protobuf field optional float temperature = 1; + * @param float $var + * @return $this + */ + public function setTemperature($var) + { + GPBUtil::checkFloat($var); + $this->temperature = $var; + + return $this; + } + + /** + * The maximum number of tokens to generate. + * + * Generated from protobuf field optional int32 max_decode_steps = 2; + * @return int + */ + public function getMaxDecodeSteps() + { + return isset($this->max_decode_steps) ? $this->max_decode_steps : 0; + } + + public function hasMaxDecodeSteps() + { + return isset($this->max_decode_steps); + } + + public function clearMaxDecodeSteps() + { + unset($this->max_decode_steps); + } + + /** + * The maximum number of tokens to generate. + * + * Generated from protobuf field optional int32 max_decode_steps = 2; + * @param int $var + * @return $this + */ + public function setMaxDecodeSteps($var) + { + GPBUtil::checkInt32($var); + $this->max_decode_steps = $var; + + return $this; + } + + /** + * If set, only the tokens comprising the top top_p probability mass are + * considered. If both top_p and top_k are + * set, top_p will be used for further refining candidates selected with + * top_k. + * Valid range: (0.0, 1.0]. + * Small topP = less random. Large topP = more random. + * + * Generated from protobuf field optional float top_p = 3; + * @return float + */ + public function getTopP() + { + return isset($this->top_p) ? $this->top_p : 0.0; + } + + public function hasTopP() + { + return isset($this->top_p); + } + + public function clearTopP() + { + unset($this->top_p); + } + + /** + * If set, only the tokens comprising the top top_p probability mass are + * considered. If both top_p and top_k are + * set, top_p will be used for further refining candidates selected with + * top_k. + * Valid range: (0.0, 1.0]. + * Small topP = less random. Large topP = more random. + * + * Generated from protobuf field optional float top_p = 3; + * @param float $var + * @return $this + */ + public function setTopP($var) + { + GPBUtil::checkFloat($var); + $this->top_p = $var; + + return $this; + } + + /** + * If set, the sampling process in each step is limited to the top_k tokens + * with highest probabilities. + * Valid range: [1, 40] or 1000+. + * Small topK = less random. Large topK = more random. + * + * Generated from protobuf field optional int32 top_k = 4; + * @return int + */ + public function getTopK() + { + return isset($this->top_k) ? $this->top_k : 0; + } + + public function hasTopK() + { + return isset($this->top_k); + } + + public function clearTopK() + { + unset($this->top_k); + } + + /** + * If set, the sampling process in each step is limited to the top_k tokens + * with highest probabilities. + * Valid range: [1, 40] or 1000+. + * Small topK = less random. Large topK = more random. + * + * Generated from protobuf field optional int32 top_k = 4; + * @param int $var + * @return $this + */ + public function setTopK($var) + { + GPBUtil::checkInt32($var); + $this->top_k = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ModelParameter::class, \Google\Cloud\Dialogflow\Cx\V3\Generator_ModelParameter::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/Placeholder.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/Placeholder.php new file mode 100644 index 000000000000..ef18647f4cad --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/Placeholder.php @@ -0,0 +1,104 @@ +google.cloud.dialogflow.cx.v3.Generator.Placeholder + */ +class Placeholder extends \Google\Protobuf\Internal\Message +{ + /** + * Unique ID used to map custom placeholder to parameters in fulfillment. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Custom placeholder value in the prompt text. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Unique ID used to map custom placeholder to parameters in fulfillment. + * @type string $name + * Custom placeholder value in the prompt text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); + parent::__construct($data); + } + + /** + * Unique ID used to map custom placeholder to parameters in fulfillment. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Unique ID used to map custom placeholder to parameters in fulfillment. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Custom placeholder value in the prompt text. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Custom placeholder value in the prompt text. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Placeholder::class, \Google\Cloud\Dialogflow\Cx\V3\Generator_Placeholder::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentRequest.php new file mode 100644 index 000000000000..66d7b0b06484 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentRequest.php @@ -0,0 +1,87 @@ +google.cloud.dialogflow.cx.v3.GetAgentRequest + */ +class GetAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the agent. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the agent. + * Format: `projects//locations//agents/`. Please see + * {@see AgentsClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetAgentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the agent. + * Format: `projects//locations//agents/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the agent. + * Format: `projects//locations//agents/`. + * + * 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 agent. + * Format: `projects//locations//agents/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentValidationResultRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentValidationResultRequest.php new file mode 100644 index 000000000000..c77940ba4421 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentValidationResultRequest.php @@ -0,0 +1,126 @@ +google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest + */ +class GetAgentValidationResultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent name. + * Format: + * `projects//locations//agents//validationResult`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + + /** + * @param string $name Required. The agent name. + * Format: + * `projects//locations//agents//validationResult`. Please see + * {@see AgentsClient::agentValidationResultName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetAgentValidationResultRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The agent name. + * Format: + * `projects//locations//agents//validationResult`. + * @type string $language_code + * If not specified, the agent's default language is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent name. + * Format: + * `projects//locations//agents//validationResult`. + * + * 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 agent name. + * Format: + * `projects//locations//agents//validationResult`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetChangelogRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetChangelogRequest.php new file mode 100644 index 000000000000..f1224cb4e1f2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetChangelogRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetChangelogRequest + */ +class GetChangelogRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the changelog to get. + * Format: + * `projects//locations//agents//changelogs/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the changelog to get. + * Format: + * `projects//locations//agents//changelogs/`. Please see + * {@see ChangelogsClient::changelogName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetChangelogRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the changelog to get. + * Format: + * `projects//locations//agents//changelogs/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Changelog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the changelog to get. + * Format: + * `projects//locations//agents//changelogs/`. + * + * 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 changelog to get. + * Format: + * `projects//locations//agents//changelogs/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetDeploymentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetDeploymentRequest.php new file mode 100644 index 000000000000..ce855c20c702 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetDeploymentRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetDeploymentRequest + */ +class GetDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: + * `projects//locations//agents//environments//deployments/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: + * `projects//locations//agents//environments//deployments/`. Please see + * {@see DeploymentsClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetDeploymentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: + * `projects//locations//agents//environments//deployments/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Deployment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: + * `projects//locations//agents//environments//deployments/`. + * + * 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 + * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: + * `projects//locations//agents//environments//deployments/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEntityTypeRequest.php new file mode 100644 index 000000000000..7effab8cda78 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEntityTypeRequest.php @@ -0,0 +1,162 @@ +google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + */ +class GetEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entity type. + * Format: + * `projects//locations//agents//entityTypes/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The language to retrieve the entity type for. The following fields are + * language dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + + /** + * @param string $name Required. The name of the entity type. + * Format: + * `projects//locations//agents//entityTypes/`. Please see + * {@see EntityTypesClient::entityTypeName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetEntityTypeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entity type. + * Format: + * `projects//locations//agents//entityTypes/`. + * @type string $language_code + * The language to retrieve the entity type for. The following fields are + * language dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entity type. + * Format: + * `projects//locations//agents//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//locations//agents//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; + } + + /** + * The language to retrieve the entity type for. The following fields are + * language dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to retrieve the entity type for. The following fields are + * language dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEnvironmentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEnvironmentRequest.php new file mode 100644 index 000000000000..946c76f070c4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEnvironmentRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + */ +class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: + * `projects//locations//agents//environments/`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetEnvironmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: + * `projects//locations//agents//environments/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: + * `projects//locations//agents//environments/`. + * + * 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][google.cloud.dialogflow.cx.v3.Environment]. Format: + * `projects//locations//agents//environments/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExampleRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExampleRequest.php new file mode 100644 index 000000000000..f7e3a3fe3233 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExampleRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetExampleRequest + */ +class GetExampleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the example. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the example. + * Format: + * `projects//locations//agents//playbooks//examples/`. Please see + * {@see ExamplesClient::exampleName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetExampleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the example. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Example::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the example. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * + * 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 example. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExperimentRequest.php new file mode 100644 index 000000000000..a3e27c2aa6d5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExperimentRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetExperimentRequest + */ +class GetExperimentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: + * `projects//locations//agents//environments//experiments/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: + * `projects//locations//agents//environments//experiments/`. Please see + * {@see ExperimentsClient::experimentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetExperimentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: + * `projects//locations//agents//environments//experiments/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: + * `projects//locations//agents//environments//experiments/`. + * + * 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][google.cloud.dialogflow.cx.v3.Environment]. Format: + * `projects//locations//agents//environments//experiments/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowRequest.php new file mode 100644 index 000000000000..6c4411625a6e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowRequest.php @@ -0,0 +1,166 @@ +google.cloud.dialogflow.cx.v3.GetFlowRequest + */ +class GetFlowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the flow to get. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The language to retrieve the flow for. The following fields are language + * dependent: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + + /** + * @param string $name Required. The name of the flow to get. + * Format: + * `projects//locations//agents//flows/`. Please see + * {@see FlowsClient::flowName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetFlowRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the flow to get. + * Format: + * `projects//locations//agents//flows/`. + * @type string $language_code + * The language to retrieve the flow for. The following fields are language + * dependent: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the flow to get. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 flow to get. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The language to retrieve the flow for. The following fields are language + * dependent: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to retrieve the flow for. The following fields are language + * dependent: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowValidationResultRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowValidationResultRequest.php new file mode 100644 index 000000000000..386b8d583a84 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowValidationResultRequest.php @@ -0,0 +1,126 @@ +google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + */ +class GetFlowValidationResultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The flow name. + * Format: + * `projects//locations//agents//flows//validationResult`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + + /** + * @param string $name Required. The flow name. + * Format: + * `projects//locations//agents//flows//validationResult`. Please see + * {@see FlowsClient::flowValidationResultName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetFlowValidationResultRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The flow name. + * Format: + * `projects//locations//agents//flows//validationResult`. + * @type string $language_code + * If not specified, the agent's default language is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Required. The flow name. + * Format: + * `projects//locations//agents//flows//validationResult`. + * + * 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 flow name. + * Format: + * `projects//locations//agents//flows//validationResult`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGenerativeSettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGenerativeSettingsRequest.php new file mode 100644 index 000000000000..d48839cc64e2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGenerativeSettingsRequest.php @@ -0,0 +1,124 @@ +google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest + */ +class GetGenerativeSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects//locations//agents//generativeSettings`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Language code of the generative settings. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $language_code = ''; + + /** + * @param string $name Required. Format: + * `projects//locations//agents//generativeSettings`. Please see + * {@see AgentsClient::agentGenerativeSettingsName()} for help formatting this field. + * @param string $languageCode Required. Language code of the generative settings. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetGenerativeSettingsRequest + * + * @experimental + */ + public static function build(string $name, string $languageCode): self + { + return (new self()) + ->setName($name) + ->setLanguageCode($languageCode); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects//locations//agents//generativeSettings`. + * @type string $language_code + * Required. Language code of the generative settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects//locations//agents//generativeSettings`. + * + * 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. Format: + * `projects//locations//agents//generativeSettings`. + * + * 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. Language code of the generative settings. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Required. Language code of the generative settings. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGeneratorRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGeneratorRequest.php new file mode 100644 index 000000000000..78213756fbee --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGeneratorRequest.php @@ -0,0 +1,126 @@ +google.cloud.dialogflow.cx.v3.GetGeneratorRequest + */ +class GetGeneratorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the generator. + * Format: + * `projects//locations//agents//generators/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The language to list generators for. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + + /** + * @param string $name Required. The name of the generator. + * Format: + * `projects//locations//agents//generators/`. Please see + * {@see GeneratorsClient::generatorName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetGeneratorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the generator. + * Format: + * `projects//locations//agents//generators/`. + * @type string $language_code + * The language to list generators for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the generator. + * Format: + * `projects//locations//agents//generators/`. + * + * 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 generator. + * Format: + * `projects//locations//agents//generators/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The language to list generators for. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to list generators for. + * + * Generated from protobuf field string language_code = 2; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetIntentRequest.php new file mode 100644 index 000000000000..9a87d6268651 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetIntentRequest.php @@ -0,0 +1,154 @@ +google.cloud.dialogflow.cx.v3.GetIntentRequest + */ +class GetIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the intent. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The language to retrieve the intent for. The following fields are language + * dependent: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + + /** + * @param string $name Required. The name of the intent. + * Format: + * `projects//locations//agents//intents/`. Please see + * {@see IntentsClient::intentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetIntentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the intent. + * Format: + * `projects//locations//agents//intents/`. + * @type string $language_code + * The language to retrieve the intent for. The following fields are language + * dependent: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the intent. + * Format: + * `projects//locations//agents//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//locations//agents//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; + } + + /** + * The language to retrieve the intent for. The following fields are language + * dependent: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to retrieve the intent for. The following fields are language + * dependent: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPageRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPageRequest.php new file mode 100644 index 000000000000..d5d22c9a3d98 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPageRequest.php @@ -0,0 +1,198 @@ +google.cloud.dialogflow.cx.v3.GetPageRequest + */ +class GetPageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the page. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The language to retrieve the page for. The following fields are language + * dependent: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + + /** + * @param string $name Required. The name of the page. + * Format: + * `projects//locations//agents//flows//pages/`. Please see + * {@see PagesClient::pageName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetPageRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the page. + * Format: + * `projects//locations//agents//flows//pages/`. + * @type string $language_code + * The language to retrieve the page for. The following fields are language + * dependent: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the page. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * 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 page. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The language to retrieve the page for. The following fields are language + * dependent: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to retrieve the page for. The following fields are language + * dependent: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookRequest.php new file mode 100644 index 000000000000..c93817eb03ab --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetPlaybookRequest + */ +class GetPlaybookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. Please see + * {@see PlaybooksClient::playbookName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetPlaybookRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookVersionRequest.php new file mode 100644 index 000000000000..e6d613fda3a3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookVersionRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + */ +class GetPlaybookVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. Please see + * {@see PlaybooksClient::playbookVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetPlaybookVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//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 playbook version. + * Format: + * `projects//locations//agents//playbooks//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSecuritySettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSecuritySettingsRequest.php new file mode 100644 index 000000000000..8c64d8ed1b53 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSecuritySettingsRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + */ +class GetSecuritySettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the settings. + * Format: + * `projects//locations//securitySettings/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the settings. + * Format: + * `projects//locations//securitySettings/`. Please see + * {@see SecuritySettingsServiceClient::securitySettingsName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetSecuritySettingsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the settings. + * Format: + * `projects//locations//securitySettings/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the settings. + * Format: + * `projects//locations//securitySettings/`. + * + * 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 name of the settings. + * Format: + * `projects//locations//securitySettings/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSessionEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSessionEntityTypeRequest.php new file mode 100644 index 000000000000..13dc7ecc6a3f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSessionEntityTypeRequest.php @@ -0,0 +1,112 @@ +google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + */ +class GetSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session entity type. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the session entity type. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. Please see + * {@see SessionEntityTypesClient::sessionEntityTypeName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetSessionEntityTypeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the session entity type. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session entity type. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * + * 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//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseRequest.php new file mode 100644 index 000000000000..30997320b4ef --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetTestCaseRequest + */ +class GetTestCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the testcase. + * Format: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the testcase. + * Format: + * `projects//locations//agents//testCases/`. Please see + * {@see TestCasesClient::testCaseName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetTestCaseRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the testcase. + * Format: + * `projects//locations//agents//testCases/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the testcase. + * Format: + * `projects//locations//agents//testCases/`. + * + * 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 testcase. + * Format: + * `projects//locations//agents//testCases/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseResultRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseResultRequest.php new file mode 100644 index 000000000000..a5b229faf6a6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseResultRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + */ +class GetTestCaseResultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the testcase. + * Format: + * `projects//locations//agents//testCases//results/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the testcase. + * Format: + * `projects//locations//agents//testCases//results/`. Please see + * {@see TestCasesClient::testCaseResultName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetTestCaseResultRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the testcase. + * Format: + * `projects//locations//agents//testCases//results/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the testcase. + * Format: + * `projects//locations//agents//testCases//results/`. + * + * 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 testcase. + * Format: + * `projects//locations//agents//testCases//results/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolRequest.php new file mode 100644 index 000000000000..06cadfc85c51 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetToolRequest + */ +class GetToolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Tool. + * Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the Tool. + * Format: + * `projects//locations//agents//tools/`. Please see + * {@see ToolsClient::toolName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetToolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Tool. + * Format: + * `projects//locations//agents//tools/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Tool. + * Format: + * `projects//locations//agents//tools/`. + * + * 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 Tool. + * Format: + * `projects//locations//agents//tools/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolVersionRequest.php new file mode 100644 index 000000000000..5ae8cf8eb87e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolVersionRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetToolVersionRequest + */ +class GetToolVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. Please see + * {@see ToolsClient::toolVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetToolVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//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 tool version. + * Format: + * `projects//locations//agents//tools//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTransitionRouteGroupRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTransitionRouteGroupRequest.php new file mode 100644 index 000000000000..6a2f1a533b0d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTransitionRouteGroupRequest.php @@ -0,0 +1,177 @@ +google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + */ +class GetTransitionRouteGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The language to retrieve the transition route group for. The following + * fields are language dependent: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + + /** + * @param string $name Required. The name of the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. Please see + * {@see TransitionRouteGroupsClient::transitionRouteGroupName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetTransitionRouteGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. + * @type string $language_code + * The language to retrieve the transition route group for. The following + * fields are language dependent: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\TransitionRouteGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. + * + * 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 + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The language to retrieve the transition route group for. The following + * fields are language dependent: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to retrieve the transition route group for. The following + * fields are language dependent: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetVersionRequest.php new file mode 100644 index 000000000000..5936c66c863d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetVersionRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetVersionRequest + */ +class GetVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. + * Format: + * `projects//locations//agents//flows//versions/`. Please see + * {@see VersionsClient::versionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. + * Format: + * `projects//locations//agents//flows//versions/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. + * Format: + * `projects//locations//agents//flows//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][google.cloud.dialogflow.cx.v3.Version]. + * Format: + * `projects//locations//agents//flows//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetWebhookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetWebhookRequest.php new file mode 100644 index 000000000000..88404bd3075f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetWebhookRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.GetWebhookRequest + */ +class GetWebhookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the webhook. + * Format: + * `projects//locations//agents//webhooks/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the webhook. + * Format: + * `projects//locations//agents//webhooks/`. Please see + * {@see WebhooksClient::webhookName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\GetWebhookRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the webhook. + * Format: + * `projects//locations//agents//webhooks/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the webhook. + * Format: + * `projects//locations//agents//webhooks/`. + * + * 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 webhook. + * Format: + * `projects//locations//agents//webhooks/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler.php new file mode 100644 index 000000000000..1fd220a2f67a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler.php @@ -0,0 +1,109 @@ +google.cloud.dialogflow.cx.v3.Handler + */ +class Handler extends \Google\Protobuf\Internal\Message +{ + protected $handler; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Handler\EventHandler $event_handler + * A handler triggered by event. + * @type \Google\Cloud\Dialogflow\Cx\V3\Handler\LifecycleHandler $lifecycle_handler + * A handler triggered during specific lifecycle of the playbook execution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * A handler triggered by event. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\Handler\EventHandler|null + */ + public function getEventHandler() + { + return $this->readOneof(1); + } + + public function hasEventHandler() + { + return $this->hasOneof(1); + } + + /** + * A handler triggered by event. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\Handler\EventHandler $var + * @return $this + */ + public function setEventHandler($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Handler\EventHandler::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A handler triggered during specific lifecycle of the playbook execution. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\Handler\LifecycleHandler|null + */ + public function getLifecycleHandler() + { + return $this->readOneof(3); + } + + public function hasLifecycleHandler() + { + return $this->hasOneof(3); + } + + /** + * A handler triggered during specific lifecycle of the playbook execution. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\Handler\LifecycleHandler $var + * @return $this + */ + public function setLifecycleHandler($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Handler\LifecycleHandler::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getHandler() + { + return $this->whichOneof("handler"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/EventHandler.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/EventHandler.php new file mode 100644 index 000000000000..a4ff5fae9a4e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/EventHandler.php @@ -0,0 +1,149 @@ +google.cloud.dialogflow.cx.v3.Handler.EventHandler + */ +class EventHandler extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the event that triggers this handler. + * + * Generated from protobuf field string event = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event = ''; + /** + * Optional. The condition that must be satisfied to trigger this handler. + * + * Generated from protobuf field string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $condition = ''; + /** + * Required. The fulfillment to call when the event occurs. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fulfillment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $event + * Required. The name of the event that triggers this handler. + * @type string $condition + * Optional. The condition that must be satisfied to trigger this handler. + * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $fulfillment + * Required. The fulfillment to call when the event occurs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the event that triggers this handler. + * + * Generated from protobuf field string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEvent() + { + return $this->event; + } + + /** + * Required. The name of the event that triggers this handler. + * + * Generated from protobuf field string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkString($var, True); + $this->event = $var; + + return $this; + } + + /** + * Optional. The condition that must be satisfied to trigger this handler. + * + * Generated from protobuf field string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * Optional. The condition that must be satisfied to trigger this handler. + * + * Generated from protobuf field string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkString($var, True); + $this->condition = $var; + + return $this; + } + + /** + * Required. The fulfillment to call when the event occurs. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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 call when the event occurs. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var + * @return $this + */ + public function setFulfillment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); + $this->fulfillment = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EventHandler::class, \Google\Cloud\Dialogflow\Cx\V3\Handler_EventHandler::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/LifecycleHandler.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/LifecycleHandler.php new file mode 100644 index 000000000000..464e97b7a89c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/LifecycleHandler.php @@ -0,0 +1,166 @@ +google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler + */ +class LifecycleHandler extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the lifecycle stage that triggers this handler. + * Supported values: + * * `playbook-start` + * * `pre-action-selection` + * * `pre-action-execution` + * + * Generated from protobuf field string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lifecycle_stage = ''; + /** + * Optional. The condition that must be satisfied to trigger this handler. + * + * Generated from protobuf field string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $condition = ''; + /** + * Required. The fulfillment to call when this handler is triggered. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fulfillment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $lifecycle_stage + * Required. The name of the lifecycle stage that triggers this handler. + * Supported values: + * * `playbook-start` + * * `pre-action-selection` + * * `pre-action-execution` + * @type string $condition + * Optional. The condition that must be satisfied to trigger this handler. + * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $fulfillment + * Required. The fulfillment to call when this handler is triggered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the lifecycle stage that triggers this handler. + * Supported values: + * * `playbook-start` + * * `pre-action-selection` + * * `pre-action-execution` + * + * Generated from protobuf field string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLifecycleStage() + { + return $this->lifecycle_stage; + } + + /** + * Required. The name of the lifecycle stage that triggers this handler. + * Supported values: + * * `playbook-start` + * * `pre-action-selection` + * * `pre-action-execution` + * + * Generated from protobuf field string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLifecycleStage($var) + { + GPBUtil::checkString($var, True); + $this->lifecycle_stage = $var; + + return $this; + } + + /** + * Optional. The condition that must be satisfied to trigger this handler. + * + * Generated from protobuf field string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * Optional. The condition that must be satisfied to trigger this handler. + * + * Generated from protobuf field string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkString($var, True); + $this->condition = $var; + + return $this; + } + + /** + * Required. The fulfillment to call when this handler is triggered. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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 call when this handler is triggered. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var + * @return $this + */ + public function setFulfillment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); + $this->fulfillment = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LifecycleHandler::class, \Google\Cloud\Dialogflow\Cx\V3\Handler_LifecycleHandler::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesMetadata.php new file mode 100644 index 000000000000..119f702293dc --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesMetadata.php @@ -0,0 +1,35 @@ +google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + */ +class ImportEntityTypesMetadata 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\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest.php new file mode 100644 index 000000000000..fc5722d082e1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest.php @@ -0,0 +1,264 @@ +google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + */ +class ImportEntityTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to import the entity types into. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Merge option for importing entity types. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $merge_option = 0; + /** + * Optional. The target entity type to import into. + * Format: + * `projects//locations//agents//entity_types/`. + * If set, there should be only one entity type included in + * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], + * of which the type should match the type of the target entity type. All + * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the + * imported entity type will be added to the target entity type. + * + * Generated from protobuf field string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $target_entity_type = ''; + protected $entity_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to import the entity types into. + * Format: `projects//locations//agents/`. + * @type string $entity_types_uri + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to import entity types from. The format of this URI must be + * `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 \Google\Cloud\Dialogflow\Cx\V3\InlineSource $entity_types_content + * Uncompressed byte content of entity types. + * @type int $merge_option + * Required. Merge option for importing entity types. + * @type string $target_entity_type + * Optional. The target entity type to import into. + * Format: + * `projects//locations//agents//entity_types/`. + * If set, there should be only one entity type included in + * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], + * of which the type should match the type of the target entity type. All + * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the + * imported entity type will be added to the target entity type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to import the entity types into. + * Format: `projects//locations//agents/`. + * + * 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 import the entity types into. + * Format: `projects//locations//agents/`. + * + * 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](https://cloud.google.com/storage/docs/) URI + * to import entity types from. The format of this URI must be + * `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 entity_types_uri = 2; + * @return string + */ + public function getEntityTypesUri() + { + return $this->readOneof(2); + } + + public function hasEntityTypesUri() + { + return $this->hasOneof(2); + } + + /** + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to import entity types from. The format of this URI must be + * `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 entity_types_uri = 2; + * @param string $var + * @return $this + */ + public function setEntityTypesUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Uncompressed byte content of entity types. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\InlineSource|null + */ + public function getEntityTypesContent() + { + return $this->readOneof(3); + } + + public function hasEntityTypesContent() + { + return $this->hasOneof(3); + } + + /** + * Uncompressed byte content of entity types. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\InlineSource $var + * @return $this + */ + public function setEntityTypesContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InlineSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. Merge option for importing entity types. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMergeOption() + { + return $this->merge_option; + } + + /** + * Required. Merge option for importing entity types. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMergeOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesRequest\MergeOption::class); + $this->merge_option = $var; + + return $this; + } + + /** + * Optional. The target entity type to import into. + * Format: + * `projects//locations//agents//entity_types/`. + * If set, there should be only one entity type included in + * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], + * of which the type should match the type of the target entity type. All + * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the + * imported entity type will be added to the target entity type. + * + * Generated from protobuf field string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getTargetEntityType() + { + return $this->target_entity_type; + } + + /** + * Optional. The target entity type to import into. + * Format: + * `projects//locations//agents//entity_types/`. + * If set, there should be only one entity type included in + * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], + * of which the type should match the type of the target entity type. All + * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the + * imported entity type will be added to the target entity type. + * + * Generated from protobuf field string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetEntityType($var) + { + GPBUtil::checkString($var, True); + $this->target_entity_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getEntityTypes() + { + return $this->whichOneof("entity_types"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest/MergeOption.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest/MergeOption.php new file mode 100644 index 000000000000..5dcc43f4a90d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest/MergeOption.php @@ -0,0 +1,90 @@ +google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption + */ +class MergeOption +{ + /** + * Unspecified. If used, system uses REPORT_CONFLICT as default. + * + * Generated from protobuf enum MERGE_OPTION_UNSPECIFIED = 0; + */ + const MERGE_OPTION_UNSPECIFIED = 0; + /** + * Replace the original entity type in the agent with the new entity type + * when display name conflicts exist. + * + * Generated from protobuf enum REPLACE = 1; + */ + const REPLACE = 1; + /** + * Merge the original entity type with the new entity type when display name + * conflicts exist. + * + * Generated from protobuf enum MERGE = 2; + */ + const MERGE = 2; + /** + * Create new entity types with new display names to differentiate them from + * the existing entity types when display name conflicts exist. + * + * Generated from protobuf enum RENAME = 3; + */ + const RENAME = 3; + /** + * Report conflict information if display names conflict is detected. + * Otherwise, import entity types. + * + * Generated from protobuf enum REPORT_CONFLICT = 4; + */ + const REPORT_CONFLICT = 4; + /** + * Keep the original entity type and discard the conflicting new entity type + * when display name conflicts exist. + * + * Generated from protobuf enum KEEP = 5; + */ + const KEEP = 5; + + private static $valueToName = [ + self::MERGE_OPTION_UNSPECIFIED => 'MERGE_OPTION_UNSPECIFIED', + self::REPLACE => 'REPLACE', + self::MERGE => 'MERGE', + self::RENAME => 'RENAME', + self::REPORT_CONFLICT => 'REPORT_CONFLICT', + self::KEEP => 'KEEP', + ]; + + 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(MergeOption::class, \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesRequest_MergeOption::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse.php new file mode 100644 index 000000000000..ad58590898c3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse.php @@ -0,0 +1,128 @@ +google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse + */ +class ImportEntityTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the imported entity types. + * Format: + * `projects//locations//agents//entity_types/`. + * + * Generated from protobuf field repeated string entity_types = 1 [(.google.api.resource_reference) = { + */ + private $entity_types; + /** + * Info which resources have conflicts when + * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option + * is set in ImportEntityTypesRequest. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + */ + protected $conflicting_resources = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $entity_types + * The unique identifier of the imported entity types. + * Format: + * `projects//locations//agents//entity_types/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse\ConflictingResources $conflicting_resources + * Info which resources have conflicts when + * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option + * is set in ImportEntityTypesRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the imported entity types. + * Format: + * `projects//locations//agents//entity_types/`. + * + * Generated from protobuf field repeated string entity_types = 1 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityTypes() + { + return $this->entity_types; + } + + /** + * The unique identifier of the imported entity types. + * Format: + * `projects//locations//agents//entity_types/`. + * + * Generated from protobuf field repeated string entity_types = 1 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->entity_types = $arr; + + return $this; + } + + /** + * Info which resources have conflicts when + * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option + * is set in ImportEntityTypesRequest. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse\ConflictingResources|null + */ + public function getConflictingResources() + { + return $this->conflicting_resources; + } + + public function hasConflictingResources() + { + return isset($this->conflicting_resources); + } + + public function clearConflictingResources() + { + unset($this->conflicting_resources); + } + + /** + * Info which resources have conflicts when + * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option + * is set in ImportEntityTypesRequest. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse\ConflictingResources $var + * @return $this + */ + public function setConflictingResources($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse\ConflictingResources::class); + $this->conflicting_resources = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse/ConflictingResources.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse/ConflictingResources.php new file mode 100644 index 000000000000..4217e676872b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse/ConflictingResources.php @@ -0,0 +1,106 @@ +google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + */ +class ConflictingResources extends \Google\Protobuf\Internal\Message +{ + /** + * Display names of conflicting entity types. + * + * Generated from protobuf field repeated string entity_type_display_names = 1; + */ + private $entity_type_display_names; + /** + * Display names of conflicting entities. + * + * Generated from protobuf field repeated string entity_display_names = 2; + */ + private $entity_display_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $entity_type_display_names + * Display names of conflicting entity types. + * @type array|\Google\Protobuf\Internal\RepeatedField $entity_display_names + * Display names of conflicting entities. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Display names of conflicting entity types. + * + * Generated from protobuf field repeated string entity_type_display_names = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityTypeDisplayNames() + { + return $this->entity_type_display_names; + } + + /** + * Display names of conflicting entity types. + * + * Generated from protobuf field repeated string entity_type_display_names = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityTypeDisplayNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->entity_type_display_names = $arr; + + return $this; + } + + /** + * Display names of conflicting entities. + * + * Generated from protobuf field repeated string entity_display_names = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityDisplayNames() + { + return $this->entity_display_names; + } + + /** + * Display names of conflicting entities. + * + * Generated from protobuf field repeated string entity_display_names = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityDisplayNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->entity_display_names = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConflictingResources::class, \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse_ConflictingResources::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest.php new file mode 100644 index 000000000000..89c1fe18c85a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest.php @@ -0,0 +1,250 @@ +google.cloud.dialogflow.cx.v3.ImportFlowRequest + */ +class ImportFlowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to import the flow into. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Flow import mode. If not specified, `KEEP` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption import_option = 4; + */ + protected $import_option = 0; + /** + * Optional. Specifies the import strategy used when resolving resource + * conflicts. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $flow_import_strategy = null; + protected $flow; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to import the flow into. + * Format: `projects//locations//agents/`. + * @type string $flow_uri + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to import flow from. The format of this URI must be + * `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 $flow_content + * Uncompressed raw byte content for flow. + * @type int $import_option + * Flow import mode. If not specified, `KEEP` is assumed. + * @type \Google\Cloud\Dialogflow\Cx\V3\FlowImportStrategy $flow_import_strategy + * Optional. Specifies the import strategy used when resolving resource + * conflicts. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to import the flow into. + * Format: `projects//locations//agents/`. + * + * 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 import the flow into. + * Format: `projects//locations//agents/`. + * + * 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](https://cloud.google.com/storage/docs/) URI + * to import flow from. The format of this URI must be + * `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 flow_uri = 2; + * @return string + */ + public function getFlowUri() + { + return $this->readOneof(2); + } + + public function hasFlowUri() + { + return $this->hasOneof(2); + } + + /** + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to import flow from. The format of this URI must be + * `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 flow_uri = 2; + * @param string $var + * @return $this + */ + public function setFlowUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Uncompressed raw byte content for flow. + * + * Generated from protobuf field bytes flow_content = 3; + * @return string + */ + public function getFlowContent() + { + return $this->readOneof(3); + } + + public function hasFlowContent() + { + return $this->hasOneof(3); + } + + /** + * Uncompressed raw byte content for flow. + * + * Generated from protobuf field bytes flow_content = 3; + * @param string $var + * @return $this + */ + public function setFlowContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Flow import mode. If not specified, `KEEP` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption import_option = 4; + * @return int + */ + public function getImportOption() + { + return $this->import_option; + } + + /** + * Flow import mode. If not specified, `KEEP` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption import_option = 4; + * @param int $var + * @return $this + */ + public function setImportOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportFlowRequest\ImportOption::class); + $this->import_option = $var; + + return $this; + } + + /** + * Optional. Specifies the import strategy used when resolving resource + * conflicts. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\FlowImportStrategy|null + */ + public function getFlowImportStrategy() + { + return $this->flow_import_strategy; + } + + public function hasFlowImportStrategy() + { + return isset($this->flow_import_strategy); + } + + public function clearFlowImportStrategy() + { + unset($this->flow_import_strategy); + } + + /** + * Optional. Specifies the import strategy used when resolving resource + * conflicts. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\FlowImportStrategy $var + * @return $this + */ + public function setFlowImportStrategy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\FlowImportStrategy::class); + $this->flow_import_strategy = $var; + + return $this; + } + + /** + * @return string + */ + public function getFlow() + { + return $this->whichOneof("flow"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest/ImportOption.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest/ImportOption.php new file mode 100644 index 000000000000..452eedc24aac --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest/ImportOption.php @@ -0,0 +1,68 @@ +google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption + */ +class ImportOption +{ + /** + * Unspecified. Treated as `KEEP`. + * + * Generated from protobuf enum IMPORT_OPTION_UNSPECIFIED = 0; + */ + const IMPORT_OPTION_UNSPECIFIED = 0; + /** + * Always respect settings in exported flow content. It may cause a + * import failure if some settings (e.g. custom NLU) are not supported in + * the agent to import into. + * + * Generated from protobuf enum KEEP = 1; + */ + const KEEP = 1; + /** + * Fallback to default settings if some settings are not supported in the + * agent to import into. E.g. Standard NLU will be used if custom NLU is + * not available. + * + * Generated from protobuf enum FALLBACK = 2; + */ + const FALLBACK = 2; + + private static $valueToName = [ + self::IMPORT_OPTION_UNSPECIFIED => 'IMPORT_OPTION_UNSPECIFIED', + self::KEEP => 'KEEP', + self::FALLBACK => 'FALLBACK', + ]; + + 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(ImportOption::class, \Google\Cloud\Dialogflow\Cx\V3\ImportFlowRequest_ImportOption::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowResponse.php new file mode 100644 index 000000000000..bdc4ed0ce833 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowResponse.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.cx.v3.ImportFlowResponse + */ +class ImportFlowResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the new flow. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string flow = 1 [(.google.api.resource_reference) = { + */ + protected $flow = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $flow + * The unique identifier of the new flow. + * Format: + * `projects//locations//agents//flows/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the new flow. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string flow = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getFlow() + { + return $this->flow; + } + + /** + * The unique identifier of the new flow. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string flow = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setFlow($var) + { + GPBUtil::checkString($var, True); + $this->flow = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsMetadata.php new file mode 100644 index 000000000000..fcc991e68182 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsMetadata.php @@ -0,0 +1,35 @@ +google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + */ +class ImportIntentsMetadata 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\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest.php new file mode 100644 index 000000000000..94fec9e77ad9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest.php @@ -0,0 +1,202 @@ +google.cloud.dialogflow.cx.v3.ImportIntentsRequest + */ +class ImportIntentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to import the intents into. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Merge option for importing intents. If not specified, `REJECT` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption merge_option = 4; + */ + protected $merge_option = 0; + protected $intents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to import the intents into. + * Format: `projects//locations//agents/`. + * @type string $intents_uri + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to import intents from. The format of this URI must be + * `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 \Google\Cloud\Dialogflow\Cx\V3\InlineSource $intents_content + * Uncompressed byte content of intents. + * @type int $merge_option + * Merge option for importing intents. If not specified, `REJECT` is assumed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to import the intents into. + * Format: `projects//locations//agents/`. + * + * 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 import the intents into. + * Format: `projects//locations//agents/`. + * + * 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](https://cloud.google.com/storage/docs/) URI + * to import intents from. The format of this URI must be + * `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 intents_uri = 2; + * @return string + */ + public function getIntentsUri() + { + return $this->readOneof(2); + } + + public function hasIntentsUri() + { + return $this->hasOneof(2); + } + + /** + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to import intents from. The format of this URI must be + * `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 intents_uri = 2; + * @param string $var + * @return $this + */ + public function setIntentsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Uncompressed byte content of intents. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineSource intents_content = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\InlineSource|null + */ + public function getIntentsContent() + { + return $this->readOneof(3); + } + + public function hasIntentsContent() + { + return $this->hasOneof(3); + } + + /** + * Uncompressed byte content of intents. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineSource intents_content = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\InlineSource $var + * @return $this + */ + public function setIntentsContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InlineSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Merge option for importing intents. If not specified, `REJECT` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption merge_option = 4; + * @return int + */ + public function getMergeOption() + { + return $this->merge_option; + } + + /** + * Merge option for importing intents. If not specified, `REJECT` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption merge_option = 4; + * @param int $var + * @return $this + */ + public function setMergeOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsRequest\MergeOption::class); + $this->merge_option = $var; + + return $this; + } + + /** + * @return string + */ + public function getIntents() + { + return $this->whichOneof("intents"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest/MergeOption.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest/MergeOption.php new file mode 100644 index 000000000000..c0929b8ea868 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest/MergeOption.php @@ -0,0 +1,100 @@ +google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption + */ +class MergeOption +{ + /** + * Unspecified. Should not be used. + * + * Generated from protobuf enum MERGE_OPTION_UNSPECIFIED = 0; + */ + const MERGE_OPTION_UNSPECIFIED = 0; + /** + * DEPRECATED: Please use + * [REPORT_CONFLICT][ImportIntentsRequest.REPORT_CONFLICT] instead. + * Fail the request if there are intents whose display names conflict with + * the display names of intents in the agent. + * + * Generated from protobuf enum REJECT = 1 [deprecated = true]; + */ + const REJECT = 1; + /** + * Replace the original intent in the agent with the new intent when display + * name conflicts exist. + * + * Generated from protobuf enum REPLACE = 2; + */ + const REPLACE = 2; + /** + * Merge the original intent with the new intent when display name conflicts + * exist. + * + * Generated from protobuf enum MERGE = 3; + */ + const MERGE = 3; + /** + * Create new intents with new display names to differentiate them from the + * existing intents when display name conflicts exist. + * + * Generated from protobuf enum RENAME = 4; + */ + const RENAME = 4; + /** + * Report conflict information if display names conflict is detected. + * Otherwise, import intents. + * + * Generated from protobuf enum REPORT_CONFLICT = 5; + */ + const REPORT_CONFLICT = 5; + /** + * Keep the original intent and discard the conflicting new intent when + * display name conflicts exist. + * + * Generated from protobuf enum KEEP = 6; + */ + const KEEP = 6; + + private static $valueToName = [ + self::MERGE_OPTION_UNSPECIFIED => 'MERGE_OPTION_UNSPECIFIED', + self::REJECT => 'REJECT', + self::REPLACE => 'REPLACE', + self::MERGE => 'MERGE', + self::RENAME => 'RENAME', + self::REPORT_CONFLICT => 'REPORT_CONFLICT', + self::KEEP => 'KEEP', + ]; + + 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(MergeOption::class, \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsRequest_MergeOption::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse.php new file mode 100644 index 000000000000..0dedb47f4d78 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse.php @@ -0,0 +1,128 @@ +google.cloud.dialogflow.cx.v3.ImportIntentsResponse + */ +class ImportIntentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the imported intents. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field repeated string intents = 1 [(.google.api.resource_reference) = { + */ + private $intents; + /** + * Info which resources have conflicts when + * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is + * set in ImportIntentsRequest. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + */ + protected $conflicting_resources = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $intents + * The unique identifier of the imported intents. + * Format: + * `projects//locations//agents//intents/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse\ConflictingResources $conflicting_resources + * Info which resources have conflicts when + * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is + * set in ImportIntentsRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the imported intents. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field repeated string intents = 1 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntents() + { + return $this->intents; + } + + /** + * The unique identifier of the imported intents. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field repeated string intents = 1 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->intents = $arr; + + return $this; + } + + /** + * Info which resources have conflicts when + * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is + * set in ImportIntentsRequest. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse\ConflictingResources|null + */ + public function getConflictingResources() + { + return $this->conflicting_resources; + } + + public function hasConflictingResources() + { + return isset($this->conflicting_resources); + } + + public function clearConflictingResources() + { + unset($this->conflicting_resources); + } + + /** + * Info which resources have conflicts when + * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is + * set in ImportIntentsRequest. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse\ConflictingResources $var + * @return $this + */ + public function setConflictingResources($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse\ConflictingResources::class); + $this->conflicting_resources = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse/ConflictingResources.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse/ConflictingResources.php new file mode 100644 index 000000000000..84fe1851d9fa --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse/ConflictingResources.php @@ -0,0 +1,106 @@ +google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + */ +class ConflictingResources extends \Google\Protobuf\Internal\Message +{ + /** + * Display names of conflicting intents. + * + * Generated from protobuf field repeated string intent_display_names = 1; + */ + private $intent_display_names; + /** + * Display names of conflicting entities. + * + * Generated from protobuf field repeated string entity_display_names = 2; + */ + private $entity_display_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $intent_display_names + * Display names of conflicting intents. + * @type array|\Google\Protobuf\Internal\RepeatedField $entity_display_names + * Display names of conflicting entities. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Display names of conflicting intents. + * + * Generated from protobuf field repeated string intent_display_names = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntentDisplayNames() + { + return $this->intent_display_names; + } + + /** + * Display names of conflicting intents. + * + * Generated from protobuf field repeated string intent_display_names = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntentDisplayNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->intent_display_names = $arr; + + return $this; + } + + /** + * Display names of conflicting entities. + * + * Generated from protobuf field repeated string entity_display_names = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityDisplayNames() + { + return $this->entity_display_names; + } + + /** + * Display names of conflicting entities. + * + * Generated from protobuf field repeated string entity_display_names = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityDisplayNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->entity_display_names = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConflictingResources::class, \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse_ConflictingResources::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookRequest.php new file mode 100644 index 000000000000..a5b91f4e9fcb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookRequest.php @@ -0,0 +1,201 @@ +google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + */ +class ImportPlaybookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to import the playbook into. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Specifies the import strategy used when resolving resource + * conflicts. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $import_strategy = null; + protected $playbook; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to import the playbook into. + * Format: `projects//locations//agents/`. + * @type string $playbook_uri + * [Dialogflow access + * control] + * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * @type string $playbook_content + * Uncompressed raw byte content for playbook. + * @type \Google\Cloud\Dialogflow\Cx\V3\PlaybookImportStrategy $import_strategy + * Optional. Specifies the import strategy used when resolving resource + * conflicts. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to import the playbook into. + * Format: `projects//locations//agents/`. + * + * 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 import the playbook into. + * Format: `projects//locations//agents/`. + * + * 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; + } + + /** + * [Dialogflow access + * control] + * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * + * Generated from protobuf field string playbook_uri = 2; + * @return string + */ + public function getPlaybookUri() + { + return $this->readOneof(2); + } + + public function hasPlaybookUri() + { + return $this->hasOneof(2); + } + + /** + * [Dialogflow access + * control] + * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * + * Generated from protobuf field string playbook_uri = 2; + * @param string $var + * @return $this + */ + public function setPlaybookUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Uncompressed raw byte content for playbook. + * + * Generated from protobuf field bytes playbook_content = 3; + * @return string + */ + public function getPlaybookContent() + { + return $this->readOneof(3); + } + + public function hasPlaybookContent() + { + return $this->hasOneof(3); + } + + /** + * Uncompressed raw byte content for playbook. + * + * Generated from protobuf field bytes playbook_content = 3; + * @param string $var + * @return $this + */ + public function setPlaybookContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Specifies the import strategy used when resolving resource + * conflicts. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\PlaybookImportStrategy|null + */ + public function getImportStrategy() + { + return $this->import_strategy; + } + + public function hasImportStrategy() + { + return isset($this->import_strategy); + } + + public function clearImportStrategy() + { + unset($this->import_strategy); + } + + /** + * Optional. Specifies the import strategy used when resolving resource + * conflicts. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\PlaybookImportStrategy $var + * @return $this + */ + public function setImportStrategy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PlaybookImportStrategy::class); + $this->import_strategy = $var; + + return $this; + } + + /** + * @return string + */ + public function getPlaybook() + { + return $this->whichOneof("playbook"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse.php new file mode 100644 index 000000000000..f1124654e62b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse.php @@ -0,0 +1,128 @@ +google.cloud.dialogflow.cx.v3.ImportPlaybookResponse + */ +class ImportPlaybookResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the new playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string playbook = 1 [(.google.api.resource_reference) = { + */ + protected $playbook = ''; + /** + * Info which resources have conflicts when + * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy + * is set for all resources in ImportPlaybookRequest. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + */ + protected $conflicting_resources = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $playbook + * The unique identifier of the new playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\ImportPlaybookResponse\ConflictingResources $conflicting_resources + * Info which resources have conflicts when + * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy + * is set for all resources in ImportPlaybookRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the new playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string playbook = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getPlaybook() + { + return $this->playbook; + } + + /** + * The unique identifier of the new playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string playbook = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPlaybook($var) + { + GPBUtil::checkString($var, True); + $this->playbook = $var; + + return $this; + } + + /** + * Info which resources have conflicts when + * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy + * is set for all resources in ImportPlaybookRequest. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\ImportPlaybookResponse\ConflictingResources|null + */ + public function getConflictingResources() + { + return $this->conflicting_resources; + } + + public function hasConflictingResources() + { + return isset($this->conflicting_resources); + } + + public function clearConflictingResources() + { + unset($this->conflicting_resources); + } + + /** + * Info which resources have conflicts when + * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy + * is set for all resources in ImportPlaybookRequest. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\ImportPlaybookResponse\ConflictingResources $var + * @return $this + */ + public function setConflictingResources($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ImportPlaybookResponse\ConflictingResources::class); + $this->conflicting_resources = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse/ConflictingResources.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse/ConflictingResources.php new file mode 100644 index 000000000000..1db61ac62412 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse/ConflictingResources.php @@ -0,0 +1,140 @@ +google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + */ +class ConflictingResources extends \Google\Protobuf\Internal\Message +{ + /** + * Display name of conflicting main playbook. + * + * Generated from protobuf field string main_playbook_display_name = 1; + */ + protected $main_playbook_display_name = ''; + /** + * Display names of conflicting nested playbooks. + * + * Generated from protobuf field repeated string nested_playbook_display_names = 2; + */ + private $nested_playbook_display_names; + /** + * Display names of conflicting tools. + * + * Generated from protobuf field repeated string tool_display_names = 3; + */ + private $tool_display_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $main_playbook_display_name + * Display name of conflicting main playbook. + * @type array|\Google\Protobuf\Internal\RepeatedField $nested_playbook_display_names + * Display names of conflicting nested playbooks. + * @type array|\Google\Protobuf\Internal\RepeatedField $tool_display_names + * Display names of conflicting tools. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Display name of conflicting main playbook. + * + * Generated from protobuf field string main_playbook_display_name = 1; + * @return string + */ + public function getMainPlaybookDisplayName() + { + return $this->main_playbook_display_name; + } + + /** + * Display name of conflicting main playbook. + * + * Generated from protobuf field string main_playbook_display_name = 1; + * @param string $var + * @return $this + */ + public function setMainPlaybookDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->main_playbook_display_name = $var; + + return $this; + } + + /** + * Display names of conflicting nested playbooks. + * + * Generated from protobuf field repeated string nested_playbook_display_names = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNestedPlaybookDisplayNames() + { + return $this->nested_playbook_display_names; + } + + /** + * Display names of conflicting nested playbooks. + * + * Generated from protobuf field repeated string nested_playbook_display_names = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNestedPlaybookDisplayNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->nested_playbook_display_names = $arr; + + return $this; + } + + /** + * Display names of conflicting tools. + * + * Generated from protobuf field repeated string tool_display_names = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getToolDisplayNames() + { + return $this->tool_display_names; + } + + /** + * Display names of conflicting tools. + * + * Generated from protobuf field repeated string tool_display_names = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setToolDisplayNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tool_display_names = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConflictingResources::class, \Google\Cloud\Dialogflow\Cx\V3\ImportPlaybookResponse_ConflictingResources::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php new file mode 100644 index 000000000000..d14d8f01de64 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php @@ -0,0 +1,87 @@ +google.cloud.dialogflow.cx.v3.ImportStrategy + */ +class ImportStrategy +{ + /** + * Unspecified. Treated as 'CREATE_NEW'. + * + * Generated from protobuf enum IMPORT_STRATEGY_UNSPECIFIED = 0; + */ + const IMPORT_STRATEGY_UNSPECIFIED = 0; + /** + * Create a new resource with a numeric suffix appended to the end of the + * existing display name. + * + * Generated from protobuf enum IMPORT_STRATEGY_CREATE_NEW = 1; + */ + const IMPORT_STRATEGY_CREATE_NEW = 1; + /** + * Replace existing resource with incoming resource in the content to be + * imported. + * + * Generated from protobuf enum IMPORT_STRATEGY_REPLACE = 2; + */ + const IMPORT_STRATEGY_REPLACE = 2; + /** + * Keep existing resource and discard incoming resource in the content to be + * imported. + * + * Generated from protobuf enum IMPORT_STRATEGY_KEEP = 3; + */ + const IMPORT_STRATEGY_KEEP = 3; + /** + * Combine existing and incoming resources when a conflict is encountered. + * + * Generated from protobuf enum IMPORT_STRATEGY_MERGE = 4; + */ + const IMPORT_STRATEGY_MERGE = 4; + /** + * Throw error if a conflict is encountered. + * + * Generated from protobuf enum IMPORT_STRATEGY_THROW_ERROR = 5; + */ + const IMPORT_STRATEGY_THROW_ERROR = 5; + + private static $valueToName = [ + self::IMPORT_STRATEGY_UNSPECIFIED => 'IMPORT_STRATEGY_UNSPECIFIED', + self::IMPORT_STRATEGY_CREATE_NEW => 'IMPORT_STRATEGY_CREATE_NEW', + self::IMPORT_STRATEGY_REPLACE => 'IMPORT_STRATEGY_REPLACE', + self::IMPORT_STRATEGY_KEEP => 'IMPORT_STRATEGY_KEEP', + self::IMPORT_STRATEGY_MERGE => 'IMPORT_STRATEGY_MERGE', + self::IMPORT_STRATEGY_THROW_ERROR => 'IMPORT_STRATEGY_THROW_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); + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesMetadata.php new file mode 100644 index 000000000000..5266a067f3d7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesMetadata.php @@ -0,0 +1,69 @@ +google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + */ +class ImportTestCasesMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Errors for failed test cases. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestCaseError>|\Google\Protobuf\Internal\RepeatedField $errors + * Errors for failed test cases. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Errors for failed test cases. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Errors for failed test cases. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestCaseError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestCaseError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesRequest.php new file mode 100644 index 000000000000..5d14d6f7a6bd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesRequest.php @@ -0,0 +1,168 @@ +google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + */ +class ImportTestCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to import test cases to. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to import test cases to. + * Format: `projects//locations//agents/`. + * @type string $gcs_uri + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to import test cases from. The format of this URI must be + * `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 $content + * Uncompressed raw byte content for test cases. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to import test cases to. + * Format: `projects//locations//agents/`. + * + * 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 import test cases to. + * Format: `projects//locations//agents/`. + * + * 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](https://cloud.google.com/storage/docs/) URI + * to import test cases from. The format of this URI must be + * `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 gcs_uri = 2; + * @return string + */ + public function getGcsUri() + { + return $this->readOneof(2); + } + + public function hasGcsUri() + { + return $this->hasOneof(2); + } + + /** + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to import test cases from. The format of this URI must be + * `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 gcs_uri = 2; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Uncompressed raw byte content for test cases. + * + * Generated from protobuf field bytes content = 3; + * @return string + */ + public function getContent() + { + return $this->readOneof(3); + } + + public function hasContent() + { + return $this->hasOneof(3); + } + + /** + * Uncompressed raw byte content for test cases. + * + * Generated from protobuf field bytes content = 3; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesResponse.php new file mode 100644 index 000000000000..b0bc9ef0ac80 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesResponse.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + */ +class ImportTestCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifiers of the new test cases. + * Format: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field repeated string names = 1 [(.google.api.resource_reference) = { + */ + private $names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * The unique identifiers of the new test cases. + * Format: + * `projects//locations//agents//testCases/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifiers of the new test cases. + * Format: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field repeated string names = 1 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * The unique identifiers of the new test cases. + * Format: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field repeated string names = 1 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineDestination.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineDestination.php new file mode 100644 index 000000000000..7934fa39203a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineDestination.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.cx.v3.InlineDestination + */ +class InlineDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The uncompressed byte content for the objects. + * Only populated in responses. + * + * Generated from protobuf field bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * Output only. The uncompressed byte content for the objects. + * Only populated in responses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Inline::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The uncompressed byte content for the objects. + * Only populated in responses. + * + * Generated from protobuf field bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Output only. The uncompressed byte content for the objects. + * Only populated in responses. + * + * Generated from protobuf field bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSchema.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSchema.php new file mode 100644 index 000000000000..a8e4f32b3c9c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSchema.php @@ -0,0 +1,111 @@ +google.cloud.dialogflow.cx.v3.InlineSchema + */ +class InlineSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Data type of the schema. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataType type = 1; + */ + protected $type = 0; + /** + * Schema of the elements if this is an ARRAY type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + */ + protected $items = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Data type of the schema. + * @type \Google\Cloud\Dialogflow\Cx\V3\TypeSchema $items + * Schema of the elements if this is an ARRAY type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::initOnce(); + parent::__construct($data); + } + + /** + * Data type of the schema. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Data type of the schema. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataType::class); + $this->type = $var; + + return $this; + } + + /** + * Schema of the elements if this is an ARRAY type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\TypeSchema|null + */ + public function getItems() + { + return $this->items; + } + + public function hasItems() + { + return isset($this->items); + } + + public function clearItems() + { + unset($this->items); + } + + /** + * Schema of the elements if this is an ARRAY type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\TypeSchema $var + * @return $this + */ + public function setItems($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TypeSchema::class); + $this->items = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSource.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSource.php new file mode 100644 index 000000000000..b79064b06e18 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSource.php @@ -0,0 +1,68 @@ +google.cloud.dialogflow.cx.v3.InlineSource + */ +class InlineSource extends \Google\Protobuf\Internal\Message +{ + /** + * The uncompressed byte content for the objects. + * + * Generated from protobuf field bytes content = 1; + */ + protected $content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * The uncompressed byte content for the objects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Inline::initOnce(); + parent::__construct($data); + } + + /** + * The uncompressed byte content for the objects. + * + * Generated from protobuf field bytes content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * The uncompressed byte content for the objects. + * + * Generated from protobuf field bytes content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InputAudioConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InputAudioConfig.php new file mode 100644 index 000000000000..9862e0ebad1c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InputAudioConfig.php @@ -0,0 +1,457 @@ +google.cloud.dialogflow.cx.v3.InputAudioConfig + */ +class InputAudioConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Audio encoding of the audio content to process. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $audio_encoding = 0; + /** + * 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; + /** + * Optional. If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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; + /** + * Optional. 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. + * + * Generated from protobuf field repeated string phrase_hints = 4; + */ + private $phrase_hints; + /** + * Optional. Which Speech model to select for the given request. + * For more information, see + * [Speech + * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). + * + * Generated from protobuf field string model = 7; + */ + protected $model = ''; + /** + * Optional. Which variant of the [Speech + * model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechModelVariant model_variant = 10; + */ + protected $model_variant = 0; + /** + * Optional. 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. + * + * Generated from protobuf field bool single_utterance = 8; + */ + protected $single_utterance = false; + /** + * Configuration of barge-in behavior during the streaming of input audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + */ + protected $barge_in_config = null; + /** + * If `true`, the request will opt out for STT conformer model migration. + * This field will be deprecated once force migration takes place in June + * 2024. Please refer to [Dialogflow CX Speech model + * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration). + * + * Generated from protobuf field bool opt_out_conformer_model_migration = 26; + */ + protected $opt_out_conformer_model_migration = 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 + * 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 bool $enable_word_info + * Optional. If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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 + * Optional. 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. + * @type string $model + * Optional. Which Speech model to select for the given request. + * For more information, see + * [Speech + * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). + * @type int $model_variant + * Optional. Which variant of the [Speech + * model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. + * @type bool $single_utterance + * Optional. 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. + * @type \Google\Cloud\Dialogflow\Cx\V3\BargeInConfig $barge_in_config + * Configuration of barge-in behavior during the streaming of input audio. + * @type bool $opt_out_conformer_model_migration + * If `true`, the request will opt out for STT conformer model migration. + * This field will be deprecated once force migration takes place in June + * 2024. Please refer to [Dialogflow CX Speech model + * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Audio encoding of the audio content to process. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @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.cx.v3.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAudioEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\AudioEncoding::class); + $this->audio_encoding = $var; + + return $this; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * Optional. If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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; + } + + /** + * Optional. If `true`, Dialogflow returns + * [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in + * [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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; + } + + /** + * Optional. 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. + * + * Generated from protobuf field repeated string phrase_hints = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPhraseHints() + { + return $this->phrase_hints; + } + + /** + * Optional. 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. + * + * Generated from protobuf field repeated string phrase_hints = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPhraseHints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->phrase_hints = $arr; + + return $this; + } + + /** + * Optional. Which Speech model to select for the given request. + * For more information, see + * [Speech + * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). + * + * Generated from protobuf field string model = 7; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Optional. Which Speech model to select for the given request. + * For more information, see + * [Speech + * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). + * + * 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; + } + + /** + * Optional. Which variant of the [Speech + * model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechModelVariant model_variant = 10; + * @return int + */ + public function getModelVariant() + { + return $this->model_variant; + } + + /** + * Optional. Which variant of the [Speech + * model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechModelVariant model_variant = 10; + * @param int $var + * @return $this + */ + public function setModelVariant($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SpeechModelVariant::class); + $this->model_variant = $var; + + return $this; + } + + /** + * Optional. 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. + * + * Generated from protobuf field bool single_utterance = 8; + * @return bool + */ + public function getSingleUtterance() + { + return $this->single_utterance; + } + + /** + * Optional. 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. + * + * 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; + } + + /** + * Configuration of barge-in behavior during the streaming of input audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + * @return \Google\Cloud\Dialogflow\Cx\V3\BargeInConfig|null + */ + public function getBargeInConfig() + { + return $this->barge_in_config; + } + + public function hasBargeInConfig() + { + return isset($this->barge_in_config); + } + + public function clearBargeInConfig() + { + unset($this->barge_in_config); + } + + /** + * Configuration of barge-in behavior during the streaming of input audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; + * @param \Google\Cloud\Dialogflow\Cx\V3\BargeInConfig $var + * @return $this + */ + public function setBargeInConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\BargeInConfig::class); + $this->barge_in_config = $var; + + return $this; + } + + /** + * If `true`, the request will opt out for STT conformer model migration. + * This field will be deprecated once force migration takes place in June + * 2024. Please refer to [Dialogflow CX Speech model + * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration). + * + * Generated from protobuf field bool opt_out_conformer_model_migration = 26; + * @return bool + */ + public function getOptOutConformerModelMigration() + { + return $this->opt_out_conformer_model_migration; + } + + /** + * If `true`, the request will opt out for STT conformer model migration. + * This field will be deprecated once force migration takes place in June + * 2024. Please refer to [Dialogflow CX Speech model + * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration). + * + * Generated from protobuf field bool opt_out_conformer_model_migration = 26; + * @param bool $var + * @return $this + */ + public function setOptOutConformerModelMigration($var) + { + GPBUtil::checkBool($var); + $this->opt_out_conformer_model_migration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent.php new file mode 100644 index 000000000000..5f4fe761130e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent.php @@ -0,0 +1,428 @@ +google.cloud.dialogflow.cx.v3.Intent + */ +class Intent extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the intent. + * Required for the + * [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] + * method. + * [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] + * populates the name automatically. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the intent, unique within the agent. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * The collection of training phrases the agent is trained on to identify the + * intent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3; + */ + private $training_phrases; + /** + * The collection of parameters associated with the intent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4; + */ + private $parameters; + /** + * 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 = 5; + */ + protected $priority = 0; + /** + * Indicates whether this is a fallback intent. Currently only default + * fallback intent is allowed in the agent, which is added upon agent + * creation. + * Adding training phrases to fallback intent is useful in the case of + * requests that are mistakenly matched, since training phrases assigned to + * fallback intents act as negative examples that triggers no-match event. + * + * Generated from protobuf field bool is_fallback = 6; + */ + protected $is_fallback = false; + /** + * The key/value metadata to label an intent. Labels can contain + * lowercase letters, digits and the symbols '-' and '_'. International + * characters are allowed, including letters from unicase alphabets. Keys must + * start with a letter. Keys and values can be no longer than 63 characters + * and no more than 128 bytes. + * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed + * Dialogflow defined labels include: + * * sys-head + * * sys-contextual + * The above labels do not require value. "sys-head" means the intent is a + * head intent. "sys.contextual" means the intent is a contextual intent. + * + * Generated from protobuf field map labels = 7; + */ + private $labels; + /** + * Human readable description for better understanding an intent like its + * scope, content, result etc. Maximum character limit: 140 characters. + * + * Generated from protobuf field string description = 8; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the intent. + * Required for the + * [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] + * method. + * [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] + * populates the name automatically. + * Format: + * `projects//locations//agents//intents/`. + * @type string $display_name + * Required. The human-readable name of the intent, unique within the agent. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Intent\TrainingPhrase>|\Google\Protobuf\Internal\RepeatedField $training_phrases + * The collection of training phrases the agent is trained on to identify the + * intent. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Intent\Parameter>|\Google\Protobuf\Internal\RepeatedField $parameters + * The collection of parameters associated with the intent. + * @type int $priority + * 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 + * Indicates whether this is a fallback intent. Currently only default + * fallback intent is allowed in the agent, which is added upon agent + * creation. + * Adding training phrases to fallback intent is useful in the case of + * requests that are mistakenly matched, since training phrases assigned to + * fallback intents act as negative examples that triggers no-match event. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The key/value metadata to label an intent. Labels can contain + * lowercase letters, digits and the symbols '-' and '_'. International + * characters are allowed, including letters from unicase alphabets. Keys must + * start with a letter. Keys and values can be no longer than 63 characters + * and no more than 128 bytes. + * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed + * Dialogflow defined labels include: + * * sys-head + * * sys-contextual + * The above labels do not require value. "sys-head" means the intent is a + * head intent. "sys.contextual" means the intent is a contextual intent. + * @type string $description + * Human readable description for better understanding an intent like its + * scope, content, result etc. Maximum character limit: 140 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the intent. + * Required for the + * [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] + * method. + * [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] + * populates the name automatically. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the intent. + * Required for the + * [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] + * method. + * [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] + * populates the name automatically. + * Format: + * `projects//locations//agents//intents/`. + * + * 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 human-readable name of the intent, unique within the 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 human-readable name of the intent, unique within the 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; + } + + /** + * The collection of training phrases the agent is trained on to identify the + * intent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrainingPhrases() + { + return $this->training_phrases; + } + + /** + * The collection of training phrases the agent is trained on to identify the + * intent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\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\Cx\V3\Intent\TrainingPhrase::class); + $this->training_phrases = $arr; + + return $this; + } + + /** + * The collection of parameters associated with the intent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * The collection of parameters associated with the intent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\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\Cx\V3\Intent\Parameter::class); + $this->parameters = $arr; + + return $this; + } + + /** + * 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 = 5; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * 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 = 5; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt32($var); + $this->priority = $var; + + return $this; + } + + /** + * Indicates whether this is a fallback intent. Currently only default + * fallback intent is allowed in the agent, which is added upon agent + * creation. + * Adding training phrases to fallback intent is useful in the case of + * requests that are mistakenly matched, since training phrases assigned to + * fallback intents act as negative examples that triggers no-match event. + * + * Generated from protobuf field bool is_fallback = 6; + * @return bool + */ + public function getIsFallback() + { + return $this->is_fallback; + } + + /** + * Indicates whether this is a fallback intent. Currently only default + * fallback intent is allowed in the agent, which is added upon agent + * creation. + * Adding training phrases to fallback intent is useful in the case of + * requests that are mistakenly matched, since training phrases assigned to + * fallback intents act as negative examples that triggers no-match event. + * + * Generated from protobuf field bool is_fallback = 6; + * @param bool $var + * @return $this + */ + public function setIsFallback($var) + { + GPBUtil::checkBool($var); + $this->is_fallback = $var; + + return $this; + } + + /** + * The key/value metadata to label an intent. Labels can contain + * lowercase letters, digits and the symbols '-' and '_'. International + * characters are allowed, including letters from unicase alphabets. Keys must + * start with a letter. Keys and values can be no longer than 63 characters + * and no more than 128 bytes. + * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed + * Dialogflow defined labels include: + * * sys-head + * * sys-contextual + * The above labels do not require value. "sys-head" means the intent is a + * head intent. "sys.contextual" means the intent is a contextual intent. + * + * Generated from protobuf field map labels = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The key/value metadata to label an intent. Labels can contain + * lowercase letters, digits and the symbols '-' and '_'. International + * characters are allowed, including letters from unicase alphabets. Keys must + * start with a letter. Keys and values can be no longer than 63 characters + * and no more than 128 bytes. + * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed + * Dialogflow defined labels include: + * * sys-head + * * sys-contextual + * The above labels do not require value. "sys-head" means the intent is a + * head intent. "sys.contextual" means the intent is a contextual intent. + * + * Generated from protobuf field map labels = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Human readable description for better understanding an intent like its + * scope, content, result etc. Maximum character limit: 140 characters. + * + * Generated from protobuf field string description = 8; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Human readable description for better understanding an intent like its + * scope, content, result etc. Maximum character limit: 140 characters. + * + * Generated from protobuf field string description = 8; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/Parameter.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/Parameter.php new file mode 100644 index 000000000000..ac2996559b91 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/Parameter.php @@ -0,0 +1,228 @@ +google.cloud.dialogflow.cx.v3.Intent.Parameter + */ +class Parameter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of the parameter. This field + * is used by [training + * phrases][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase] to annotate + * their [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part]. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * Required. The entity type of the parameter. + * Format: + * `projects/-/locations/-/agents/-/entityTypes/` for + * system entity types (for example, + * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or + * `projects//locations//agents//entityTypes/` + * for developer entity types. + * + * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $entity_type = ''; + /** + * Indicates whether the parameter represents a list of values. + * + * Generated from protobuf field bool is_list = 3; + */ + protected $is_list = false; + /** + * Indicates whether the parameter content should be redacted in log. If + * redaction is enabled, the parameter content will be replaced by parameter + * name during logging. + * Note: the parameter content is subject to redaction if either parameter + * level redaction or [entity type level + * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. + * + * Generated from protobuf field bool redact = 4; + */ + protected $redact = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. The unique identifier of the parameter. This field + * is used by [training + * phrases][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase] to annotate + * their [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part]. + * @type string $entity_type + * Required. The entity type of the parameter. + * Format: + * `projects/-/locations/-/agents/-/entityTypes/` for + * system entity types (for example, + * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or + * `projects//locations//agents//entityTypes/` + * for developer entity types. + * @type bool $is_list + * Indicates whether the parameter represents a list of values. + * @type bool $redact + * Indicates whether the parameter content should be redacted in log. If + * redaction is enabled, the parameter content will be replaced by parameter + * name during logging. + * Note: the parameter content is subject to redaction if either parameter + * level redaction or [entity type level + * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of the parameter. This field + * is used by [training + * phrases][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase] to annotate + * their [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part]. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. The unique identifier of the parameter. This field + * is used by [training + * phrases][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase] to annotate + * their [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part]. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Required. The entity type of the parameter. + * Format: + * `projects/-/locations/-/agents/-/entityTypes/` for + * system entity types (for example, + * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or + * `projects//locations//agents//entityTypes/` + * for developer entity types. + * + * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEntityType() + { + return $this->entity_type; + } + + /** + * Required. The entity type of the parameter. + * Format: + * `projects/-/locations/-/agents/-/entityTypes/` for + * system entity types (for example, + * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or + * `projects//locations//agents//entityTypes/` + * for developer entity types. + * + * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkString($var, True); + $this->entity_type = $var; + + return $this; + } + + /** + * Indicates whether the parameter represents a list of values. + * + * Generated from protobuf field bool is_list = 3; + * @return bool + */ + public function getIsList() + { + return $this->is_list; + } + + /** + * Indicates whether the parameter represents a list of values. + * + * Generated from protobuf field bool is_list = 3; + * @param bool $var + * @return $this + */ + public function setIsList($var) + { + GPBUtil::checkBool($var); + $this->is_list = $var; + + return $this; + } + + /** + * Indicates whether the parameter content should be redacted in log. If + * redaction is enabled, the parameter content will be replaced by parameter + * name during logging. + * Note: the parameter content is subject to redaction if either parameter + * level redaction or [entity type level + * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. + * + * Generated from protobuf field bool redact = 4; + * @return bool + */ + public function getRedact() + { + return $this->redact; + } + + /** + * Indicates whether the parameter content should be redacted in log. If + * redaction is enabled, the parameter content will be replaced by parameter + * name during logging. + * Note: the parameter content is subject to redaction if either parameter + * level redaction or [entity type level + * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. + * + * Generated from protobuf field bool redact = 4; + * @param bool $var + * @return $this + */ + public function setRedact($var) + { + GPBUtil::checkBool($var); + $this->redact = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Parameter::class, \Google\Cloud\Dialogflow\Cx\V3\Intent_Parameter::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase.php new file mode 100644 index 000000000000..b33a5dfda837 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase.php @@ -0,0 +1,194 @@ +google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + */ +class TrainingPhrase extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique identifier of the training phrase. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = ''; + /** + * 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.cx.v3.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 `parameter_id` field is set. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $parts; + /** + * Indicates how many times this example was added to the intent. + * + * Generated from protobuf field int32 repeat_count = 3; + */ + protected $repeat_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Output only. The unique identifier of the training phrase. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.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 `parameter_id` field is set. + * @type int $repeat_count + * Indicates how many times this example was added to the intent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique identifier of the training phrase. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. The unique identifier of the training phrase. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $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.cx.v3.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 `parameter_id` field is set. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part parts = 2 [(.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.cx.v3.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 `parameter_id` field is set. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\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\Cx\V3\Intent\TrainingPhrase\Part::class); + $this->parts = $arr; + + return $this; + } + + /** + * Indicates how many times this example was added to the intent. + * + * Generated from protobuf field int32 repeat_count = 3; + * @return int + */ + public function getRepeatCount() + { + return $this->repeat_count; + } + + /** + * Indicates how many times this example was added to the intent. + * + * Generated from protobuf field int32 repeat_count = 3; + * @param int $var + * @return $this + */ + public function setRepeatCount($var) + { + GPBUtil::checkInt32($var); + $this->repeat_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TrainingPhrase::class, \Google\Cloud\Dialogflow\Cx\V3\Intent_TrainingPhrase::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase/Part.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase/Part.php new file mode 100644 index 000000000000..ce8637e3116d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase/Part.php @@ -0,0 +1,112 @@ +google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + */ +class Part extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The text for this part. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $text = ''; + /** + * The [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] used to + * annotate this part of the training phrase. This field is required for + * annotated parts of the training phrase. + * + * Generated from protobuf field string parameter_id = 2; + */ + protected $parameter_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Required. The text for this part. + * @type string $parameter_id + * The [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] used to + * annotate this part of the training phrase. This field is required for + * annotated parts of the training phrase. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The text for this part. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. The text for this part. + * + * 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; + } + + /** + * The [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] used to + * annotate this part of the training phrase. This field is required for + * annotated parts of the training phrase. + * + * Generated from protobuf field string parameter_id = 2; + * @return string + */ + public function getParameterId() + { + return $this->parameter_id; + } + + /** + * The [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] used to + * annotate this part of the training phrase. This field is required for + * annotated parts of the training phrase. + * + * Generated from protobuf field string parameter_id = 2; + * @param string $var + * @return $this + */ + public function setParameterId($var) + { + GPBUtil::checkString($var, True); + $this->parameter_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Part::class, \Google\Cloud\Dialogflow\Cx\V3\Intent_TrainingPhrase_Part::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage.php new file mode 100644 index 000000000000..cb8489e7802a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage.php @@ -0,0 +1,102 @@ +google.cloud.dialogflow.cx.v3.IntentCoverage + */ +class IntentCoverage extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Intents present in the agent + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + */ + private $intents; + /** + * The percent of intents in the agent that are covered. + * + * Generated from protobuf field float coverage_score = 2; + */ + protected $coverage_score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\IntentCoverage\Intent>|\Google\Protobuf\Internal\RepeatedField $intents + * The list of Intents present in the agent + * @type float $coverage_score + * The percent of intents in the agent that are covered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The list of Intents present in the agent + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntents() + { + return $this->intents; + } + + /** + * The list of Intents present in the agent + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\IntentCoverage\Intent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage\Intent::class); + $this->intents = $arr; + + return $this; + } + + /** + * The percent of intents in the agent that are covered. + * + * Generated from protobuf field float coverage_score = 2; + * @return float + */ + public function getCoverageScore() + { + return $this->coverage_score; + } + + /** + * The percent of intents in the agent that are covered. + * + * Generated from protobuf field float coverage_score = 2; + * @param float $var + * @return $this + */ + public function setCoverageScore($var) + { + GPBUtil::checkFloat($var); + $this->coverage_score = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage/Intent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage/Intent.php new file mode 100644 index 000000000000..9c7ad5628022 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage/Intent.php @@ -0,0 +1,108 @@ +google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + */ +class Intent extends \Google\Protobuf\Internal\Message +{ + /** + * The intent full resource name + * + * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { + */ + protected $intent = ''; + /** + * Whether the intent is covered by at least one of the agent's + * test cases. + * + * Generated from protobuf field bool covered = 2; + */ + protected $covered = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $intent + * The intent full resource name + * @type bool $covered + * Whether the intent is covered by at least one of the agent's + * test cases. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The intent full resource name + * + * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getIntent() + { + return $this->intent; + } + + /** + * The intent full resource name + * + * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIntent($var) + { + GPBUtil::checkString($var, True); + $this->intent = $var; + + return $this; + } + + /** + * Whether the intent is covered by at least one of the agent's + * test cases. + * + * Generated from protobuf field bool covered = 2; + * @return bool + */ + public function getCovered() + { + return $this->covered; + } + + /** + * Whether the intent is covered by at least one of the agent's + * test cases. + * + * Generated from protobuf field bool covered = 2; + * @param bool $var + * @return $this + */ + public function setCovered($var) + { + GPBUtil::checkBool($var); + $this->covered = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Intent::class, \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage_Intent::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentInput.php new file mode 100644 index 000000000000..9f8ca905c9a9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentInput.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.cx.v3.IntentInput + */ +class IntentInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of the intent. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string intent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $intent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $intent + * Required. The unique identifier of the intent. + * Format: + * `projects//locations//agents//intents/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of the intent. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string intent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getIntent() + { + return $this->intent; + } + + /** + * Required. The unique identifier of the intent. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string intent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIntent($var) + { + GPBUtil::checkString($var, True); + $this->intent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentView.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentView.php new file mode 100644 index 000000000000..371193419657 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentView.php @@ -0,0 +1,63 @@ +google.cloud.dialogflow.cx.v3.IntentView + */ +class IntentView +{ + /** + * Not specified. Treated as INTENT_VIEW_FULL. + * + * Generated from protobuf enum INTENT_VIEW_UNSPECIFIED = 0; + */ + const INTENT_VIEW_UNSPECIFIED = 0; + /** + * Training phrases field is not populated in the response. + * + * Generated from protobuf enum INTENT_VIEW_PARTIAL = 1; + */ + const INTENT_VIEW_PARTIAL = 1; + /** + * All fields are populated. + * + * Generated from protobuf enum INTENT_VIEW_FULL = 2; + */ + const INTENT_VIEW_FULL = 2; + + private static $valueToName = [ + self::INTENT_VIEW_UNSPECIFIED => 'INTENT_VIEW_UNSPECIFIED', + self::INTENT_VIEW_PARTIAL => 'INTENT_VIEW_PARTIAL', + 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/KnowledgeConnectorSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/KnowledgeConnectorSettings.php new file mode 100644 index 000000000000..dab6fef5b467 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/KnowledgeConnectorSettings.php @@ -0,0 +1,254 @@ +google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings + */ +class KnowledgeConnectorSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Whether Knowledge Connector is enabled or not. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + /** + * The fulfillment to be triggered. + * When the answers from the Knowledge Connector are selected by Dialogflow, + * you can utitlize the request scoped parameter `$request.knowledge.answers` + * (contains up to the 5 highest confidence answers) and + * `$request.knowledge.questions` (contains the corresponding questions) to + * construct the fulfillment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + protected $trigger_fulfillment = null; + /** + * Optional. List of related data store connections. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $data_store_connections; + protected $target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Whether Knowledge Connector is enabled or not. + * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $trigger_fulfillment + * The fulfillment to be triggered. + * When the answers from the Knowledge Connector are selected by Dialogflow, + * you can utitlize the request scoped parameter `$request.knowledge.answers` + * (contains up to the 5 highest confidence answers) and + * `$request.knowledge.questions` (contains the corresponding questions) to + * construct the fulfillment. + * @type string $target_page + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * @type string $target_flow + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection>|\Google\Protobuf\Internal\RepeatedField $data_store_connections + * Optional. List of related data store connections. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Whether Knowledge Connector is enabled or not. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Whether Knowledge Connector is enabled or not. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * The fulfillment to be triggered. + * When the answers from the Knowledge Connector are selected by Dialogflow, + * you can utitlize the request scoped parameter `$request.knowledge.answers` + * (contains up to the 5 highest confidence answers) and + * `$request.knowledge.questions` (contains the corresponding questions) to + * construct the fulfillment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment|null + */ + public function getTriggerFulfillment() + { + return $this->trigger_fulfillment; + } + + public function hasTriggerFulfillment() + { + return isset($this->trigger_fulfillment); + } + + public function clearTriggerFulfillment() + { + unset($this->trigger_fulfillment); + } + + /** + * The fulfillment to be triggered. + * When the answers from the Knowledge Connector are selected by Dialogflow, + * you can utitlize the request scoped parameter `$request.knowledge.answers` + * (contains up to the 5 highest confidence answers) and + * `$request.knowledge.questions` (contains the corresponding questions) to + * construct the fulfillment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var + * @return $this + */ + public function setTriggerFulfillment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); + $this->trigger_fulfillment = $var; + + return $this; + } + + /** + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string target_page = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetPage() + { + return $this->readOneof(4); + } + + public function hasTargetPage() + { + return $this->hasOneof(4); + } + + /** + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string target_page = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetPage($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string target_flow = 5 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetFlow() + { + return $this->readOneof(5); + } + + public function hasTargetFlow() + { + return $this->hasOneof(5); + } + + /** + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string target_flow = 5 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetFlow($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. List of related data store connections. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataStoreConnections() + { + return $this->data_store_connections; + } + + /** + * Optional. List of related data store connections. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataStoreConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::class); + $this->data_store_connections = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LanguageInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LanguageInfo.php new file mode 100644 index 000000000000..94a80769bbf3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LanguageInfo.php @@ -0,0 +1,143 @@ +google.cloud.dialogflow.cx.v3.LanguageInfo + */ +class LanguageInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The language code specified in the original + * [request][google.cloud.dialogflow.cx.v3.QueryInput.language_code]. + * + * Generated from protobuf field string input_language_code = 1; + */ + protected $input_language_code = ''; + /** + * The language code detected for this request based on the user + * conversation. + * + * Generated from protobuf field string resolved_language_code = 2; + */ + protected $resolved_language_code = ''; + /** + * The confidence score of the detected language between 0 and 1. + * + * Generated from protobuf field float confidence_score = 3; + */ + protected $confidence_score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_language_code + * The language code specified in the original + * [request][google.cloud.dialogflow.cx.v3.QueryInput.language_code]. + * @type string $resolved_language_code + * The language code detected for this request based on the user + * conversation. + * @type float $confidence_score + * The confidence score of the detected language between 0 and 1. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * The language code specified in the original + * [request][google.cloud.dialogflow.cx.v3.QueryInput.language_code]. + * + * Generated from protobuf field string input_language_code = 1; + * @return string + */ + public function getInputLanguageCode() + { + return $this->input_language_code; + } + + /** + * The language code specified in the original + * [request][google.cloud.dialogflow.cx.v3.QueryInput.language_code]. + * + * Generated from protobuf field string input_language_code = 1; + * @param string $var + * @return $this + */ + public function setInputLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->input_language_code = $var; + + return $this; + } + + /** + * The language code detected for this request based on the user + * conversation. + * + * Generated from protobuf field string resolved_language_code = 2; + * @return string + */ + public function getResolvedLanguageCode() + { + return $this->resolved_language_code; + } + + /** + * The language code detected for this request based on the user + * conversation. + * + * Generated from protobuf field string resolved_language_code = 2; + * @param string $var + * @return $this + */ + public function setResolvedLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->resolved_language_code = $var; + + return $this; + } + + /** + * The confidence score of the detected language between 0 and 1. + * + * Generated from protobuf field float confidence_score = 3; + * @return float + */ + public function getConfidenceScore() + { + return $this->confidence_score; + } + + /** + * The confidence score of the detected language between 0 and 1. + * + * Generated from protobuf field float confidence_score = 3; + * @param float $var + * @return $this + */ + public function setConfidenceScore($var) + { + GPBUtil::checkFloat($var); + $this->confidence_score = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsRequest.php new file mode 100644 index 000000000000..e6845b2b4c93 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsRequest.php @@ -0,0 +1,159 @@ +google.cloud.dialogflow.cx.v3.ListAgentsRequest + */ +class ListAgentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location to list all agents 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 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 = ''; + + /** + * @param string $parent Required. The location to list all agents for. + * Format: `projects//locations/`. Please see + * {@see AgentsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListAgentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location to list all agents for. + * 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\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location to list all agents 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 location to list all agents 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 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsResponse.php new file mode 100644 index 000000000000..6110935c92d1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListAgentsResponse + */ +class ListAgentsResponse 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.cx.v3.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\Cx\V3\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\Cx\V3\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.cx.v3.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.cx.v3.Agent agents = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Agent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAgents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsRequest.php new file mode 100644 index 000000000000..0bd5b7e00f46 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsRequest.php @@ -0,0 +1,269 @@ +google.cloud.dialogflow.cx.v3.ListChangelogsRequest + */ +class ListChangelogsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent containing the changelogs. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The filter string. Supports filter by user_email, resource, type and + * create_time. Some examples: + * 1. By user email: + * user_email = "someone@google.com" + * 2. By resource name: + * resource = "projects/123/locations/global/agents/456/flows/789" + * 3. By resource display name: + * display_name = "my agent" + * 4. By action: + * action = "Create" + * 5. By type: + * type = "flows" + * 6. By create time. Currently predicates on `create_time` and + * `create_time_epoch_seconds` are supported: + * create_time_epoch_seconds > 1551790877 AND create_time <= + * 2017-01-15T01:30:15.01Z + * 7. Combination of above filters: + * resource = "projects/123/locations/global/agents/456/flows/789" + * AND user_email = "someone@google.com" + * AND create_time <= 2017-01-15T01:30:15.01Z + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * 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; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The agent containing the changelogs. + * Format: `projects//locations//agents/`. Please see + * {@see ChangelogsClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListChangelogsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent containing the changelogs. + * Format: `projects//locations//agents/`. + * @type string $filter + * The filter string. Supports filter by user_email, resource, type and + * create_time. Some examples: + * 1. By user email: + * user_email = "someone@google.com" + * 2. By resource name: + * resource = "projects/123/locations/global/agents/456/flows/789" + * 3. By resource display name: + * display_name = "my agent" + * 4. By action: + * action = "Create" + * 5. By type: + * type = "flows" + * 6. By create time. Currently predicates on `create_time` and + * `create_time_epoch_seconds` are supported: + * create_time_epoch_seconds > 1551790877 AND create_time <= + * 2017-01-15T01:30:15.01Z + * 7. Combination of above filters: + * resource = "projects/123/locations/global/agents/456/flows/789" + * AND user_email = "someone@google.com" + * AND create_time <= 2017-01-15T01:30:15.01Z + * @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\Cx\V3\Changelog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent containing the changelogs. + * Format: `projects//locations//agents/`. + * + * 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 containing the changelogs. + * Format: `projects//locations//agents/`. + * + * 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 filter string. Supports filter by user_email, resource, type and + * create_time. Some examples: + * 1. By user email: + * user_email = "someone@google.com" + * 2. By resource name: + * resource = "projects/123/locations/global/agents/456/flows/789" + * 3. By resource display name: + * display_name = "my agent" + * 4. By action: + * action = "Create" + * 5. By type: + * type = "flows" + * 6. By create time. Currently predicates on `create_time` and + * `create_time_epoch_seconds` are supported: + * create_time_epoch_seconds > 1551790877 AND create_time <= + * 2017-01-15T01:30:15.01Z + * 7. Combination of above filters: + * resource = "projects/123/locations/global/agents/456/flows/789" + * AND user_email = "someone@google.com" + * AND create_time <= 2017-01-15T01:30:15.01Z + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter string. Supports filter by user_email, resource, type and + * create_time. Some examples: + * 1. By user email: + * user_email = "someone@google.com" + * 2. By resource name: + * resource = "projects/123/locations/global/agents/456/flows/789" + * 3. By resource display name: + * display_name = "my agent" + * 4. By action: + * action = "Create" + * 5. By type: + * type = "flows" + * 6. By create time. Currently predicates on `create_time` and + * `create_time_epoch_seconds` are supported: + * create_time_epoch_seconds > 1551790877 AND create_time <= + * 2017-01-15T01:30:15.01Z + * 7. Combination of above filters: + * resource = "projects/123/locations/global/agents/456/flows/789" + * AND user_email = "someone@google.com" + * AND create_time <= 2017-01-15T01:30:15.01Z + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * 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; + * @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 = 3; + * @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 = 4; + * @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 = 4; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsResponse.php new file mode 100644 index 000000000000..f108398b3db7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsResponse.php @@ -0,0 +1,114 @@ +google.cloud.dialogflow.cx.v3.ListChangelogsResponse + */ +class ListChangelogsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of changelogs. There will be a maximum number of items returned + * based on the page_size field in the request. The changelogs will be ordered + * by timestamp. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Changelog changelogs = 1; + */ + private $changelogs; + /** + * 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\Cx\V3\Changelog>|\Google\Protobuf\Internal\RepeatedField $changelogs + * The list of changelogs. There will be a maximum number of items returned + * based on the page_size field in the request. The changelogs will be ordered + * by timestamp. + * @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\Cx\V3\Changelog::initOnce(); + parent::__construct($data); + } + + /** + * The list of changelogs. There will be a maximum number of items returned + * based on the page_size field in the request. The changelogs will be ordered + * by timestamp. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Changelog changelogs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChangelogs() + { + return $this->changelogs; + } + + /** + * The list of changelogs. There will be a maximum number of items returned + * based on the page_size field in the request. The changelogs will be ordered + * by timestamp. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Changelog changelogs = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Changelog>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChangelogs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Changelog::class); + $this->changelogs = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsRequest.php new file mode 100644 index 000000000000..e9975dc06884 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsRequest.php @@ -0,0 +1,164 @@ +google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + */ +class ListContinuousTestResultsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The environment to list results for. + * Format: + * `projects//locations//agents//environments/`. + * + * 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 = ''; + + /** + * @param string $parent Required. The environment to list results for. + * Format: + * `projects//locations//agents//environments/`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListContinuousTestResultsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The environment to list results for. + * Format: + * `projects//locations//agents//environments/`. + * @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\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The environment to list results for. + * Format: + * `projects//locations//agents//environments/`. + * + * 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 environment to list results for. + * Format: + * `projects//locations//agents//environments/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsResponse.php new file mode 100644 index 000000000000..71491345e27e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsResponse.php @@ -0,0 +1,105 @@ +google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + */ +class ListContinuousTestResultsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of continuous test results. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_results = 1; + */ + private $continuous_test_results; + /** + * 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\Cx\V3\ContinuousTestResult>|\Google\Protobuf\Internal\RepeatedField $continuous_test_results + * The list of continuous test results. + * @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\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * The list of continuous test results. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContinuousTestResults() + { + return $this->continuous_test_results; + } + + /** + * The list of continuous test results. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_results = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContinuousTestResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult::class); + $this->continuous_test_results = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsRequest.php new file mode 100644 index 000000000000..995e6212de81 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsRequest.php @@ -0,0 +1,164 @@ +google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + */ +class ListDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to + * list all environments for. Format: + * `projects//locations//agents//environments/`. + * + * 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 20 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 = ''; + + /** + * @param string $parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to + * list all environments for. Format: + * `projects//locations//agents//environments/`. Please see + * {@see DeploymentsClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListDeploymentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to + * list all environments for. Format: + * `projects//locations//agents//environments/`. + * @type int $page_size + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @type string $page_token + * The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Deployment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to + * list all environments for. Format: + * `projects//locations//agents//environments/`. + * + * 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 [Environment][google.cloud.dialogflow.cx.v3.Environment] to + * list all environments for. Format: + * `projects//locations//agents//environments/`. + * + * 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 20 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 20 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsResponse.php new file mode 100644 index 000000000000..695c12baf8ed --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsResponse.php @@ -0,0 +1,118 @@ +google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + */ +class ListDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of deployments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Deployment deployments = 1; + */ + private $deployments; + /** + * 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\Cx\V3\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments + * The list of deployments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * @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\Cx\V3\Deployment::initOnce(); + parent::__construct($data); + } + + /** + * The list of deployments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Deployment deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeployments() + { + return $this->deployments; + } + + /** + * The list of deployments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Deployment deployments = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Deployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Deployment::class); + $this->deployments = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesRequest.php new file mode 100644 index 000000000000..39cdd6e90823 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesRequest.php @@ -0,0 +1,229 @@ +google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + */ +class ListEntityTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list all entity types for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The language to list entity types for. The following fields are language + * dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + /** + * 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; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The agent to list all entity types for. + * Format: `projects//locations//agents/`. Please see + * {@see EntityTypesClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListEntityTypesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list all entity types for. + * Format: `projects//locations//agents/`. + * @type string $language_code + * The language to list entity types for. The following fields are language + * dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * are supported. + * Note: languages must be enabled in the agent before they can be used. + * @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\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list all entity types for. + * Format: `projects//locations//agents/`. + * + * 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 for. + * Format: `projects//locations//agents/`. + * + * 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 language to list entity types for. The following fields are language + * dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to list entity types for. The following fields are language + * dependent: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $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 = 3; + * @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 = 3; + * @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 = 4; + * @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 = 4; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesResponse.php new file mode 100644 index 000000000000..4972de35965a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + */ +class ListEntityTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of 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.cx.v3.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\Cx\V3\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types + * The list of 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\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * The list of 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.cx.v3.EntityType entity_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntityTypes() + { + return $this->entity_types; + } + + /** + * The list of 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.cx.v3.EntityType entity_types = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\EntityType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsRequest.php new file mode 100644 index 000000000000..27109ec748e3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsRequest.php @@ -0,0 +1,164 @@ +google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + */ +class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all + * environments for. Format: + * `projects//locations//agents/`. + * + * 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 20 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 = ''; + + /** + * @param string $parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all + * environments for. Format: + * `projects//locations//agents/`. Please see + * {@see EnvironmentsClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListEnvironmentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all + * environments for. Format: + * `projects//locations//agents/`. + * @type int $page_size + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @type string $page_token + * The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all + * environments for. Format: + * `projects//locations//agents/`. + * + * 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][google.cloud.dialogflow.cx.v3.Agent] to list all + * environments for. Format: + * `projects//locations//agents/`. + * + * 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 20 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 20 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsResponse.php new file mode 100644 index 000000000000..76e3427f307c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsResponse.php @@ -0,0 +1,118 @@ +google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + */ +class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of environments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.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\Cx\V3\Environment>|\Google\Protobuf\Internal\RepeatedField $environments + * The list of environments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * @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\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * The list of environments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment environments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnvironments() + { + return $this->environments; + } + + /** + * The list of environments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment environments = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Environment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnvironments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesRequest.php new file mode 100644 index 000000000000..2d993b1fff60 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesRequest.php @@ -0,0 +1,210 @@ +google.cloud.dialogflow.cx.v3.ListExamplesRequest + */ +class ListExamplesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The playbook to list the examples from. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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][ListExampleResponse.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 = ''; + /** + * Optional. The language to list examples for. + * If not specified, list all examples under the playbook. + * Note: languages must be enabled in the agent before they can be used. + * + * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + + /** + * @param string $parent Required. The playbook to list the examples from. + * Format: + * `projects//locations//agents//playbooks/`. Please see + * {@see ExamplesClient::playbookName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListExamplesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The playbook to list the examples from. + * Format: + * `projects//locations//agents//playbooks/`. + * @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][ListExampleResponse.next_page_token] value + * returned from a previous list request. + * @type string $language_code + * Optional. The language to list examples for. + * If not specified, list all examples under the playbook. + * Note: languages must be enabled in the agent before they can be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Example::initOnce(); + parent::__construct($data); + } + + /** + * Required. The playbook to list the examples from. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 playbook to list the examples from. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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][ListExampleResponse.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][ListExampleResponse.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; + } + + /** + * Optional. The language to list examples for. + * If not specified, list all examples under the playbook. + * Note: languages must be enabled in the agent before they can be used. + * + * 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 to list examples for. + * If not specified, list all examples under the playbook. + * Note: languages must be enabled in the agent before they can be used. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesResponse.php new file mode 100644 index 000000000000..07fb955e50bf --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesResponse.php @@ -0,0 +1,118 @@ +google.cloud.dialogflow.cx.v3.ListExamplesResponse + */ +class ListExamplesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of examples. There will be a maximum number of items returned + * based on the + * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size] + * field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + private $examples; + /** + * 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\Cx\V3\Example>|\Google\Protobuf\Internal\RepeatedField $examples + * The list of examples. There will be a maximum number of items returned + * based on the + * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.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\Cx\V3\Example::initOnce(); + parent::__construct($data); + } + + /** + * The list of examples. There will be a maximum number of items returned + * based on the + * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size] + * field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExamples() + { + return $this->examples; + } + + /** + * The list of examples. There will be a maximum number of items returned + * based on the + * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size] + * field in the request. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Example>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExamples($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Example::class); + $this->examples = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsRequest.php new file mode 100644 index 000000000000..546ddb2f7c86 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsRequest.php @@ -0,0 +1,164 @@ +google.cloud.dialogflow.cx.v3.ListExperimentsRequest + */ +class ListExperimentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to + * list all environments for. Format: + * `projects//locations//agents//environments/`. + * + * 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 20 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 = ''; + + /** + * @param string $parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to + * list all environments for. Format: + * `projects//locations//agents//environments/`. Please see + * {@see ExperimentsClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListExperimentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to + * list all environments for. Format: + * `projects//locations//agents//environments/`. + * @type int $page_size + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @type string $page_token + * The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to + * list all environments for. Format: + * `projects//locations//agents//environments/`. + * + * 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 [Environment][google.cloud.dialogflow.cx.v3.Environment] to + * list all environments for. Format: + * `projects//locations//agents//environments/`. + * + * 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 20 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 20 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsResponse.php new file mode 100644 index 000000000000..f5f66d17c29e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsResponse.php @@ -0,0 +1,118 @@ +google.cloud.dialogflow.cx.v3.ListExperimentsResponse + */ +class ListExperimentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of experiments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + */ + private $experiments; + /** + * 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\Cx\V3\Experiment>|\Google\Protobuf\Internal\RepeatedField $experiments + * The list of experiments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * @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\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * The list of experiments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExperiments() + { + return $this->experiments; + } + + /** + * The list of experiments. There will be a maximum number of items + * returned based on the page_size field in the request. The list may in some + * cases be empty or contain fewer entries than page_size even if this isn't + * the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Experiment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExperiments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Experiment::class); + $this->experiments = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsRequest.php new file mode 100644 index 000000000000..cd166946c2a9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsRequest.php @@ -0,0 +1,233 @@ +google.cloud.dialogflow.cx.v3.ListFlowsRequest + */ +class ListFlowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent containing the flows. + * Format: `projects//locations//agents/`. + * + * 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 = ''; + /** + * The language to list flows for. The following fields are language + * dependent: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 4; + */ + protected $language_code = ''; + + /** + * @param string $parent Required. The agent containing the flows. + * Format: `projects//locations//agents/`. Please see + * {@see FlowsClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListFlowsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent containing the flows. + * Format: `projects//locations//agents/`. + * @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. + * @type string $language_code + * The language to list flows for. The following fields are language + * dependent: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent containing the flows. + * Format: `projects//locations//agents/`. + * + * 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 containing the flows. + * Format: `projects//locations//agents/`. + * + * 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; + } + + /** + * The language to list flows for. The following fields are language + * dependent: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 4; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to list flows for. The following fields are language + * dependent: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsResponse.php new file mode 100644 index 000000000000..c38f11694ac4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListFlowsResponse + */ +class ListFlowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of flows. 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.cx.v3.Flow flows = 1; + */ + private $flows; + /** + * 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\Cx\V3\Flow>|\Google\Protobuf\Internal\RepeatedField $flows + * The list of flows. 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\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * The list of flows. 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.cx.v3.Flow flows = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFlows() + { + return $this->flows; + } + + /** + * The list of flows. 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.cx.v3.Flow flows = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Flow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFlows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Flow::class); + $this->flows = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsRequest.php new file mode 100644 index 000000000000..d5b4de9508a6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsRequest.php @@ -0,0 +1,193 @@ +google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + */ +class ListGeneratorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list all generators for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The language to list generators for. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + /** + * 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; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The agent to list all generators for. + * Format: `projects//locations//agents/`. Please see + * {@see GeneratorsClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListGeneratorsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list all generators for. + * Format: `projects//locations//agents/`. + * @type string $language_code + * The language to list generators for. + * @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\Cx\V3\Generator::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list all generators for. + * Format: `projects//locations//agents/`. + * + * 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 generators for. + * Format: `projects//locations//agents/`. + * + * 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 language to list generators for. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to list generators for. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $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 = 3; + * @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 = 3; + * @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 = 4; + * @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 = 4; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsResponse.php new file mode 100644 index 000000000000..f66e1e370fc6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + */ +class ListGeneratorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of generators. 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.cx.v3.Generator generators = 1; + */ + private $generators; + /** + * 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\Cx\V3\Generator>|\Google\Protobuf\Internal\RepeatedField $generators + * The list of generators. 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\Cx\V3\Generator::initOnce(); + parent::__construct($data); + } + + /** + * The list of generators. 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.cx.v3.Generator generators = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGenerators() + { + return $this->generators; + } + + /** + * The list of generators. 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.cx.v3.Generator generators = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Generator>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGenerators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Generator::class); + $this->generators = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsRequest.php new file mode 100644 index 000000000000..7f3216516f9c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsRequest.php @@ -0,0 +1,255 @@ +google.cloud.dialogflow.cx.v3.ListIntentsRequest + */ +class ListIntentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list all intents for. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The language to list intents for. The following fields are language + * dependent: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + /** + * The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentView intent_view = 5; + */ + protected $intent_view = 0; + /** + * 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; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The agent to list all intents for. + * Format: `projects//locations//agents/`. Please see + * {@see IntentsClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListIntentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list all intents for. + * Format: `projects//locations//agents/`. + * @type string $language_code + * The language to list intents for. The following fields are language + * dependent: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * are supported. + * Note: languages must be enabled in the agent before they can be used. + * @type int $intent_view + * The resource view to apply to the returned intent. + * @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\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list all intents for. + * Format: `projects//locations//agents/`. + * + * 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 for. + * Format: `projects//locations//agents/`. + * + * 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 language to list intents for. The following fields are language + * dependent: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to list intents for. The following fields are language + * dependent: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentView intent_view = 5; + * @return int + */ + public function getIntentView() + { + return $this->intent_view; + } + + /** + * The resource view to apply to the returned intent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentView intent_view = 5; + * @param int $var + * @return $this + */ + public function setIntentView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\IntentView::class); + $this->intent_view = $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 = 3; + * @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 = 3; + * @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 = 4; + * @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 = 4; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsResponse.php new file mode 100644 index 000000000000..f76463fe6a8e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListIntentsResponse + */ +class ListIntentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of 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.cx.v3.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\Cx\V3\Intent>|\Google\Protobuf\Internal\RepeatedField $intents + * The list of 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\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * The list of 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.cx.v3.Intent intents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIntents() + { + return $this->intents; + } + + /** + * The list of 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.cx.v3.Intent intents = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Intent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIntents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesRequest.php new file mode 100644 index 000000000000..87cae28c9915 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesRequest.php @@ -0,0 +1,270 @@ +google.cloud.dialogflow.cx.v3.ListPagesRequest + */ +class ListPagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The flow to list all pages for. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The language to list pages for. The following fields are language + * dependent: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + /** + * 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; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous list request. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The flow to list all pages for. + * Format: + * `projects//locations//agents//flows/`. Please see + * {@see PagesClient::flowName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListPagesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The flow to list all pages for. + * Format: + * `projects//locations//agents//flows/`. + * @type string $language_code + * The language to list pages for. The following fields are language + * dependent: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * are supported. + * Note: languages must be enabled in the agent before they can be used. + * @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\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Required. The flow to list all pages for. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 flow to list all pages for. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 language to list pages for. The following fields are language + * dependent: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to list pages for. The following fields are language + * dependent: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $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 = 3; + * @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 = 3; + * @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 = 4; + * @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 = 4; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesResponse.php new file mode 100644 index 000000000000..ba48419acca6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListPagesResponse + */ +class ListPagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of pages. 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.cx.v3.Page pages = 1; + */ + private $pages; + /** + * 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\Cx\V3\Page>|\Google\Protobuf\Internal\RepeatedField $pages + * The list of pages. 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\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * The list of pages. 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.cx.v3.Page pages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPages() + { + return $this->pages; + } + + /** + * The list of pages. 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.cx.v3.Page pages = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Page>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Page::class); + $this->pages = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsRequest.php new file mode 100644 index 000000000000..053d31a0d4d8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsRequest.php @@ -0,0 +1,164 @@ +google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + */ +class ListPlaybookVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The playbook to list versions for. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 = ''; + + /** + * @param string $parent Required. The playbook to list versions for. + * Format: + * `projects//locations//agents//playbooks/`. Please see + * {@see PlaybooksClient::playbookName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListPlaybookVersionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The playbook to list versions for. + * Format: + * `projects//locations//agents//playbooks/`. + * @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\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The playbook to list versions for. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 playbook to list versions for. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsResponse.php new file mode 100644 index 000000000000..4896c178fbe2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse + */ +class ListPlaybookVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of playbook version. 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.cx.v3.PlaybookVersion playbook_versions = 1; + */ + private $playbook_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\Cx\V3\PlaybookVersion>|\Google\Protobuf\Internal\RepeatedField $playbook_versions + * The list of playbook version. 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\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * The list of playbook version. 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.cx.v3.PlaybookVersion playbook_versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPlaybookVersions() + { + return $this->playbook_versions; + } + + /** + * The list of playbook version. 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.cx.v3.PlaybookVersion playbook_versions = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\PlaybookVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPlaybookVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\PlaybookVersion::class); + $this->playbook_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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksRequest.php new file mode 100644 index 000000000000..4ce0812cace6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksRequest.php @@ -0,0 +1,159 @@ +google.cloud.dialogflow.cx.v3.ListPlaybooksRequest + */ +class ListPlaybooksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list playbooks from. + * Format: `projects//locations//agents/`. + * + * 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 = ''; + + /** + * @param string $parent Required. The agent to list playbooks from. + * Format: `projects//locations//agents/`. Please see + * {@see PlaybooksClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListPlaybooksRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list playbooks from. + * Format: `projects//locations//agents/`. + * @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\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list playbooks from. + * Format: `projects//locations//agents/`. + * + * 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 playbooks from. + * Format: `projects//locations//agents/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksResponse.php new file mode 100644 index 000000000000..95cd2530e712 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + */ +class ListPlaybooksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of playbooks. 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.cx.v3.Playbook playbooks = 1; + */ + private $playbooks; + /** + * 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\Cx\V3\Playbook>|\Google\Protobuf\Internal\RepeatedField $playbooks + * The list of playbooks. 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\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * The list of playbooks. 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.cx.v3.Playbook playbooks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPlaybooks() + { + return $this->playbooks; + } + + /** + * The list of playbooks. 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.cx.v3.Playbook playbooks = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Playbook>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPlaybooks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Playbook::class); + $this->playbooks = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsRequest.php new file mode 100644 index 000000000000..5daac5e980c9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsRequest.php @@ -0,0 +1,158 @@ +google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + */ +class ListSecuritySettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location to list all security settings 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 20 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 = ''; + + /** + * @param string $parent Required. The location to list all security settings for. + * Format: `projects//locations/`. Please see + * {@see SecuritySettingsServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListSecuritySettingsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location to list all security settings for. + * Format: `projects//locations/`. + * @type int $page_size + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @type string $page_token + * The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location to list all security settings 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 location to list all security settings 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 20 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 20 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsResponse.php new file mode 100644 index 000000000000..082da9d41a95 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsResponse.php @@ -0,0 +1,105 @@ +google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + */ +class ListSecuritySettingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of security settings. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1; + */ + private $security_settings; + /** + * 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\Cx\V3\SecuritySettings>|\Google\Protobuf\Internal\RepeatedField $security_settings + * The list of security settings. + * @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\Cx\V3\SecuritySettings::initOnce(); + parent::__construct($data); + } + + /** + * The list of security settings. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecuritySettings() + { + return $this->security_settings; + } + + /** + * The list of security settings. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecuritySettings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::class); + $this->security_settings = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesRequest.php new file mode 100644 index 000000000000..ca21e06cb693 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesRequest.php @@ -0,0 +1,184 @@ +google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + */ +class ListSessionEntityTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The session to list all session entity types from. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * + * 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 = ''; + + /** + * @param string $parent Required. The session to list all session entity types from. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. Please see + * {@see SessionEntityTypesClient::sessionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListSessionEntityTypesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The session to list all session entity types from. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * @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\Cx\V3\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The session to list all session entity types from. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default '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 session to list all session entity types from. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default '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; + } + + /** + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesResponse.php new file mode 100644 index 000000000000..d351954ac8d6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.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.cx.v3.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\Cx\V3\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\Cx\V3\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.cx.v3.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.cx.v3.SessionEntityType session_entity_types = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSessionEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsRequest.php new file mode 100644 index 000000000000..aee87cbefeb2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsRequest.php @@ -0,0 +1,280 @@ +google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + */ +class ListTestCaseResultsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The test case to list results for. + * Format: + * `projects//locations//agents//testCases/`. + * Specify a `-` as a wildcard for TestCase ID to + * list results across multiple test cases. + * + * 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 = ''; + /** + * The filter expression used to filter test case results. See + * [API Filtering](https://aip.dev/160). + * The expression is case insensitive. Only 'AND' is supported for logical + * operators. The supported syntax is listed below in detail: + * [AND ] ... + * [AND latest] + * The supported fields and operators are: + * field operator + * `environment` `=`, `IN` (Use value `draft` for draft environment) + * `test_time` `>`, `<` + * `latest` only returns the latest test result in all results for each test + * case. + * Examples: + * * "environment=draft AND latest" matches the latest test result for each + * test case in the draft environment. + * * "environment IN (e1,e2)" matches any test case results with an + * environment resource name of either "e1" or "e2". + * * "test_time > 1602540713" matches any test case results with test time + * later than a unix timestamp in seconds 1602540713. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The test case to list results for. + * Format: + * `projects//locations//agents//testCases/`. + * Specify a `-` as a wildcard for TestCase ID to + * list results across multiple test cases. Please see + * {@see TestCasesClient::testCaseName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListTestCaseResultsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The test case to list results for. + * Format: + * `projects//locations//agents//testCases/`. + * Specify a `-` as a wildcard for TestCase ID to + * list results across multiple test cases. + * @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. + * @type string $filter + * The filter expression used to filter test case results. See + * [API Filtering](https://aip.dev/160). + * The expression is case insensitive. Only 'AND' is supported for logical + * operators. The supported syntax is listed below in detail: + * [AND ] ... + * [AND latest] + * The supported fields and operators are: + * field operator + * `environment` `=`, `IN` (Use value `draft` for draft environment) + * `test_time` `>`, `<` + * `latest` only returns the latest test result in all results for each test + * case. + * Examples: + * * "environment=draft AND latest" matches the latest test result for each + * test case in the draft environment. + * * "environment IN (e1,e2)" matches any test case results with an + * environment resource name of either "e1" or "e2". + * * "test_time > 1602540713" matches any test case results with test time + * later than a unix timestamp in seconds 1602540713. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The test case to list results for. + * Format: + * `projects//locations//agents//testCases/`. + * Specify a `-` as a wildcard for TestCase ID to + * list results across multiple test cases. + * + * 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 test case to list results for. + * Format: + * `projects//locations//agents//testCases/`. + * Specify a `-` as a wildcard for TestCase ID to + * list results across multiple test cases. + * + * 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; + } + + /** + * The filter expression used to filter test case results. See + * [API Filtering](https://aip.dev/160). + * The expression is case insensitive. Only 'AND' is supported for logical + * operators. The supported syntax is listed below in detail: + * [AND ] ... + * [AND latest] + * The supported fields and operators are: + * field operator + * `environment` `=`, `IN` (Use value `draft` for draft environment) + * `test_time` `>`, `<` + * `latest` only returns the latest test result in all results for each test + * case. + * Examples: + * * "environment=draft AND latest" matches the latest test result for each + * test case in the draft environment. + * * "environment IN (e1,e2)" matches any test case results with an + * environment resource name of either "e1" or "e2". + * * "test_time > 1602540713" matches any test case results with test time + * later than a unix timestamp in seconds 1602540713. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression used to filter test case results. See + * [API Filtering](https://aip.dev/160). + * The expression is case insensitive. Only 'AND' is supported for logical + * operators. The supported syntax is listed below in detail: + * [AND ] ... + * [AND latest] + * The supported fields and operators are: + * field operator + * `environment` `=`, `IN` (Use value `draft` for draft environment) + * `test_time` `>`, `<` + * `latest` only returns the latest test result in all results for each test + * case. + * Examples: + * * "environment=draft AND latest" matches the latest test result for each + * test case in the draft environment. + * * "environment IN (e1,e2)" matches any test case results with an + * environment resource name of either "e1" or "e2". + * * "test_time > 1602540713" matches any test case results with test time + * later than a unix timestamp in seconds 1602540713. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsResponse.php new file mode 100644 index 000000000000..ac6cc938e7db --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsResponse.php @@ -0,0 +1,106 @@ +google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + */ +class ListTestCaseResultsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of test case results. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + */ + private $test_case_results; + /** + * 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\Cx\V3\TestCaseResult>|\Google\Protobuf\Internal\RepeatedField $test_case_results + * The list of test case results. + * @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\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The list of test case results. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTestCaseResults() + { + return $this->test_case_results; + } + + /** + * The list of test case results. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestCaseResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTestCaseResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult::class); + $this->test_case_results = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest.php new file mode 100644 index 000000000000..e9194713d6a2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest.php @@ -0,0 +1,197 @@ +google.cloud.dialogflow.cx.v3.ListTestCasesRequest + */ +class ListTestCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list all pages for. + * Format: `projects//locations//agents/`. + * + * 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 20. + * Note that when TestCaseView = FULL, the maximum page size allowed is 20. + * When TestCaseView = BASIC, the maximum page size allowed is 500. + * + * 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 = ''; + /** + * Specifies whether response should include all fields or just the metadata. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + */ + protected $view = 0; + + /** + * @param string $parent Required. The agent to list all pages for. + * Format: `projects//locations//agents/`. Please see + * {@see TestCasesClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListTestCasesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list all pages for. + * Format: `projects//locations//agents/`. + * @type int $page_size + * The maximum number of items to return in a single page. By default 20. + * Note that when TestCaseView = FULL, the maximum page size allowed is 20. + * When TestCaseView = BASIC, the maximum page size allowed is 500. + * @type string $page_token + * The next_page_token value returned from a previous list request. + * @type int $view + * Specifies whether response should include all fields or just the metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list all pages for. + * Format: `projects//locations//agents/`. + * + * 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 pages for. + * Format: `projects//locations//agents/`. + * + * 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 20. + * Note that when TestCaseView = FULL, the maximum page size allowed is 20. + * When TestCaseView = BASIC, the maximum page size allowed is 500. + * + * 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 20. + * Note that when TestCaseView = FULL, the maximum page size allowed is 20. + * When TestCaseView = BASIC, the maximum page size allowed is 500. + * + * 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; + } + + /** + * Specifies whether response should include all fields or just the metadata. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Specifies whether response should include all fields or just the metadata. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ListTestCasesRequest\TestCaseView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest/TestCaseView.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest/TestCaseView.php new file mode 100644 index 000000000000..d24c2b4605c8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest/TestCaseView.php @@ -0,0 +1,66 @@ +google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView + */ +class TestCaseView +{ + /** + * The default / unset value. + * The API will default to the BASIC view. + * + * Generated from protobuf enum TEST_CASE_VIEW_UNSPECIFIED = 0; + */ + const TEST_CASE_VIEW_UNSPECIFIED = 0; + /** + * Include basic metadata about the test case, but not the conversation + * turns. This is the default value. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Include everything. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::TEST_CASE_VIEW_UNSPECIFIED => 'TEST_CASE_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => '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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TestCaseView::class, \Google\Cloud\Dialogflow\Cx\V3\ListTestCasesRequest_TestCaseView::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesResponse.php new file mode 100644 index 000000000000..dd24de72146c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListTestCasesResponse + */ +class ListTestCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of test cases. 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.cx.v3.TestCase test_cases = 1; + */ + private $test_cases; + /** + * 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\Cx\V3\TestCase>|\Google\Protobuf\Internal\RepeatedField $test_cases + * The list of test cases. 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\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The list of test cases. 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.cx.v3.TestCase test_cases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTestCases() + { + return $this->test_cases; + } + + /** + * The list of test cases. 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.cx.v3.TestCase test_cases = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestCase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTestCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestCase::class); + $this->test_cases = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsRequest.php new file mode 100644 index 000000000000..7353a1402824 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsRequest.php @@ -0,0 +1,164 @@ +google.cloud.dialogflow.cx.v3.ListToolVersionsRequest + */ +class ListToolVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the tool versions. + * Format: + * `projects//locations//agents//tools/`. + * + * 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 = ''; + + /** + * @param string $parent Required. The parent of the tool versions. + * Format: + * `projects//locations//agents//tools/`. Please see + * {@see ToolsClient::toolName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListToolVersionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the tool versions. + * Format: + * `projects//locations//agents//tools/`. + * @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\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the tool versions. + * Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent of the tool versions. + * Format: + * `projects//locations//agents//tools/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsResponse.php new file mode 100644 index 000000000000..5314aea836e5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListToolVersionsResponse + */ +class ListToolVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of tool 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.cx.v3.ToolVersion tool_versions = 1; + */ + private $tool_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\Cx\V3\ToolVersion>|\Google\Protobuf\Internal\RepeatedField $tool_versions + * The list of tool 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\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * The list of tool 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.cx.v3.ToolVersion tool_versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getToolVersions() + { + return $this->tool_versions; + } + + /** + * The list of tool 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.cx.v3.ToolVersion tool_versions = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ToolVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setToolVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ToolVersion::class); + $this->tool_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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsRequest.php new file mode 100644 index 000000000000..792df305dad6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsRequest.php @@ -0,0 +1,159 @@ +google.cloud.dialogflow.cx.v3.ListToolsRequest + */ +class ListToolsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list the Tools from. + * Format: `projects//locations//agents/`. + * + * 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 = ''; + + /** + * @param string $parent Required. The agent to list the Tools from. + * Format: `projects//locations//agents/`. Please see + * {@see ToolsClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListToolsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list the Tools from. + * Format: `projects//locations//agents/`. + * @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\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list the Tools from. + * Format: `projects//locations//agents/`. + * + * 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 the Tools from. + * Format: `projects//locations//agents/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsResponse.php new file mode 100644 index 000000000000..80c56b49848d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListToolsResponse + */ +class ListToolsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Tools. 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.cx.v3.Tool tools = 1; + */ + private $tools; + /** + * 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\Cx\V3\Tool>|\Google\Protobuf\Internal\RepeatedField $tools + * The list of Tools. 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\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * The list of Tools. 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.cx.v3.Tool tools = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTools() + { + return $this->tools; + } + + /** + * The list of Tools. 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.cx.v3.Tool tools = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Tool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Tool::class); + $this->tools = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsRequest.php new file mode 100644 index 000000000000..0b5f38ebce4e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsRequest.php @@ -0,0 +1,239 @@ +google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + */ +class ListTransitionRouteGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The flow to list all transition route groups for. + * Format: + * `projects//locations//agents//flows/` + * or `projects//locations//agents/. + * + * 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 = ''; + /** + * The language to list transition route groups for. The following fields are + * language dependent: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 4; + */ + protected $language_code = ''; + + /** + * @param string $parent Required. The flow to list all transition route groups for. + * Format: + * `projects//locations//agents//flows/` + * or `projects//locations//agents/. Please see + * {@see TransitionRouteGroupsClient::flowName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListTransitionRouteGroupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The flow to list all transition route groups for. + * Format: + * `projects//locations//agents//flows/` + * or `projects//locations//agents/. + * @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. + * @type string $language_code + * The language to list transition route groups for. The following fields are + * language dependent: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\TransitionRouteGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The flow to list all transition route groups for. + * Format: + * `projects//locations//agents//flows/` + * or `projects//locations//agents/. + * + * 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 flow to list all transition route groups for. + * Format: + * `projects//locations//agents//flows/` + * or `projects//locations//agents/. + * + * 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; + } + + /** + * The language to list transition route groups for. The following fields are + * language dependent: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 4; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to list transition route groups for. The following fields are + * language dependent: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsResponse.php new file mode 100644 index 000000000000..1c41c06a2ade --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsResponse.php @@ -0,0 +1,118 @@ +google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + */ +class ListTransitionRouteGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of transition route groups. There will be a maximum number of + * items returned based on the page_size field in the request. The list may in + * some cases be empty or contain fewer entries than page_size even if this + * isn't the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_groups = 1; + */ + private $transition_route_groups; + /** + * 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\Cx\V3\TransitionRouteGroup>|\Google\Protobuf\Internal\RepeatedField $transition_route_groups + * The list of transition route groups. There will be a maximum number of + * items returned based on the page_size field in the request. The list may in + * some cases be empty or contain fewer entries than page_size even if this + * isn't the last page. + * @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\Cx\V3\TransitionRouteGroup::initOnce(); + parent::__construct($data); + } + + /** + * The list of transition route groups. There will be a maximum number of + * items returned based on the page_size field in the request. The list may in + * some cases be empty or contain fewer entries than page_size even if this + * isn't the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_groups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitionRouteGroups() + { + return $this->transition_route_groups; + } + + /** + * The list of transition route groups. There will be a maximum number of + * items returned based on the page_size field in the request. The list may in + * some cases be empty or contain fewer entries than page_size even if this + * isn't the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_groups = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitionRouteGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::class); + $this->transition_route_groups = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsRequest.php new file mode 100644 index 000000000000..894d16df9940 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsRequest.php @@ -0,0 +1,164 @@ +google.cloud.dialogflow.cx.v3.ListVersionsRequest + */ +class ListVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all + * versions for. Format: + * `projects//locations//agents//flows/`. + * + * 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 20 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 = ''; + + /** + * @param string $parent Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all + * versions for. Format: + * `projects//locations//agents//flows/`. Please see + * {@see VersionsClient::flowName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListVersionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all + * versions for. Format: + * `projects//locations//agents//flows/`. + * @type int $page_size + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @type string $page_token + * The next_page_token value returned from a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all + * versions for. Format: + * `projects//locations//agents//flows/`. + * + * 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 [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all + * versions for. Format: + * `projects//locations//agents//flows/`. + * + * 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 20 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 20 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsResponse.php new file mode 100644 index 000000000000..88cbf3ca5a1a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsResponse.php @@ -0,0 +1,114 @@ +google.cloud.dialogflow.cx.v3.ListVersionsResponse + */ +class ListVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of versions. There will be a maximum number of items returned based + * on the page_size field in the request. The list may in some cases be empty + * or contain fewer entries than page_size even if this isn't the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.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\Cx\V3\Version>|\Google\Protobuf\Internal\RepeatedField $versions + * A list of versions. There will be a maximum number of items returned based + * on the page_size field in the request. The list may in some cases be empty + * or contain fewer entries than page_size even if this isn't the last page. + * @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\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * A list of versions. There will be a maximum number of items returned based + * on the page_size field in the request. The list may in some cases be empty + * or contain fewer entries than page_size even if this isn't the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Version versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVersions() + { + return $this->versions; + } + + /** + * A list of versions. There will be a maximum number of items returned based + * on the page_size field in the request. The list may in some cases be empty + * or contain fewer entries than page_size even if this isn't the last page. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Version versions = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Version>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksRequest.php new file mode 100644 index 000000000000..0c1dbafe4807 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksRequest.php @@ -0,0 +1,159 @@ +google.cloud.dialogflow.cx.v3.ListWebhooksRequest + */ +class ListWebhooksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to list all webhooks for. + * Format: `projects//locations//agents/`. + * + * 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 = ''; + + /** + * @param string $parent Required. The agent to list all webhooks for. + * Format: `projects//locations//agents/`. Please see + * {@see WebhooksClient::agentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\ListWebhooksRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The agent to list all webhooks for. + * Format: `projects//locations//agents/`. + * @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\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to list all webhooks for. + * Format: `projects//locations//agents/`. + * + * 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 webhooks for. + * Format: `projects//locations//agents/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksResponse.php new file mode 100644 index 000000000000..18c66abb5833 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksResponse.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ListWebhooksResponse + */ +class ListWebhooksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of webhooks. 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.cx.v3.Webhook webhooks = 1; + */ + private $webhooks; + /** + * 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\Cx\V3\Webhook>|\Google\Protobuf\Internal\RepeatedField $webhooks + * The list of webhooks. 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\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * The list of webhooks. 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.cx.v3.Webhook webhooks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWebhooks() + { + return $this->webhooks; + } + + /** + * The list of webhooks. 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.cx.v3.Webhook webhooks = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Webhook>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWebhooks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Webhook::class); + $this->webhooks = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LlmModelSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LlmModelSettings.php new file mode 100644 index 000000000000..0e862e925466 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LlmModelSettings.php @@ -0,0 +1,101 @@ +google.cloud.dialogflow.cx.v3.LlmModelSettings + */ +class LlmModelSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The selected LLM model. + * + * Generated from protobuf field string model = 1; + */ + protected $model = ''; + /** + * The custom prompt to use. + * + * Generated from protobuf field string prompt_text = 2; + */ + protected $prompt_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model + * The selected LLM model. + * @type string $prompt_text + * The custom prompt to use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::initOnce(); + parent::__construct($data); + } + + /** + * The selected LLM model. + * + * Generated from protobuf field string model = 1; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * The selected LLM model. + * + * Generated from protobuf field string model = 1; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * The custom prompt to use. + * + * Generated from protobuf field string prompt_text = 2; + * @return string + */ + public function getPromptText() + { + return $this->prompt_text; + } + + /** + * The custom prompt to use. + * + * Generated from protobuf field string prompt_text = 2; + * @param string $var + * @return $this + */ + public function setPromptText($var) + { + GPBUtil::checkString($var, True); + $this->prompt_text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LoadVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LoadVersionRequest.php new file mode 100644 index 000000000000..d2566208a1f1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LoadVersionRequest.php @@ -0,0 +1,138 @@ +google.cloud.dialogflow.cx.v3.LoadVersionRequest + */ +class LoadVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded + * to draft flow. Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * This field is used to prevent accidental overwrite of other agent + * resources, which can potentially impact other flow's behavior. If + * `allow_override_agent_resources` is false, conflicted agent-level resources + * will not be overridden (i.e. intents, entities, webhooks). + * + * Generated from protobuf field bool allow_override_agent_resources = 2; + */ + protected $allow_override_agent_resources = false; + + /** + * @param string $name Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded + * to draft flow. Format: + * `projects//locations//agents//flows//versions/`. Please see + * {@see VersionsClient::versionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\LoadVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded + * to draft flow. Format: + * `projects//locations//agents//flows//versions/`. + * @type bool $allow_override_agent_resources + * This field is used to prevent accidental overwrite of other agent + * resources, which can potentially impact other flow's behavior. If + * `allow_override_agent_resources` is false, conflicted agent-level resources + * will not be overridden (i.e. intents, entities, webhooks). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded + * to draft flow. Format: + * `projects//locations//agents//flows//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 [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded + * to draft flow. Format: + * `projects//locations//agents//flows//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; + } + + /** + * This field is used to prevent accidental overwrite of other agent + * resources, which can potentially impact other flow's behavior. If + * `allow_override_agent_resources` is false, conflicted agent-level resources + * will not be overridden (i.e. intents, entities, webhooks). + * + * Generated from protobuf field bool allow_override_agent_resources = 2; + * @return bool + */ + public function getAllowOverrideAgentResources() + { + return $this->allow_override_agent_resources; + } + + /** + * This field is used to prevent accidental overwrite of other agent + * resources, which can potentially impact other flow's behavior. If + * `allow_override_agent_resources` is false, conflicted agent-level resources + * will not be overridden (i.e. intents, entities, webhooks). + * + * Generated from protobuf field bool allow_override_agent_resources = 2; + * @param bool $var + * @return $this + */ + public function setAllowOverrideAgentResources($var) + { + GPBUtil::checkBool($var); + $this->allow_override_agent_resources = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryRequest.php new file mode 100644 index 000000000000..7e6f8f61c9be --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryRequest.php @@ -0,0 +1,164 @@ +google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + */ +class LookupEnvironmentHistoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the environment to look up the history for. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * 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 = ''; + + /** + * @param string $name Required. Resource name of the environment to look up the history for. + * Format: + * `projects//locations//agents//environments/`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\LookupEnvironmentHistoryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the environment to look up the history for. + * Format: + * `projects//locations//agents//environments/`. + * @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\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the environment to look up the history for. + * Format: + * `projects//locations//agents//environments/`. + * + * 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 name of the environment to look up the history for. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryResponse.php new file mode 100644 index 000000000000..67b4ff65d562 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryResponse.php @@ -0,0 +1,114 @@ +google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + */ +class LookupEnvironmentHistoryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Represents a list of snapshots for an environment. Time of the snapshots is + * stored in + * [`update_time`][google.cloud.dialogflow.cx.v3.Environment.update_time]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.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\Cx\V3\Environment>|\Google\Protobuf\Internal\RepeatedField $environments + * Represents a list of snapshots for an environment. Time of the snapshots is + * stored in + * [`update_time`][google.cloud.dialogflow.cx.v3.Environment.update_time]. + * @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\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Represents a list of snapshots for an environment. Time of the snapshots is + * stored in + * [`update_time`][google.cloud.dialogflow.cx.v3.Environment.update_time]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment environments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnvironments() + { + return $this->environments; + } + + /** + * Represents a list of snapshots for an environment. Time of the snapshots is + * stored in + * [`update_time`][google.cloud.dialogflow.cx.v3.Environment.update_time]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment environments = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Environment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnvironments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentRequest.php new file mode 100644 index 000000000000..73bdef19c36b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentRequest.php @@ -0,0 +1,233 @@ +google.cloud.dialogflow.cx.v3.MatchIntentRequest + */ +class MatchIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session this query is sent to. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * + * 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.cx.v3.QueryParameters query_params = 2; + */ + protected $query_params = null; + /** + * Required. The input specification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query_input = null; + /** + * Persist session parameter changes from `query_params`. + * + * Generated from protobuf field bool persist_parameter_changes = 5; + */ + protected $persist_parameter_changes = false; + + /** + * 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//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * @type \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $query_params + * The parameters of this query. + * @type \Google\Cloud\Dialogflow\Cx\V3\QueryInput $query_input + * Required. The input specification. + * @type bool $persist_parameter_changes + * Persist session parameter changes from `query_params`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session this query is sent to. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * + * 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//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * + * 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.cx.v3.QueryParameters query_params = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.QueryParameters query_params = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $var + * @return $this + */ + public function setQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryParameters::class); + $this->query_params = $var; + + return $this; + } + + /** + * Required. The input specification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\QueryInput $var + * @return $this + */ + public function setQueryInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryInput::class); + $this->query_input = $var; + + return $this; + } + + /** + * Persist session parameter changes from `query_params`. + * + * Generated from protobuf field bool persist_parameter_changes = 5; + * @return bool + */ + public function getPersistParameterChanges() + { + return $this->persist_parameter_changes; + } + + /** + * Persist session parameter changes from `query_params`. + * + * Generated from protobuf field bool persist_parameter_changes = 5; + * @param bool $var + * @return $this + */ + public function setPersistParameterChanges($var) + { + GPBUtil::checkBool($var); + $this->persist_parameter_changes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentResponse.php new file mode 100644 index 000000000000..8333b7295a57 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentResponse.php @@ -0,0 +1,282 @@ +google.cloud.dialogflow.cx.v3.MatchIntentResponse + */ +class MatchIntentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Match results, if more than one, ordered descendingly by the confidence + * we have that the particular intent matches the query. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Match matches = 4; + */ + private $matches; + /** + * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 5; + */ + protected $current_page = null; + protected $query; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was + * provided as input, this field will contain a copy of the text. + * @type string $trigger_intent + * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as + * input, this field will contain a copy of the intent identifier. Format: + * `projects//locations//agents//intents/`. + * @type string $transcript + * If [natural language speech + * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, + * this field will contain the transcript for the audio. + * @type string $trigger_event + * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as + * input, this field will contain a copy of the event name. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\PBMatch>|\Google\Protobuf\Internal\RepeatedField $matches + * Match results, if more than one, ordered descendingly by the confidence + * we have that the particular intent matches the query. + * @type \Google\Cloud\Dialogflow\Cx\V3\Page $current_page + * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was + * provided as input, this field will contain a copy of the text. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was + * provided as input, this field will contain a copy of the text. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as + * input, this field will contain a copy of the intent identifier. Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string trigger_intent = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getTriggerIntent() + { + return $this->readOneof(2); + } + + public function hasTriggerIntent() + { + return $this->hasOneof(2); + } + + /** + * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as + * input, this field will contain a copy of the intent identifier. Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string trigger_intent = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTriggerIntent($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * If [natural language speech + * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, + * this field will contain the transcript for the audio. + * + * Generated from protobuf field string transcript = 3; + * @return string + */ + public function getTranscript() + { + return $this->readOneof(3); + } + + public function hasTranscript() + { + return $this->hasOneof(3); + } + + /** + * If [natural language speech + * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, + * this field will contain the transcript for the audio. + * + * Generated from protobuf field string transcript = 3; + * @param string $var + * @return $this + */ + public function setTranscript($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as + * input, this field will contain a copy of the event name. + * + * Generated from protobuf field string trigger_event = 6; + * @return string + */ + public function getTriggerEvent() + { + return $this->readOneof(6); + } + + public function hasTriggerEvent() + { + return $this->hasOneof(6); + } + + /** + * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as + * input, this field will contain a copy of the event name. + * + * Generated from protobuf field string trigger_event = 6; + * @param string $var + * @return $this + */ + public function setTriggerEvent($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Match results, if more than one, ordered descendingly by the confidence + * we have that the particular intent matches the query. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Match matches = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMatches() + { + return $this->matches; + } + + /** + * Match results, if more than one, ordered descendingly by the confidence + * we have that the particular intent matches the query. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Match matches = 4; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\PBMatch>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMatches($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\PBMatch::class); + $this->matches = $arr; + + return $this; + } + + /** + * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 5; + * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null + */ + public function getCurrentPage() + { + return $this->current_page; + } + + public function hasCurrentPage() + { + return isset($this->current_page); + } + + public function clearCurrentPage() + { + unset($this->current_page); + } + + /** + * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 5; + * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var + * @return $this + */ + public function setCurrentPage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); + $this->current_page = $var; + + return $this; + } + + /** + * @return string + */ + public function getQuery() + { + return $this->whichOneof("query"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings.php new file mode 100644 index 000000000000..957b9d6e4d4c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings.php @@ -0,0 +1,159 @@ +google.cloud.dialogflow.cx.v3.NluSettings + */ +class NluSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates the type of NLU model. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelType model_type = 1; + */ + protected $model_type = 0; + /** + * 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 no-match event 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. You can set a separate classification + * threshold for the flow in each language enabled for the agent. + * + * Generated from protobuf field float classification_threshold = 3; + */ + protected $classification_threshold = 0.0; + /** + * Indicates NLU model training mode. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode model_training_mode = 4; + */ + protected $model_training_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $model_type + * Indicates the type of NLU model. + * @type float $classification_threshold + * 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 no-match event 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. You can set a separate classification + * threshold for the flow in each language enabled for the agent. + * @type int $model_training_mode + * Indicates NLU model training mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Indicates the type of NLU model. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelType model_type = 1; + * @return int + */ + public function getModelType() + { + return $this->model_type; + } + + /** + * Indicates the type of NLU model. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelType model_type = 1; + * @param int $var + * @return $this + */ + public function setModelType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\NluSettings\ModelType::class); + $this->model_type = $var; + + return $this; + } + + /** + * 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 no-match event 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. You can set a separate classification + * threshold for the flow in each language enabled for the agent. + * + * Generated from protobuf field float classification_threshold = 3; + * @return float + */ + public function getClassificationThreshold() + { + return $this->classification_threshold; + } + + /** + * 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 no-match event 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. You can set a separate classification + * threshold for the flow in each language enabled for the agent. + * + * Generated from protobuf field float classification_threshold = 3; + * @param float $var + * @return $this + */ + public function setClassificationThreshold($var) + { + GPBUtil::checkFloat($var); + $this->classification_threshold = $var; + + return $this; + } + + /** + * Indicates NLU model training mode. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode model_training_mode = 4; + * @return int + */ + public function getModelTrainingMode() + { + return $this->model_training_mode; + } + + /** + * Indicates NLU model training mode. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode model_training_mode = 4; + * @param int $var + * @return $this + */ + public function setModelTrainingMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\NluSettings\ModelTrainingMode::class); + $this->model_training_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelTrainingMode.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelTrainingMode.php new file mode 100644 index 000000000000..7bcea3b95ea8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelTrainingMode.php @@ -0,0 +1,66 @@ +google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode + */ +class ModelTrainingMode +{ + /** + * Not specified. `MODEL_TRAINING_MODE_AUTOMATIC` will be used. + * + * Generated from protobuf enum MODEL_TRAINING_MODE_UNSPECIFIED = 0; + */ + const MODEL_TRAINING_MODE_UNSPECIFIED = 0; + /** + * NLU model training is automatically triggered when a flow gets modified. + * User can also manually trigger model training in this mode. + * + * Generated from protobuf enum MODEL_TRAINING_MODE_AUTOMATIC = 1; + */ + const MODEL_TRAINING_MODE_AUTOMATIC = 1; + /** + * User needs to manually trigger NLU model training. Best for large flows + * whose models take long time to train. + * + * Generated from protobuf enum MODEL_TRAINING_MODE_MANUAL = 2; + */ + const MODEL_TRAINING_MODE_MANUAL = 2; + + private static $valueToName = [ + self::MODEL_TRAINING_MODE_UNSPECIFIED => 'MODEL_TRAINING_MODE_UNSPECIFIED', + self::MODEL_TRAINING_MODE_AUTOMATIC => 'MODEL_TRAINING_MODE_AUTOMATIC', + self::MODEL_TRAINING_MODE_MANUAL => 'MODEL_TRAINING_MODE_MANUAL', + ]; + + 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(ModelTrainingMode::class, \Google\Cloud\Dialogflow\Cx\V3\NluSettings_ModelTrainingMode::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelType.php new file mode 100644 index 000000000000..989116bc5633 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelType.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.NluSettings.ModelType + */ +class ModelType +{ + /** + * Not specified. `MODEL_TYPE_STANDARD` will be used. + * + * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; + */ + const MODEL_TYPE_UNSPECIFIED = 0; + /** + * Use standard NLU model. + * + * Generated from protobuf enum MODEL_TYPE_STANDARD = 1; + */ + const MODEL_TYPE_STANDARD = 1; + /** + * Use advanced NLU model. + * + * Generated from protobuf enum MODEL_TYPE_ADVANCED = 3; + */ + const MODEL_TYPE_ADVANCED = 3; + + private static $valueToName = [ + self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', + self::MODEL_TYPE_STANDARD => 'MODEL_TYPE_STANDARD', + self::MODEL_TYPE_ADVANCED => 'MODEL_TYPE_ADVANCED', + ]; + + 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\Cx\V3\NluSettings_ModelType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioConfig.php new file mode 100644 index 000000000000..168224ce7ecf --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioConfig.php @@ -0,0 +1,173 @@ +google.cloud.dialogflow.cx.v3.OutputAudioConfig + */ +class OutputAudioConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Audio encoding of the synthesized audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $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 = 2; + */ + protected $sample_rate_hertz = 0; + /** + * Optional. Configuration of how speech should be synthesized. + * If not specified, + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] + * is applied. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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 + * 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 \Google\Cloud\Dialogflow\Cx\V3\SynthesizeSpeechConfig $synthesize_speech_config + * Optional. Configuration of how speech should be synthesized. + * If not specified, + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] + * is applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Audio encoding of the synthesized audio content. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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.cx.v3.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAudioEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioEncoding::class); + $this->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 = 2; + * @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 = 2; + * @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. + * If not specified, + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] + * is applied. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig synthesize_speech_config = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\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); + } + + /** + * Optional. Configuration of how speech should be synthesized. + * If not specified, + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] + * is applied. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig synthesize_speech_config = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\SynthesizeSpeechConfig $var + * @return $this + */ + public function setSynthesizeSpeechConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SynthesizeSpeechConfig::class); + $this->synthesize_speech_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioEncoding.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioEncoding.php new file mode 100644 index 000000000000..996795c8626d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioEncoding.php @@ -0,0 +1,95 @@ +google.cloud.dialogflow.cx.v3.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. + * LINT: LEGACY_NAMES + * + * 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. + * LINT: LEGACY_NAMES + * + * 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; + /** + * 8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law. + * + * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_ALAW = 6; + */ + const OUTPUT_AUDIO_ENCODING_ALAW = 6; + + 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', + self::OUTPUT_AUDIO_ENCODING_ALAW => 'OUTPUT_AUDIO_ENCODING_ALAW', + ]; + + 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputState.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputState.php new file mode 100644 index 000000000000..47087ffe3b21 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputState.php @@ -0,0 +1,82 @@ +google.cloud.dialogflow.cx.v3.OutputState + */ +class OutputState +{ + /** + * Unspecified output. + * + * Generated from protobuf enum OUTPUT_STATE_UNSPECIFIED = 0; + */ + const OUTPUT_STATE_UNSPECIFIED = 0; + /** + * Succeeded. + * + * Generated from protobuf enum OUTPUT_STATE_OK = 1; + */ + const OUTPUT_STATE_OK = 1; + /** + * Cancelled. + * + * Generated from protobuf enum OUTPUT_STATE_CANCELLED = 2; + */ + const OUTPUT_STATE_CANCELLED = 2; + /** + * Failed. + * + * Generated from protobuf enum OUTPUT_STATE_FAILED = 3; + */ + const OUTPUT_STATE_FAILED = 3; + /** + * Escalated. + * + * Generated from protobuf enum OUTPUT_STATE_ESCALATED = 4; + */ + const OUTPUT_STATE_ESCALATED = 4; + /** + * Pending. + * + * Generated from protobuf enum OUTPUT_STATE_PENDING = 5; + */ + const OUTPUT_STATE_PENDING = 5; + + private static $valueToName = [ + self::OUTPUT_STATE_UNSPECIFIED => 'OUTPUT_STATE_UNSPECIFIED', + self::OUTPUT_STATE_OK => 'OUTPUT_STATE_OK', + self::OUTPUT_STATE_CANCELLED => 'OUTPUT_STATE_CANCELLED', + self::OUTPUT_STATE_FAILED => 'OUTPUT_STATE_FAILED', + self::OUTPUT_STATE_ESCALATED => 'OUTPUT_STATE_ESCALATED', + self::OUTPUT_STATE_PENDING => 'OUTPUT_STATE_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); + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch.php new file mode 100644 index 000000000000..f29581dfe795 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch.php @@ -0,0 +1,353 @@ +google.cloud.dialogflow.cx.v3.Match + */ +class PBMatch extends \Google\Protobuf\Internal\Message +{ + /** + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. + * Some, not all fields are filled in this message, including but not limited + * to: `name` and `display_name`. Only filled for + * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 1; + */ + protected $intent = null; + /** + * The event that matched the query. Filled for + * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], + * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and + * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. + * + * Generated from protobuf field string event = 6; + */ + protected $event = ''; + /** + * The collection of parameters extracted from the query. + * 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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use parameter value. + * + * Generated from protobuf field .google.protobuf.Struct parameters = 2; + */ + protected $parameters = null; + /** + * Final text input which was matched during MatchIntent. This value can be + * different from original input sent in request because of spelling + * correction or other processing. + * + * Generated from protobuf field string resolved_input = 3; + */ + protected $resolved_input = ''; + /** + * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4; + */ + protected $match_type = 0; + /** + * The confidence of this match. 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. + * + * Generated from protobuf field float confidence = 5; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Intent $intent + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. + * Some, not all fields are filled in this message, including but not limited + * to: `name` and `display_name`. Only filled for + * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. + * @type string $event + * The event that matched the query. Filled for + * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], + * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and + * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. + * @type \Google\Protobuf\Struct $parameters + * The collection of parameters extracted from the query. + * 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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use parameter value. + * @type string $resolved_input + * Final text input which was matched during MatchIntent. This value can be + * different from original input sent in request because of spelling + * correction or other processing. + * @type int $match_type + * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. + * @type float $confidence + * The confidence of this match. 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. + * Some, not all fields are filled in this message, including but not limited + * to: `name` and `display_name`. Only filled for + * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\Intent|null + */ + public function getIntent() + { + return $this->intent; + } + + public function hasIntent() + { + return isset($this->intent); + } + + public function clearIntent() + { + unset($this->intent); + } + + /** + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. + * Some, not all fields are filled in this message, including but not limited + * to: `name` and `display_name`. Only filled for + * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $var + * @return $this + */ + public function setIntent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Intent::class); + $this->intent = $var; + + return $this; + } + + /** + * The event that matched the query. Filled for + * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], + * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and + * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. + * + * Generated from protobuf field string event = 6; + * @return string + */ + public function getEvent() + { + return $this->event; + } + + /** + * The event that matched the query. Filled for + * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], + * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and + * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. + * + * Generated from protobuf field string event = 6; + * @param string $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkString($var, True); + $this->event = $var; + + return $this; + } + + /** + * The collection of parameters extracted from the query. + * 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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use 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 extracted from the query. + * 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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use 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; + } + + /** + * Final text input which was matched during MatchIntent. This value can be + * different from original input sent in request because of spelling + * correction or other processing. + * + * Generated from protobuf field string resolved_input = 3; + * @return string + */ + public function getResolvedInput() + { + return $this->resolved_input; + } + + /** + * Final text input which was matched during MatchIntent. This value can be + * different from original input sent in request because of spelling + * correction or other processing. + * + * Generated from protobuf field string resolved_input = 3; + * @param string $var + * @return $this + */ + public function setResolvedInput($var) + { + GPBUtil::checkString($var, True); + $this->resolved_input = $var; + + return $this; + } + + /** + * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4; + * @return int + */ + public function getMatchType() + { + return $this->match_type; + } + + /** + * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4; + * @param int $var + * @return $this + */ + public function setMatchType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\PBMatch\MatchType::class); + $this->match_type = $var; + + return $this; + } + + /** + * The confidence of this match. 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. + * + * Generated from protobuf field float confidence = 5; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The confidence of this match. 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. + * + * Generated from protobuf field float confidence = 5; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch/MatchType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch/MatchType.php new file mode 100644 index 000000000000..313e9941be89 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch/MatchType.php @@ -0,0 +1,107 @@ +google.cloud.dialogflow.cx.v3.Match.MatchType + */ +class MatchType +{ + /** + * Not specified. Should never be used. + * + * Generated from protobuf enum MATCH_TYPE_UNSPECIFIED = 0; + */ + const MATCH_TYPE_UNSPECIFIED = 0; + /** + * The query was matched to an intent. + * + * Generated from protobuf enum INTENT = 1; + */ + const INTENT = 1; + /** + * The query directly triggered an intent. + * + * Generated from protobuf enum DIRECT_INTENT = 2; + */ + const DIRECT_INTENT = 2; + /** + * The query was used for parameter filling. + * + * Generated from protobuf enum PARAMETER_FILLING = 3; + */ + const PARAMETER_FILLING = 3; + /** + * No match was found for the query. + * + * Generated from protobuf enum NO_MATCH = 4; + */ + const NO_MATCH = 4; + /** + * Indicates an empty query. + * + * Generated from protobuf enum NO_INPUT = 5; + */ + const NO_INPUT = 5; + /** + * The query directly triggered an event. + * + * Generated from protobuf enum EVENT = 6; + */ + const EVENT = 6; + /** + * The query was matched to a Knowledge Connector answer. + * + * Generated from protobuf enum KNOWLEDGE_CONNECTOR = 8; + */ + const KNOWLEDGE_CONNECTOR = 8; + /** + * The query was handled by a + * [`Playbook`][google.cloud.dialogflow.cx.v3.Playbook]. + * + * Generated from protobuf enum PLAYBOOK = 9; + */ + const PLAYBOOK = 9; + + private static $valueToName = [ + self::MATCH_TYPE_UNSPECIFIED => 'MATCH_TYPE_UNSPECIFIED', + self::INTENT => 'INTENT', + self::DIRECT_INTENT => 'DIRECT_INTENT', + self::PARAMETER_FILLING => 'PARAMETER_FILLING', + self::NO_MATCH => 'NO_MATCH', + self::NO_INPUT => 'NO_INPUT', + self::EVENT => 'EVENT', + self::KNOWLEDGE_CONNECTOR => 'KNOWLEDGE_CONNECTOR', + self::PLAYBOOK => 'PLAYBOOK', + ]; + + 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(MatchType::class, \Google\Cloud\Dialogflow\Cx\V3\Match_MatchType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Page.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Page.php new file mode 100644 index 000000000000..ec08891a127f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Page.php @@ -0,0 +1,593 @@ +google.cloud.dialogflow.cx.v3.Page + */ +class Page extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the page. + * Required for the + * [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage] method. + * [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage] + * populates the name automatically. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the page, unique within the flow. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * The description of the page. The maximum length is 500 characters. + * + * Generated from protobuf field string description = 19; + */ + protected $description = ''; + /** + * The fulfillment to call when the session is entering the page. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment entry_fulfillment = 7; + */ + protected $entry_fulfillment = null; + /** + * The form associated with the page, used for collecting parameters + * relevant to the page. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form form = 4; + */ + protected $form = null; + /** + * Ordered list of + * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * added to the page. Transition route groups must be unique within a page. If + * the page links both flow-level transition route groups and agent-level + * transition route groups, the flow-level ones will have higher priority and + * will be put before the agent-level ones. + * * If multiple transition routes within a page scope refer to the same + * intent, then the precedence order is: page's transition route -> page's + * transition route group -> flow's transition routes. + * * If multiple transition route groups within a page contain the same + * intent, then the first group in the ordered list takes precedence. + * Format:`projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/` + * for agent-level groups. + * + * Generated from protobuf field repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { + */ + private $transition_route_groups; + /** + * A list of transitions for the transition rules of this page. + * They route the conversation to another page in the same flow, or another + * flow. + * When we are in a certain page, the TransitionRoutes are evaluated in the + * following order: + * * TransitionRoutes defined in the page with intent specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] + * with intent specified. + * * TransitionRoutes defined in flow with intent specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] + * with intent specified. + * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] + * with only condition specified. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; + */ + private $transition_routes; + /** + * Handlers associated with the page to handle events such as webhook errors, + * no match or no input. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; + */ + private $event_handlers; + /** + * Hierarchical advanced settings for this page. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 13; + */ + protected $advanced_settings = null; + /** + * Optional. Knowledge connector configuration. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $knowledge_connector_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the page. + * Required for the + * [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage] method. + * [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage] + * populates the name automatically. + * Format: + * `projects//locations//agents//flows//pages/`. + * @type string $display_name + * Required. The human-readable name of the page, unique within the flow. + * @type string $description + * The description of the page. The maximum length is 500 characters. + * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $entry_fulfillment + * The fulfillment to call when the session is entering the page. + * @type \Google\Cloud\Dialogflow\Cx\V3\Form $form + * The form associated with the page, used for collecting parameters + * relevant to the page. + * @type array|\Google\Protobuf\Internal\RepeatedField $transition_route_groups + * Ordered list of + * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * added to the page. Transition route groups must be unique within a page. If + * the page links both flow-level transition route groups and agent-level + * transition route groups, the flow-level ones will have higher priority and + * will be put before the agent-level ones. + * * If multiple transition routes within a page scope refer to the same + * intent, then the precedence order is: page's transition route -> page's + * transition route group -> flow's transition routes. + * * If multiple transition route groups within a page contain the same + * intent, then the first group in the ordered list takes precedence. + * Format:`projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/` + * for agent-level groups. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $transition_routes + * A list of transitions for the transition rules of this page. + * They route the conversation to another page in the same flow, or another + * flow. + * When we are in a certain page, the TransitionRoutes are evaluated in the + * following order: + * * TransitionRoutes defined in the page with intent specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] + * with intent specified. + * * TransitionRoutes defined in flow with intent specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] + * with intent specified. + * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] + * with only condition specified. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $event_handlers + * Handlers associated with the page to handle events such as webhook errors, + * no match or no input. + * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings + * Hierarchical advanced settings for this page. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * @type \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings $knowledge_connector_settings + * Optional. Knowledge connector configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the page. + * Required for the + * [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage] method. + * [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage] + * populates the name automatically. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the page. + * Required for the + * [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage] method. + * [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage] + * populates the name automatically. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * 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 human-readable name of the page, unique within the flow. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the page, unique within the flow. + * + * 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; + } + + /** + * The description of the page. The maximum length is 500 characters. + * + * Generated from protobuf field string description = 19; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the page. The maximum length is 500 characters. + * + * Generated from protobuf field string description = 19; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The fulfillment to call when the session is entering the page. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment entry_fulfillment = 7; + * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment|null + */ + public function getEntryFulfillment() + { + return $this->entry_fulfillment; + } + + public function hasEntryFulfillment() + { + return isset($this->entry_fulfillment); + } + + public function clearEntryFulfillment() + { + unset($this->entry_fulfillment); + } + + /** + * The fulfillment to call when the session is entering the page. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment entry_fulfillment = 7; + * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var + * @return $this + */ + public function setEntryFulfillment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); + $this->entry_fulfillment = $var; + + return $this; + } + + /** + * The form associated with the page, used for collecting parameters + * relevant to the page. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form form = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\Form|null + */ + public function getForm() + { + return $this->form; + } + + public function hasForm() + { + return isset($this->form); + } + + public function clearForm() + { + unset($this->form); + } + + /** + * The form associated with the page, used for collecting parameters + * relevant to the page. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form form = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\Form $var + * @return $this + */ + public function setForm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Form::class); + $this->form = $var; + + return $this; + } + + /** + * Ordered list of + * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * added to the page. Transition route groups must be unique within a page. If + * the page links both flow-level transition route groups and agent-level + * transition route groups, the flow-level ones will have higher priority and + * will be put before the agent-level ones. + * * If multiple transition routes within a page scope refer to the same + * intent, then the precedence order is: page's transition route -> page's + * transition route group -> flow's transition routes. + * * If multiple transition route groups within a page contain the same + * intent, then the first group in the ordered list takes precedence. + * Format:`projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/` + * for agent-level groups. + * + * Generated from protobuf field repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitionRouteGroups() + { + return $this->transition_route_groups; + } + + /** + * Ordered list of + * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * added to the page. Transition route groups must be unique within a page. If + * the page links both flow-level transition route groups and agent-level + * transition route groups, the flow-level ones will have higher priority and + * will be put before the agent-level ones. + * * If multiple transition routes within a page scope refer to the same + * intent, then the precedence order is: page's transition route -> page's + * transition route group -> flow's transition routes. + * * If multiple transition route groups within a page contain the same + * intent, then the first group in the ordered list takes precedence. + * Format:`projects//locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/` + * for agent-level groups. + * + * Generated from protobuf field repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitionRouteGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->transition_route_groups = $arr; + + return $this; + } + + /** + * A list of transitions for the transition rules of this page. + * They route the conversation to another page in the same flow, or another + * flow. + * When we are in a certain page, the TransitionRoutes are evaluated in the + * following order: + * * TransitionRoutes defined in the page with intent specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] + * with intent specified. + * * TransitionRoutes defined in flow with intent specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] + * with intent specified. + * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] + * with only condition specified. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitionRoutes() + { + return $this->transition_routes; + } + + /** + * A list of transitions for the transition rules of this page. + * They route the conversation to another page in the same flow, or another + * flow. + * When we are in a certain page, the TransitionRoutes are evaluated in the + * following order: + * * TransitionRoutes defined in the page with intent specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] + * with intent specified. + * * TransitionRoutes defined in flow with intent specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] + * with intent specified. + * * TransitionRoutes defined in the page with only condition specified. + * * TransitionRoutes defined in the + * [transition route + * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] + * with only condition specified. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitionRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute::class); + $this->transition_routes = $arr; + + return $this; + } + + /** + * Handlers associated with the page to handle events such as webhook errors, + * no match or no input. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventHandlers() + { + return $this->event_handlers; + } + + /** + * Handlers associated with the page to handle events such as webhook errors, + * no match or no input. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventHandlers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\EventHandler::class); + $this->event_handlers = $arr; + + return $this; + } + + /** + * Hierarchical advanced settings for this page. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 13; + * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null + */ + public function getAdvancedSettings() + { + return $this->advanced_settings; + } + + public function hasAdvancedSettings() + { + return isset($this->advanced_settings); + } + + public function clearAdvancedSettings() + { + unset($this->advanced_settings); + } + + /** + * Hierarchical advanced settings for this page. The settings exposed at the + * lower level overrides the settings exposed at the higher level. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 13; + * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var + * @return $this + */ + public function setAdvancedSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); + $this->advanced_settings = $var; + + return $this; + } + + /** + * Optional. Knowledge connector configuration. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings|null + */ + public function getKnowledgeConnectorSettings() + { + return $this->knowledge_connector_settings; + } + + public function hasKnowledgeConnectorSettings() + { + return isset($this->knowledge_connector_settings); + } + + public function clearKnowledgeConnectorSettings() + { + unset($this->knowledge_connector_settings); + } + + /** + * Optional. Knowledge connector configuration. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings $var + * @return $this + */ + public function setKnowledgeConnectorSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings::class); + $this->knowledge_connector_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo.php new file mode 100644 index 000000000000..e2d569fa7233 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo.php @@ -0,0 +1,185 @@ +google.cloud.dialogflow.cx.v3.PageInfo + */ +class PageInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * unique identifier of the current page. Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string current_page = 1 [(.google.api.resource_reference) = { + */ + protected $current_page = ''; + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * display name of the current page. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Information about the form. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo form_info = 3; + */ + protected $form_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $current_page + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * unique identifier of the current page. Format: + * `projects//locations//agents//flows//pages/`. + * @type string $display_name + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * display name of the current page. + * @type \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo $form_info + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Information about the form. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * unique identifier of the current page. Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string current_page = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getCurrentPage() + { + return $this->current_page; + } + + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * unique identifier of the current page. Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string current_page = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCurrentPage($var) + { + GPBUtil::checkString($var, True); + $this->current_page = $var; + + return $this; + } + + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * display name of the current page. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * display name of the current page. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Information about the form. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo form_info = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo|null + */ + public function getFormInfo() + { + return $this->form_info; + } + + public function hasFormInfo() + { + return isset($this->form_info); + } + + public function clearFormInfo() + { + unset($this->form_info); + } + + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Information about the form. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo form_info = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo $var + * @return $this + */ + public function setFormInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo::class); + $this->form_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo.php new file mode 100644 index 000000000000..2c66c6495bd4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo.php @@ -0,0 +1,86 @@ +google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + */ +class FormInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * parameters contained in the form. Note that the webhook cannot add or + * remove any form parameter. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo parameter_info = 2; + */ + private $parameter_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo\ParameterInfo>|\Google\Protobuf\Internal\RepeatedField $parameter_info + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * parameters contained in the form. Note that the webhook cannot add or + * remove any form parameter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * parameters contained in the form. Note that the webhook cannot add or + * remove any form parameter. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo parameter_info = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameterInfo() + { + return $this->parameter_info; + } + + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * parameters contained in the form. Note that the webhook cannot add or + * remove any form parameter. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo parameter_info = 2; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo\ParameterInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameterInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo\ParameterInfo::class); + $this->parameter_info = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FormInfo::class, \Google\Cloud\Dialogflow\Cx\V3\PageInfo_FormInfo::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo.php new file mode 100644 index 000000000000..cea8c45abfd7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo.php @@ -0,0 +1,316 @@ +google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + */ +class ParameterInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. + * Required for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * The human-readable name of the parameter, unique within the form. This + * field cannot be modified by the webhook. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Indicates whether the parameter is required. Optional parameters will + * not trigger prompts; however, they are filled if the user specifies + * them. Required parameters must be filled before form filling concludes. + * + * Generated from protobuf field bool required = 2; + */ + protected $required = false; + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. + * Required for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * state of the parameter. This field can be set to + * [INVALID][google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID] + * by the webhook to invalidate the parameter; other values set by the + * webhook will be ignored. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState state = 3; + */ + protected $state = 0; + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * value of the parameter. This field can be set by the webhook to change + * the parameter value. + * + * Generated from protobuf field .google.protobuf.Value value = 4; + */ + protected $value = null; + /** + * Optional for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored + * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Indicates if the parameter value was just collected on the last + * conversation turn. + * + * Generated from protobuf field bool just_collected = 5; + */ + protected $just_collected = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. + * Required for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * The human-readable name of the parameter, unique within the form. This + * field cannot be modified by the webhook. + * @type bool $required + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Indicates whether the parameter is required. Optional parameters will + * not trigger prompts; however, they are filled if the user specifies + * them. Required parameters must be filled before form filling concludes. + * @type int $state + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. + * Required for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * state of the parameter. This field can be set to + * [INVALID][google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID] + * by the webhook to invalidate the parameter; other values set by the + * webhook will be ignored. + * @type \Google\Protobuf\Value $value + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * value of the parameter. This field can be set by the webhook to change + * the parameter value. + * @type bool $just_collected + * Optional for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored + * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Indicates if the parameter value was just collected on the last + * conversation turn. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. + * Required for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * The human-readable name of the parameter, unique within the form. This + * field cannot be modified by the webhook. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. + * Required for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * The human-readable name of the parameter, unique within the form. This + * field cannot be modified by the webhook. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Indicates whether the parameter is required. Optional parameters will + * not trigger prompts; however, they are filled if the user specifies + * them. Required parameters must be filled before form filling concludes. + * + * Generated from protobuf field bool required = 2; + * @return bool + */ + public function getRequired() + { + return $this->required; + } + + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Indicates whether the parameter is required. Optional parameters will + * not trigger prompts; however, they are filled if the user specifies + * them. Required parameters must be filled before form filling concludes. + * + * Generated from protobuf field bool required = 2; + * @param bool $var + * @return $this + */ + public function setRequired($var) + { + GPBUtil::checkBool($var); + $this->required = $var; + + return $this; + } + + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. + * Required for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * state of the parameter. This field can be set to + * [INVALID][google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID] + * by the webhook to invalidate the parameter; other values set by the + * webhook will be ignored. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. + * Required for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * state of the parameter. This field can be set to + * [INVALID][google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID] + * by the webhook to invalidate the parameter; other values set by the + * webhook will be ignored. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo\ParameterInfo\ParameterState::class); + $this->state = $var; + + return $this; + } + + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * value of the parameter. This field can be set by the webhook to change + * the parameter value. + * + * Generated from protobuf field .google.protobuf.Value value = 4; + * @return \Google\Protobuf\Value|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * Optional for both + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * value of the parameter. This field can be set by the webhook to change + * the parameter value. + * + * Generated from protobuf field .google.protobuf.Value value = 4; + * @param \Google\Protobuf\Value $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); + $this->value = $var; + + return $this; + } + + /** + * Optional for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored + * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Indicates if the parameter value was just collected on the last + * conversation turn. + * + * Generated from protobuf field bool just_collected = 5; + * @return bool + */ + public function getJustCollected() + { + return $this->just_collected; + } + + /** + * Optional for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored + * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * Indicates if the parameter value was just collected on the last + * conversation turn. + * + * Generated from protobuf field bool just_collected = 5; + * @param bool $var + * @return $this + */ + public function setJustCollected($var) + { + GPBUtil::checkBool($var); + $this->just_collected = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ParameterInfo::class, \Google\Cloud\Dialogflow\Cx\V3\PageInfo_FormInfo_ParameterInfo::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo/ParameterState.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo/ParameterState.php new file mode 100644 index 000000000000..52170391742b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo/ParameterState.php @@ -0,0 +1,77 @@ +google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState + */ +class ParameterState +{ + /** + * Not specified. This value should be never used. + * + * Generated from protobuf enum PARAMETER_STATE_UNSPECIFIED = 0; + */ + const PARAMETER_STATE_UNSPECIFIED = 0; + /** + * Indicates that the parameter does not have a value. + * + * Generated from protobuf enum EMPTY = 1; + */ + const PBEMPTY = 1; + /** + * Indicates that the parameter value is invalid. This field can be used + * by the webhook to invalidate the parameter and ask the server to + * collect it from the user again. + * + * Generated from protobuf enum INVALID = 2; + */ + const INVALID = 2; + /** + * Indicates that the parameter has a value. + * + * Generated from protobuf enum FILLED = 3; + */ + const FILLED = 3; + + private static $valueToName = [ + self::PARAMETER_STATE_UNSPECIFIED => 'PARAMETER_STATE_UNSPECIFIED', + self::PBEMPTY => 'EMPTY', + self::INVALID => 'INVALID', + self::FILLED => 'FILLED', + ]; + + 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(ParameterState::class, \Google\Cloud\Dialogflow\Cx\V3\PageInfo_FormInfo_ParameterInfo_ParameterState::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php new file mode 100644 index 000000000000..bc51d383a3ca --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php @@ -0,0 +1,188 @@ +google.cloud.dialogflow.cx.v3.ParameterDefinition + */ +class ParameterDefinition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of parameter. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Type of parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * @deprecated + */ + protected $type = 0; + /** + * Optional. Type schema of parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type_schema = null; + /** + * Human-readable description of the parameter. Limited to 300 characters. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of parameter. + * @type int $type + * Type of parameter. + * @type \Google\Cloud\Dialogflow\Cx\V3\TypeSchema $type_schema + * Optional. Type schema of parameter. + * @type string $description + * Human-readable description of the parameter. Limited to 300 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of parameter. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of parameter. + * + * 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; + } + + /** + * Type of parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * @return int + * @deprecated + */ + public function getType() + { + if ($this->type !== 0) { + @trigger_error('type is deprecated.', E_USER_DEPRECATED); + } + return $this->type; + } + + /** + * Type of parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setType($var) + { + @trigger_error('type is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition\ParameterType::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. Type schema of parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\TypeSchema|null + */ + public function getTypeSchema() + { + return $this->type_schema; + } + + public function hasTypeSchema() + { + return isset($this->type_schema); + } + + public function clearTypeSchema() + { + unset($this->type_schema); + } + + /** + * Optional. Type schema of parameter. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\TypeSchema $var + * @return $this + */ + public function setTypeSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TypeSchema::class); + $this->type_schema = $var; + + return $this; + } + + /** + * Human-readable description of the parameter. Limited to 300 characters. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Human-readable description of the parameter. Limited to 300 characters. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition/ParameterType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition/ParameterType.php new file mode 100644 index 000000000000..74b61b956f03 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition/ParameterType.php @@ -0,0 +1,98 @@ +google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType + */ +class ParameterType +{ + /** + * Not specified. No validation will be performed. + * + * Generated from protobuf enum PARAMETER_TYPE_UNSPECIFIED = 0; + */ + const PARAMETER_TYPE_UNSPECIFIED = 0; + /** + * Represents any string value. + * + * Generated from protobuf enum STRING = 1; + */ + const STRING = 1; + /** + * Represents any number value. + * + * Generated from protobuf enum NUMBER = 2; + */ + const NUMBER = 2; + /** + * Represents a boolean value. + * + * Generated from protobuf enum BOOLEAN = 3; + */ + const BOOLEAN = 3; + /** + * Represents a null value. + * + * Generated from protobuf enum NULL = 4; + */ + const NULL = 4; + /** + * Represents any object value. + * + * Generated from protobuf enum OBJECT = 5; + */ + const OBJECT = 5; + /** + * Represents a repeated value. + * + * Generated from protobuf enum LIST = 6; + */ + const PBLIST = 6; + + private static $valueToName = [ + self::PARAMETER_TYPE_UNSPECIFIED => 'PARAMETER_TYPE_UNSPECIFIED', + self::STRING => 'STRING', + self::NUMBER => 'NUMBER', + self::BOOLEAN => 'BOOLEAN', + self::NULL => 'NULL', + self::OBJECT => 'OBJECT', + self::PBLIST => 'LIST', + ]; + + 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(ParameterType::class, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition_ParameterType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Phrase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Phrase.php new file mode 100644 index 000000000000..e5a15744098e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Phrase.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.cx.v3.Phrase + */ +class Phrase extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Text input which can be used for prompt or banned phrases. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Required. Text input which can be used for prompt or banned phrases. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Text input which can be used for prompt or banned phrases. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. Text input which can be used for prompt or banned phrases. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook.php new file mode 100644 index 000000000000..2f0a01b746a2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook.php @@ -0,0 +1,723 @@ +google.cloud.dialogflow.cx.v3.Playbook + */ +class Playbook extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the playbook, unique within an agent. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. High level description of the goal the playbook intend to + * accomplish. A goal should be concise since it's visible to other playbooks + * that may reference this playbook. + * + * Generated from protobuf field string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $goal = ''; + /** + * Optional. Defined structured input parameters for this playbook. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $input_parameter_definitions; + /** + * Optional. Defined structured output parameters for this playbook. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $output_parameter_definitions; + /** + * Instruction to accomplish target goal. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + */ + protected $instruction = null; + /** + * Output only. Estimated number of tokes current playbook takes when sent to + * the LLM. + * + * Generated from protobuf field int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $token_count = 0; + /** + * Output only. The timestamp of initial playbook creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last time the playbook version was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The resource name of other playbooks referenced by the current + * playbook in the instructions. + * + * Generated from protobuf field repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $referenced_playbooks; + /** + * Output only. The resource name of flows referenced by the current playbook + * in the instructions. + * + * Generated from protobuf field repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $referenced_flows; + /** + * Optional. The resource name of tools referenced by the current playbook in + * the instructions. If not provided explicitly, they are will + * be implied using the tool being referenced in goal and steps. + * + * Generated from protobuf field repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $referenced_tools; + /** + * Optional. Output only. Names of inline actions scoped to this playbook. + * These actions are in addition to those belonging to referenced tools, child + * playbooks, and flows, e.g. actions that are defined in the playbook's code + * block. + * + * Generated from protobuf field repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $inline_actions; + /** + * Optional. The playbook's scoped code block, which may implement handlers + * and actions. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $code_block = null; + /** + * Optional. Llm model settings for the playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $llm_model_settings = null; + /** + * Optional. A list of registered handlers to execuate based on the specified + * triggers. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $handlers; + /** + * Optional. Type of the playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $playbook_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * @type string $display_name + * Required. The human-readable name of the playbook, unique within an agent. + * @type string $goal + * Required. High level description of the goal the playbook intend to + * accomplish. A goal should be concise since it's visible to other playbooks + * that may reference this playbook. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $input_parameter_definitions + * Optional. Defined structured input parameters for this playbook. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $output_parameter_definitions + * Optional. Defined structured output parameters for this playbook. + * @type \Google\Cloud\Dialogflow\Cx\V3\Playbook\Instruction $instruction + * Instruction to accomplish target goal. + * @type int|string $token_count + * Output only. Estimated number of tokes current playbook takes when sent to + * the LLM. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp of initial playbook creation. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last time the playbook version was updated. + * @type array|\Google\Protobuf\Internal\RepeatedField $referenced_playbooks + * Output only. The resource name of other playbooks referenced by the current + * playbook in the instructions. + * @type array|\Google\Protobuf\Internal\RepeatedField $referenced_flows + * Output only. The resource name of flows referenced by the current playbook + * in the instructions. + * @type array|\Google\Protobuf\Internal\RepeatedField $referenced_tools + * Optional. The resource name of tools referenced by the current playbook in + * the instructions. If not provided explicitly, they are will + * be implied using the tool being referenced in goal and steps. + * @type array|\Google\Protobuf\Internal\RepeatedField $inline_actions + * Optional. Output only. Names of inline actions scoped to this playbook. + * These actions are in addition to those belonging to referenced tools, child + * playbooks, and flows, e.g. actions that are defined in the playbook's code + * block. + * @type \Google\Cloud\Dialogflow\Cx\V3\CodeBlock $code_block + * Optional. The playbook's scoped code block, which may implement handlers + * and actions. + * @type \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $llm_model_settings + * Optional. Llm model settings for the playbook. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Handler>|\Google\Protobuf\Internal\RepeatedField $handlers + * Optional. A list of registered handlers to execuate based on the specified + * triggers. + * @type int $playbook_type + * Optional. Type of the playbook. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * 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 human-readable name of the playbook, unique within an 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 human-readable name of the playbook, unique within an 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. High level description of the goal the playbook intend to + * accomplish. A goal should be concise since it's visible to other playbooks + * that may reference this playbook. + * + * Generated from protobuf field string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGoal() + { + return $this->goal; + } + + /** + * Required. High level description of the goal the playbook intend to + * accomplish. A goal should be concise since it's visible to other playbooks + * that may reference this playbook. + * + * Generated from protobuf field string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGoal($var) + { + GPBUtil::checkString($var, True); + $this->goal = $var; + + return $this; + } + + /** + * Optional. Defined structured input parameters for this playbook. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputParameterDefinitions() + { + return $this->input_parameter_definitions; + } + + /** + * Optional. Defined structured input parameters for this playbook. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputParameterDefinitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::class); + $this->input_parameter_definitions = $arr; + + return $this; + } + + /** + * Optional. Defined structured output parameters for this playbook. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOutputParameterDefinitions() + { + return $this->output_parameter_definitions; + } + + /** + * Optional. Defined structured output parameters for this playbook. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOutputParameterDefinitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::class); + $this->output_parameter_definitions = $arr; + + return $this; + } + + /** + * Instruction to accomplish target goal. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + * @return \Google\Cloud\Dialogflow\Cx\V3\Playbook\Instruction|null + */ + public function getInstruction() + { + return $this->instruction; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Instruction to accomplish target goal. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + * @param \Google\Cloud\Dialogflow\Cx\V3\Playbook\Instruction $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Playbook\Instruction::class); + $this->instruction = $var; + + return $this; + } + + /** + * Output only. Estimated number of tokes current playbook takes when sent to + * the LLM. + * + * Generated from protobuf field int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTokenCount() + { + return $this->token_count; + } + + /** + * Output only. Estimated number of tokes current playbook takes when sent to + * the LLM. + * + * Generated from protobuf field int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTokenCount($var) + { + GPBUtil::checkInt64($var); + $this->token_count = $var; + + return $this; + } + + /** + * Output only. The timestamp of initial playbook creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.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 timestamp of initial playbook creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.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. Last time the playbook version was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.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. Last time the playbook version was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The resource name of other playbooks referenced by the current + * playbook in the instructions. + * + * Generated from protobuf field repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferencedPlaybooks() + { + return $this->referenced_playbooks; + } + + /** + * Output only. The resource name of other playbooks referenced by the current + * playbook in the instructions. + * + * Generated from protobuf field repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferencedPlaybooks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->referenced_playbooks = $arr; + + return $this; + } + + /** + * Output only. The resource name of flows referenced by the current playbook + * in the instructions. + * + * Generated from protobuf field repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferencedFlows() + { + return $this->referenced_flows; + } + + /** + * Output only. The resource name of flows referenced by the current playbook + * in the instructions. + * + * Generated from protobuf field repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferencedFlows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->referenced_flows = $arr; + + return $this; + } + + /** + * Optional. The resource name of tools referenced by the current playbook in + * the instructions. If not provided explicitly, they are will + * be implied using the tool being referenced in goal and steps. + * + * Generated from protobuf field repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferencedTools() + { + return $this->referenced_tools; + } + + /** + * Optional. The resource name of tools referenced by the current playbook in + * the instructions. If not provided explicitly, they are will + * be implied using the tool being referenced in goal and steps. + * + * Generated from protobuf field repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferencedTools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->referenced_tools = $arr; + + return $this; + } + + /** + * Optional. Output only. Names of inline actions scoped to this playbook. + * These actions are in addition to those belonging to referenced tools, child + * playbooks, and flows, e.g. actions that are defined in the playbook's code + * block. + * + * Generated from protobuf field repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInlineActions() + { + return $this->inline_actions; + } + + /** + * Optional. Output only. Names of inline actions scoped to this playbook. + * These actions are in addition to those belonging to referenced tools, child + * playbooks, and flows, e.g. actions that are defined in the playbook's code + * block. + * + * Generated from protobuf field repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInlineActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->inline_actions = $arr; + + return $this; + } + + /** + * Optional. The playbook's scoped code block, which may implement handlers + * and actions. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\CodeBlock|null + */ + public function getCodeBlock() + { + return $this->code_block; + } + + public function hasCodeBlock() + { + return isset($this->code_block); + } + + public function clearCodeBlock() + { + unset($this->code_block); + } + + /** + * Optional. The playbook's scoped code block, which may implement handlers + * and actions. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\CodeBlock $var + * @return $this + */ + public function setCodeBlock($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\CodeBlock::class); + $this->code_block = $var; + + return $this; + } + + /** + * Optional. Llm model settings for the playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings|null + */ + public function getLlmModelSettings() + { + return $this->llm_model_settings; + } + + public function hasLlmModelSettings() + { + return isset($this->llm_model_settings); + } + + public function clearLlmModelSettings() + { + unset($this->llm_model_settings); + } + + /** + * Optional. Llm model settings for the playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $var + * @return $this + */ + public function setLlmModelSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings::class); + $this->llm_model_settings = $var; + + return $this; + } + + /** + * Optional. A list of registered handlers to execuate based on the specified + * triggers. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHandlers() + { + return $this->handlers; + } + + /** + * Optional. A list of registered handlers to execuate based on the specified + * triggers. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Handler>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHandlers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Handler::class); + $this->handlers = $arr; + + return $this; + } + + /** + * Optional. Type of the playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPlaybookType() + { + return $this->playbook_type; + } + + /** + * Optional. Type of the playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPlaybookType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Playbook\PlaybookType::class); + $this->playbook_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Instruction.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Instruction.php new file mode 100644 index 000000000000..f643a6ec1f67 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Instruction.php @@ -0,0 +1,116 @@ +google.cloud.dialogflow.cx.v3.Playbook.Instruction + */ +class Instruction extends \Google\Protobuf\Internal\Message +{ + /** + * General guidelines for the playbook. These are unstructured instructions + * that are not directly part of the goal, e.g. "Always be polite". It's + * valid for this text to be long and used instead of steps altogether. + * + * Generated from protobuf field string guidelines = 1; + */ + protected $guidelines = ''; + /** + * Ordered list of step by step execution instructions to accomplish + * target goal. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + private $steps; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $guidelines + * General guidelines for the playbook. These are unstructured instructions + * that are not directly part of the goal, e.g. "Always be polite". It's + * valid for this text to be long and used instead of steps altogether. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Playbook\Step>|\Google\Protobuf\Internal\RepeatedField $steps + * Ordered list of step by step execution instructions to accomplish + * target goal. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * General guidelines for the playbook. These are unstructured instructions + * that are not directly part of the goal, e.g. "Always be polite". It's + * valid for this text to be long and used instead of steps altogether. + * + * Generated from protobuf field string guidelines = 1; + * @return string + */ + public function getGuidelines() + { + return $this->guidelines; + } + + /** + * General guidelines for the playbook. These are unstructured instructions + * that are not directly part of the goal, e.g. "Always be polite". It's + * valid for this text to be long and used instead of steps altogether. + * + * Generated from protobuf field string guidelines = 1; + * @param string $var + * @return $this + */ + public function setGuidelines($var) + { + GPBUtil::checkString($var, True); + $this->guidelines = $var; + + return $this; + } + + /** + * Ordered list of step by step execution instructions to accomplish + * target goal. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * Ordered list of step by step execution instructions to accomplish + * target goal. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Playbook\Step>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Playbook\Step::class); + $this->steps = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Instruction::class, \Google\Cloud\Dialogflow\Cx\V3\Playbook_Instruction::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/PlaybookType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/PlaybookType.php new file mode 100644 index 000000000000..9e840b77293c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/PlaybookType.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.Playbook.PlaybookType + */ +class PlaybookType +{ + /** + * Unspecified type. Default to TASK. + * + * Generated from protobuf enum PLAYBOOK_TYPE_UNSPECIFIED = 0; + */ + const PLAYBOOK_TYPE_UNSPECIFIED = 0; + /** + * Task playbook. + * + * Generated from protobuf enum TASK = 1; + */ + const TASK = 1; + /** + * Routine playbook. + * + * Generated from protobuf enum ROUTINE = 3; + */ + const ROUTINE = 3; + + private static $valueToName = [ + self::PLAYBOOK_TYPE_UNSPECIFIED => 'PLAYBOOK_TYPE_UNSPECIFIED', + self::TASK => 'TASK', + self::ROUTINE => 'ROUTINE', + ]; + + 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(PlaybookType::class, \Google\Cloud\Dialogflow\Cx\V3\Playbook_PlaybookType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Step.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Step.php new file mode 100644 index 000000000000..38fbeebb8a3c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Step.php @@ -0,0 +1,112 @@ +google.cloud.dialogflow.cx.v3.Playbook.Step + */ +class Step extends \Google\Protobuf\Internal\Message +{ + /** + * Sub-processing needed to execute the current step. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + private $steps; + protected $instruction; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Step instruction in text format. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Playbook\Step>|\Google\Protobuf\Internal\RepeatedField $steps + * Sub-processing needed to execute the current step. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Step instruction in text format. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * Step instruction in text format. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Sub-processing needed to execute the current step. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * Sub-processing needed to execute the current step. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Playbook\Step>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Playbook\Step::class); + $this->steps = $arr; + + return $this; + } + + /** + * @return string + */ + public function getInstruction() + { + return $this->whichOneof("instruction"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Step::class, \Google\Cloud\Dialogflow\Cx\V3\Playbook_Step::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookImportStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookImportStrategy.php new file mode 100644 index 000000000000..ea9ad2eafd83 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookImportStrategy.php @@ -0,0 +1,161 @@ +google.cloud.dialogflow.cx.v3.PlaybookImportStrategy + */ +class PlaybookImportStrategy extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Specifies the import strategy used when resolving conflicts with + * the main playbook. If not specified, 'CREATE_NEW' is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $main_playbook_import_strategy = 0; + /** + * Optional. Specifies the import strategy used when resolving referenced + * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $nested_resource_import_strategy = 0; + /** + * Optional. Specifies the import strategy used when resolving tool conflicts. + * If not specified, 'CREATE_NEW' is assumed. This will be applied after the + * main playbook and nested resource import strategies, meaning if the + * playbook that references the tool is skipped, the tool will also be + * skipped. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tool_import_strategy = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $main_playbook_import_strategy + * Optional. Specifies the import strategy used when resolving conflicts with + * the main playbook. If not specified, 'CREATE_NEW' is assumed. + * @type int $nested_resource_import_strategy + * Optional. Specifies the import strategy used when resolving referenced + * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed. + * @type int $tool_import_strategy + * Optional. Specifies the import strategy used when resolving tool conflicts. + * If not specified, 'CREATE_NEW' is assumed. This will be applied after the + * main playbook and nested resource import strategies, meaning if the + * playbook that references the tool is skipped, the tool will also be + * skipped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Specifies the import strategy used when resolving conflicts with + * the main playbook. If not specified, 'CREATE_NEW' is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMainPlaybookImportStrategy() + { + return $this->main_playbook_import_strategy; + } + + /** + * Optional. Specifies the import strategy used when resolving conflicts with + * the main playbook. If not specified, 'CREATE_NEW' is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMainPlaybookImportStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportStrategy::class); + $this->main_playbook_import_strategy = $var; + + return $this; + } + + /** + * Optional. Specifies the import strategy used when resolving referenced + * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNestedResourceImportStrategy() + { + return $this->nested_resource_import_strategy; + } + + /** + * Optional. Specifies the import strategy used when resolving referenced + * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNestedResourceImportStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportStrategy::class); + $this->nested_resource_import_strategy = $var; + + return $this; + } + + /** + * Optional. Specifies the import strategy used when resolving tool conflicts. + * If not specified, 'CREATE_NEW' is assumed. This will be applied after the + * main playbook and nested resource import strategies, meaning if the + * playbook that references the tool is skipped, the tool will also be + * skipped. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getToolImportStrategy() + { + return $this->tool_import_strategy; + } + + /** + * Optional. Specifies the import strategy used when resolving tool conflicts. + * If not specified, 'CREATE_NEW' is assumed. This will be applied after the + * main playbook and nested resource import strategies, meaning if the + * playbook that references the tool is skipped, the tool will also be + * skipped. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setToolImportStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportStrategy::class); + $this->tool_import_strategy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInput.php new file mode 100644 index 000000000000..af15dc2b9b4c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInput.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.cx.v3.PlaybookInput + */ +class PlaybookInput extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Summary string of the preceding conversation for the child + * playbook invocation. + * + * Generated from protobuf field string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preceding_conversation_summary = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $preceding_conversation_summary + * Optional. Summary string of the preceding conversation for the child + * playbook invocation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Summary string of the preceding conversation for the child + * playbook invocation. + * + * Generated from protobuf field string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrecedingConversationSummary() + { + return $this->preceding_conversation_summary; + } + + /** + * Optional. Summary string of the preceding conversation for the child + * playbook invocation. + * + * Generated from protobuf field string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrecedingConversationSummary($var) + { + GPBUtil::checkString($var, True); + $this->preceding_conversation_summary = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInvocation.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInvocation.php new file mode 100644 index 000000000000..25a4f80d2b90 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInvocation.php @@ -0,0 +1,231 @@ +google.cloud.dialogflow.cx.v3.PlaybookInvocation + */ +class PlaybookInvocation extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $playbook = ''; + /** + * Output only. The display name of the playbook. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Optional. Input of the child playbook invocation. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $playbook_input = null; + /** + * Optional. Output of the child playbook invocation. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $playbook_output = null; + /** + * Required. Playbook invocation's output state. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $playbook_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $playbook + * Required. The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * @type string $display_name + * Output only. The display name of the playbook. + * @type \Google\Cloud\Dialogflow\Cx\V3\PlaybookInput $playbook_input + * Optional. Input of the child playbook invocation. + * @type \Google\Cloud\Dialogflow\Cx\V3\PlaybookOutput $playbook_output + * Optional. Output of the child playbook invocation. + * @type int $playbook_state + * Required. Playbook invocation's output state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPlaybook() + { + return $this->playbook; + } + + /** + * Required. The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPlaybook($var) + { + GPBUtil::checkString($var, True); + $this->playbook = $var; + + return $this; + } + + /** + * Output only. The display name of the playbook. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name of the playbook. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Input of the child playbook invocation. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\PlaybookInput|null + */ + public function getPlaybookInput() + { + return $this->playbook_input; + } + + public function hasPlaybookInput() + { + return isset($this->playbook_input); + } + + public function clearPlaybookInput() + { + unset($this->playbook_input); + } + + /** + * Optional. Input of the child playbook invocation. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\PlaybookInput $var + * @return $this + */ + public function setPlaybookInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PlaybookInput::class); + $this->playbook_input = $var; + + return $this; + } + + /** + * Optional. Output of the child playbook invocation. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\PlaybookOutput|null + */ + public function getPlaybookOutput() + { + return $this->playbook_output; + } + + public function hasPlaybookOutput() + { + return isset($this->playbook_output); + } + + public function clearPlaybookOutput() + { + unset($this->playbook_output); + } + + /** + * Optional. Output of the child playbook invocation. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\PlaybookOutput $var + * @return $this + */ + public function setPlaybookOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PlaybookOutput::class); + $this->playbook_output = $var; + + return $this; + } + + /** + * Required. Playbook invocation's output state. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPlaybookState() + { + return $this->playbook_state; + } + + /** + * Required. Playbook invocation's output state. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPlaybookState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\OutputState::class); + $this->playbook_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookOutput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookOutput.php new file mode 100644 index 000000000000..0d28987f6d64 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookOutput.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.cx.v3.PlaybookOutput + */ +class PlaybookOutput extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Summary string of the execution result of the child playbook. + * + * Generated from protobuf field string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $execution_summary = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $execution_summary + * Optional. Summary string of the execution result of the child playbook. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Summary string of the execution result of the child playbook. + * + * Generated from protobuf field string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getExecutionSummary() + { + return $this->execution_summary; + } + + /** + * Optional. Summary string of the execution result of the child playbook. + * + * Generated from protobuf field string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setExecutionSummary($var) + { + GPBUtil::checkString($var, True); + $this->execution_summary = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookTransition.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookTransition.php new file mode 100644 index 000000000000..50316facd635 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookTransition.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.PlaybookTransition + */ +class PlaybookTransition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $playbook = ''; + /** + * Output only. The display name of the playbook. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $playbook + * Required. The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * @type string $display_name + * Output only. The display name of the playbook. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPlaybook() + { + return $this->playbook; + } + + /** + * Required. The unique identifier of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPlaybook($var) + { + GPBUtil::checkString($var, True); + $this->playbook = $var; + + return $this; + } + + /** + * Output only. The display name of the playbook. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name of the playbook. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookVersion.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookVersion.php new file mode 100644 index 000000000000..51c9821de0f8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookVersion.php @@ -0,0 +1,235 @@ +google.cloud.dialogflow.cx.v3.PlaybookVersion + */ +class PlaybookVersion extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. The description of the playbook version. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Snapshot of the playbook when the playbook version is created. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $playbook = null; + /** + * Output only. Snapshot of the examples belonging to the playbook when the + * playbook version is created. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $examples; + /** + * Output only. Last time the playbook version was created or modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * @type string $description + * Optional. The description of the playbook version. + * @type \Google\Cloud\Dialogflow\Cx\V3\Playbook $playbook + * Output only. Snapshot of the playbook when the playbook version is created. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Example>|\Google\Protobuf\Internal\RepeatedField $examples + * Output only. Snapshot of the examples belonging to the playbook when the + * playbook version is created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last time the playbook version was created or modified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * + * 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 description of the playbook version. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of the playbook 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. Snapshot of the playbook when the playbook version is created. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Playbook|null + */ + public function getPlaybook() + { + return $this->playbook; + } + + public function hasPlaybook() + { + return isset($this->playbook); + } + + public function clearPlaybook() + { + unset($this->playbook); + } + + /** + * Output only. Snapshot of the playbook when the playbook version is created. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Playbook $var + * @return $this + */ + public function setPlaybook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Playbook::class); + $this->playbook = $var; + + return $this; + } + + /** + * Output only. Snapshot of the examples belonging to the playbook when the + * playbook version is created. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExamples() + { + return $this->examples; + } + + /** + * Output only. Snapshot of the examples belonging to the playbook when the + * playbook version is created. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Example>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExamples($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Example::class); + $this->examples = $arr; + + return $this; + } + + /** + * Output only. Last time the playbook version was created or modified. + * + * 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. Last time the playbook version was created or modified. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryInput.php new file mode 100644 index 000000000000..3e09b697faa5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryInput.php @@ -0,0 +1,292 @@ +google.cloud.dialogflow.cx.v3.QueryInput + */ +class QueryInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The language of the input. See [Language + * Support](https://cloud.google.com/dialogflow/cx/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 = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $language_code = ''; + protected $input; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\TextInput $text + * The natural language text to be processed. + * @type \Google\Cloud\Dialogflow\Cx\V3\IntentInput $intent + * The intent to be triggered. + * @type \Google\Cloud\Dialogflow\Cx\V3\AudioInput $audio + * The natural language speech audio to be processed. + * @type \Google\Cloud\Dialogflow\Cx\V3\EventInput $event + * The event to be triggered. + * @type \Google\Cloud\Dialogflow\Cx\V3\DtmfInput $dtmf + * The DTMF event to be handled. + * @type \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult $tool_call_result + * The results of a tool executed by the client. + * @type string $language_code + * Required. The language of the input. See [Language + * Support](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * The natural language text to be processed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TextInput text = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\TextInput|null + */ + public function getText() + { + return $this->readOneof(2); + } + + public function hasText() + { + return $this->hasOneof(2); + } + + /** + * The natural language text to be processed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TextInput text = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\TextInput $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TextInput::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The intent to be triggered. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentInput intent = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\IntentInput|null + */ + public function getIntent() + { + return $this->readOneof(3); + } + + public function hasIntent() + { + return $this->hasOneof(3); + } + + /** + * The intent to be triggered. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentInput intent = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\IntentInput $var + * @return $this + */ + public function setIntent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\IntentInput::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The natural language speech audio to be processed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AudioInput audio = 5; + * @return \Google\Cloud\Dialogflow\Cx\V3\AudioInput|null + */ + public function getAudio() + { + return $this->readOneof(5); + } + + public function hasAudio() + { + return $this->hasOneof(5); + } + + /** + * The natural language speech audio to be processed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AudioInput audio = 5; + * @param \Google\Cloud\Dialogflow\Cx\V3\AudioInput $var + * @return $this + */ + public function setAudio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AudioInput::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The event to be triggered. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EventInput event = 6; + * @return \Google\Cloud\Dialogflow\Cx\V3\EventInput|null + */ + public function getEvent() + { + return $this->readOneof(6); + } + + public function hasEvent() + { + return $this->hasOneof(6); + } + + /** + * The event to be triggered. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EventInput event = 6; + * @param \Google\Cloud\Dialogflow\Cx\V3\EventInput $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\EventInput::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The DTMF event to be handled. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 7; + * @return \Google\Cloud\Dialogflow\Cx\V3\DtmfInput|null + */ + public function getDtmf() + { + return $this->readOneof(7); + } + + public function hasDtmf() + { + return $this->hasOneof(7); + } + + /** + * The DTMF event to be handled. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 7; + * @param \Google\Cloud\Dialogflow\Cx\V3\DtmfInput $var + * @return $this + */ + public function setDtmf($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DtmfInput::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The results of a tool executed by the client. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + * @return \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult|null + */ + public function getToolCallResult() + { + return $this->readOneof(11); + } + + public function hasToolCallResult() + { + return $this->hasOneof(11); + } + + /** + * The results of a tool executed by the client. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + * @param \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult $var + * @return $this + */ + public function setToolCallResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Required. The language of the input. See [Language + * Support](https://cloud.google.com/dialogflow/cx/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 = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Required. The language of the input. See [Language + * Support](https://cloud.google.com/dialogflow/cx/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 = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * @return string + */ + public function getInput() + { + return $this->whichOneof("input"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryParameters.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryParameters.php new file mode 100644 index 000000000000..1bbcaa1d5f73 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryParameters.php @@ -0,0 +1,1106 @@ +google.cloud.dialogflow.cx.v3.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 the agent 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; + /** + * 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.cx.v3.SessionEntityType session_entity_types = 3; + */ + private $session_entity_types; + /** + * This field can be used to pass custom data into the webhook associated with + * the agent. Arbitrary JSON objects are supported. + * 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" + * } + * } + * ``` + * + * Generated from protobuf field .google.protobuf.Struct payload = 4; + */ + protected $payload = null; + /** + * Additional parameters to be put into [session + * parameters][SessionInfo.parameters]. To remove a + * parameter from the session, clients should explicitly set the parameter + * value to null. + * You can reference the session parameters in the agent with the following + * format: $session.params.parameter-id. + * 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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use parameter value. + * + * Generated from protobuf field .google.protobuf.Struct parameters = 5; + */ + protected $parameters = null; + /** + * Scope for the parameters. If not specified, parameters will be treated as + * session parameters. Parameters with custom scope will not be put into + * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * You can reference the parameters with custom scope in the agent with the + * following format: $parameter-scope.params.parameter-id. + * + * Generated from protobuf field string parameter_scope = 12; + */ + protected $parameter_scope = ''; + /** + * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to + * override the [current page][QueryResult.current_page] in the session. + * Format: + * `projects//locations//agents//flows//pages/`. + * If `current_page` is specified, the previous state of the session will be + * ignored by Dialogflow, including the [previous + * page][QueryResult.current_page] and the [previous session + * parameters][QueryResult.parameters]. + * In most cases, + * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page] + * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters] + * should be configured together to direct a session to a specific state. + * + * Generated from protobuf field string current_page = 6 [(.google.api.resource_reference) = { + */ + protected $current_page = ''; + /** + * Whether to disable webhook calls for this request. + * + * Generated from protobuf field bool disable_webhook = 7; + */ + protected $disable_webhook = false; + /** + * Configures whether sentiment analysis should be performed. If not + * provided, sentiment analysis is not performed. + * + * Generated from protobuf field bool analyze_query_text_sentiment = 8; + */ + protected $analyze_query_text_sentiment = false; + /** + * 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 Dialogflow web console. The headers defined + * within this field will overwrite the headers configured through 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 = 10; + */ + private $webhook_headers; + /** + * A list of flow versions to override for the request. + * Format: + * `projects//locations//agents//flows//versions/`. + * If version 1 of flow X is included in this list, the traffic of + * flow X will go through version 1 regardless of the version configuration in + * the environment. Each flow can have at most one version specified in this + * list. + * + * Generated from protobuf field repeated string flow_versions = 14 [(.google.api.resource_reference) = { + */ + private $flow_versions; + /** + * Optional. The unique identifier of the + * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the + * session with. If `current_playbook` is specified, the previous state of the + * session will be ignored by Dialogflow. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $current_playbook = ''; + /** + * Optional. Use the specified LLM model settings for processing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $llm_model_settings = null; + /** + * The channel which this query is for. + * If specified, only the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] associated + * with the channel will be returned. If no + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] is + * associated with the channel, it falls back to the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with + * unspecified channel. + * If unspecified, the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with + * unspecified channel will be returned. + * + * Generated from protobuf field string channel = 15; + */ + protected $channel = ''; + /** + * Optional. Configure lifetime of the Dialogflow session. + * By default, a Dialogflow session remains active and its data is stored for + * 30 minutes after the last request is sent for the session. + * This value should be no longer than 1 day. + * + * Generated from protobuf field .google.protobuf.Duration session_ttl = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $session_ttl = null; + /** + * Optional. Information about the end-user to improve the relevance and + * accuracy of generative answers. + * This will be interpreted and used by a language model, so, for good + * results, the data should be self-descriptive, and in a simple structure. + * Example: + * ```json + * { + * "subscription plan": "Business Premium Plus", + * "devices owned": [ + * {"model": "Google Pixel 7"}, + * {"model": "Google Pixel Tablet"} + * ] + * } + * ``` + * + * Generated from protobuf field .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $end_user_metadata = null; + /** + * Optional. Search configuration for UCS search queries. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $search_config = null; + /** + * Optional. If set to true and data stores are involved in serving the + * request then + * DetectIntentResponse.query_result.data_store_connection_signals + * will be filled with data that can help evaluations. + * + * Generated from protobuf field bool populate_data_store_connection_signals = 25 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $populate_data_store_connection_signals = false; + + /** + * 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 the agent is + * used. + * @type \Google\Type\LatLng $geo_location + * The geo location of this conversational query. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\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 into the webhook associated with + * the agent. Arbitrary JSON objects are supported. + * 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" + * } + * } + * ``` + * @type \Google\Protobuf\Struct $parameters + * Additional parameters to be put into [session + * parameters][SessionInfo.parameters]. To remove a + * parameter from the session, clients should explicitly set the parameter + * value to null. + * You can reference the session parameters in the agent with the following + * format: $session.params.parameter-id. + * 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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use parameter value. + * @type string $parameter_scope + * Scope for the parameters. If not specified, parameters will be treated as + * session parameters. Parameters with custom scope will not be put into + * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * You can reference the parameters with custom scope in the agent with the + * following format: $parameter-scope.params.parameter-id. + * @type string $current_page + * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to + * override the [current page][QueryResult.current_page] in the session. + * Format: + * `projects//locations//agents//flows//pages/`. + * If `current_page` is specified, the previous state of the session will be + * ignored by Dialogflow, including the [previous + * page][QueryResult.current_page] and the [previous session + * parameters][QueryResult.parameters]. + * In most cases, + * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page] + * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters] + * should be configured together to direct a session to a specific state. + * @type bool $disable_webhook + * Whether to disable webhook calls for this request. + * @type bool $analyze_query_text_sentiment + * Configures whether sentiment analysis should be performed. 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 Dialogflow web console. The headers defined + * within this field will overwrite the headers configured through 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. + * @type array|\Google\Protobuf\Internal\RepeatedField $flow_versions + * A list of flow versions to override for the request. + * Format: + * `projects//locations//agents//flows//versions/`. + * If version 1 of flow X is included in this list, the traffic of + * flow X will go through version 1 regardless of the version configuration in + * the environment. Each flow can have at most one version specified in this + * list. + * @type string $current_playbook + * Optional. The unique identifier of the + * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the + * session with. If `current_playbook` is specified, the previous state of the + * session will be ignored by Dialogflow. + * Format: + * `projects//locations//agents//playbooks/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $llm_model_settings + * Optional. Use the specified LLM model settings for processing the request. + * @type string $channel + * The channel which this query is for. + * If specified, only the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] associated + * with the channel will be returned. If no + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] is + * associated with the channel, it falls back to the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with + * unspecified channel. + * If unspecified, the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with + * unspecified channel will be returned. + * @type \Google\Protobuf\Duration $session_ttl + * Optional. Configure lifetime of the Dialogflow session. + * By default, a Dialogflow session remains active and its data is stored for + * 30 minutes after the last request is sent for the session. + * This value should be no longer than 1 day. + * @type \Google\Protobuf\Struct $end_user_metadata + * Optional. Information about the end-user to improve the relevance and + * accuracy of generative answers. + * This will be interpreted and used by a language model, so, for good + * results, the data should be self-descriptive, and in a simple structure. + * Example: + * ```json + * { + * "subscription plan": "Business Premium Plus", + * "devices owned": [ + * {"model": "Google Pixel 7"}, + * {"model": "Google Pixel Tablet"} + * ] + * } + * ``` + * @type \Google\Cloud\Dialogflow\Cx\V3\SearchConfig $search_config + * Optional. Search configuration for UCS search queries. + * @type bool $populate_data_store_connection_signals + * Optional. If set to true and data stores are involved in serving the + * request then + * DetectIntentResponse.query_result.data_store_connection_signals + * will be filled with data that can help evaluations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\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 the agent 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 the agent 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; + } + + /** + * 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.cx.v3.SessionEntityType session_entity_types = 3; + * @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.cx.v3.SessionEntityType session_entity_types = 3; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSessionEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::class); + $this->session_entity_types = $arr; + + return $this; + } + + /** + * This field can be used to pass custom data into the webhook associated with + * the agent. Arbitrary JSON objects are supported. + * 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" + * } + * } + * ``` + * + * 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); + } + + /** + * This field can be used to pass custom data into the webhook associated with + * the agent. Arbitrary JSON objects are supported. + * 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" + * } + * } + * ``` + * + * 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; + } + + /** + * Additional parameters to be put into [session + * parameters][SessionInfo.parameters]. To remove a + * parameter from the session, clients should explicitly set the parameter + * value to null. + * You can reference the session parameters in the agent with the following + * format: $session.params.parameter-id. + * 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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use parameter value. + * + * Generated from protobuf field .google.protobuf.Struct parameters = 5; + * @return \Google\Protobuf\Struct|null + */ + public function getParameters() + { + return $this->parameters; + } + + public function hasParameters() + { + return isset($this->parameters); + } + + public function clearParameters() + { + unset($this->parameters); + } + + /** + * Additional parameters to be put into [session + * parameters][SessionInfo.parameters]. To remove a + * parameter from the session, clients should explicitly set the parameter + * value to null. + * You can reference the session parameters in the agent with the following + * format: $session.params.parameter-id. + * 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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use parameter value. + * + * Generated from protobuf field .google.protobuf.Struct parameters = 5; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->parameters = $var; + + return $this; + } + + /** + * Scope for the parameters. If not specified, parameters will be treated as + * session parameters. Parameters with custom scope will not be put into + * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * You can reference the parameters with custom scope in the agent with the + * following format: $parameter-scope.params.parameter-id. + * + * Generated from protobuf field string parameter_scope = 12; + * @return string + */ + public function getParameterScope() + { + return $this->parameter_scope; + } + + /** + * Scope for the parameters. If not specified, parameters will be treated as + * session parameters. Parameters with custom scope will not be put into + * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * You can reference the parameters with custom scope in the agent with the + * following format: $parameter-scope.params.parameter-id. + * + * Generated from protobuf field string parameter_scope = 12; + * @param string $var + * @return $this + */ + public function setParameterScope($var) + { + GPBUtil::checkString($var, True); + $this->parameter_scope = $var; + + return $this; + } + + /** + * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to + * override the [current page][QueryResult.current_page] in the session. + * Format: + * `projects//locations//agents//flows//pages/`. + * If `current_page` is specified, the previous state of the session will be + * ignored by Dialogflow, including the [previous + * page][QueryResult.current_page] and the [previous session + * parameters][QueryResult.parameters]. + * In most cases, + * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page] + * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters] + * should be configured together to direct a session to a specific state. + * + * Generated from protobuf field string current_page = 6 [(.google.api.resource_reference) = { + * @return string + */ + public function getCurrentPage() + { + return $this->current_page; + } + + /** + * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to + * override the [current page][QueryResult.current_page] in the session. + * Format: + * `projects//locations//agents//flows//pages/`. + * If `current_page` is specified, the previous state of the session will be + * ignored by Dialogflow, including the [previous + * page][QueryResult.current_page] and the [previous session + * parameters][QueryResult.parameters]. + * In most cases, + * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page] + * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters] + * should be configured together to direct a session to a specific state. + * + * Generated from protobuf field string current_page = 6 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCurrentPage($var) + { + GPBUtil::checkString($var, True); + $this->current_page = $var; + + return $this; + } + + /** + * Whether to disable webhook calls for this request. + * + * Generated from protobuf field bool disable_webhook = 7; + * @return bool + */ + public function getDisableWebhook() + { + return $this->disable_webhook; + } + + /** + * Whether to disable webhook calls for this request. + * + * Generated from protobuf field bool disable_webhook = 7; + * @param bool $var + * @return $this + */ + public function setDisableWebhook($var) + { + GPBUtil::checkBool($var); + $this->disable_webhook = $var; + + return $this; + } + + /** + * Configures whether sentiment analysis should be performed. If not + * provided, sentiment analysis is not performed. + * + * Generated from protobuf field bool analyze_query_text_sentiment = 8; + * @return bool + */ + public function getAnalyzeQueryTextSentiment() + { + return $this->analyze_query_text_sentiment; + } + + /** + * Configures whether sentiment analysis should be performed. If not + * provided, sentiment analysis is not performed. + * + * Generated from protobuf field bool analyze_query_text_sentiment = 8; + * @param bool $var + * @return $this + */ + public function setAnalyzeQueryTextSentiment($var) + { + GPBUtil::checkBool($var); + $this->analyze_query_text_sentiment = $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 Dialogflow web console. The headers defined + * within this field will overwrite the headers configured through 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 = 10; + * @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 Dialogflow web console. The headers defined + * within this field will overwrite the headers configured through 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 = 10; + * @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; + } + + /** + * A list of flow versions to override for the request. + * Format: + * `projects//locations//agents//flows//versions/`. + * If version 1 of flow X is included in this list, the traffic of + * flow X will go through version 1 regardless of the version configuration in + * the environment. Each flow can have at most one version specified in this + * list. + * + * Generated from protobuf field repeated string flow_versions = 14 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFlowVersions() + { + return $this->flow_versions; + } + + /** + * A list of flow versions to override for the request. + * Format: + * `projects//locations//agents//flows//versions/`. + * If version 1 of flow X is included in this list, the traffic of + * flow X will go through version 1 regardless of the version configuration in + * the environment. Each flow can have at most one version specified in this + * list. + * + * Generated from protobuf field repeated string flow_versions = 14 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFlowVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->flow_versions = $arr; + + return $this; + } + + /** + * Optional. The unique identifier of the + * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the + * session with. If `current_playbook` is specified, the previous state of the + * session will be ignored by Dialogflow. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getCurrentPlaybook() + { + return $this->current_playbook; + } + + /** + * Optional. The unique identifier of the + * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the + * session with. If `current_playbook` is specified, the previous state of the + * session will be ignored by Dialogflow. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCurrentPlaybook($var) + { + GPBUtil::checkString($var, True); + $this->current_playbook = $var; + + return $this; + } + + /** + * Optional. Use the specified LLM model settings for processing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings|null + */ + public function getLlmModelSettings() + { + return $this->llm_model_settings; + } + + public function hasLlmModelSettings() + { + return isset($this->llm_model_settings); + } + + public function clearLlmModelSettings() + { + unset($this->llm_model_settings); + } + + /** + * Optional. Use the specified LLM model settings for processing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $var + * @return $this + */ + public function setLlmModelSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings::class); + $this->llm_model_settings = $var; + + return $this; + } + + /** + * The channel which this query is for. + * If specified, only the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] associated + * with the channel will be returned. If no + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] is + * associated with the channel, it falls back to the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with + * unspecified channel. + * If unspecified, the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with + * unspecified channel will be returned. + * + * Generated from protobuf field string channel = 15; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * The channel which this query is for. + * If specified, only the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] associated + * with the channel will be returned. If no + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] is + * associated with the channel, it falls back to the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with + * unspecified channel. + * If unspecified, the + * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with + * unspecified channel will be returned. + * + * Generated from protobuf field string channel = 15; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * Optional. Configure lifetime of the Dialogflow session. + * By default, a Dialogflow session remains active and its data is stored for + * 30 minutes after the last request is sent for the session. + * This value should be no longer than 1 day. + * + * Generated from protobuf field .google.protobuf.Duration session_ttl = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getSessionTtl() + { + return $this->session_ttl; + } + + public function hasSessionTtl() + { + return isset($this->session_ttl); + } + + public function clearSessionTtl() + { + unset($this->session_ttl); + } + + /** + * Optional. Configure lifetime of the Dialogflow session. + * By default, a Dialogflow session remains active and its data is stored for + * 30 minutes after the last request is sent for the session. + * This value should be no longer than 1 day. + * + * Generated from protobuf field .google.protobuf.Duration session_ttl = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSessionTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->session_ttl = $var; + + return $this; + } + + /** + * Optional. Information about the end-user to improve the relevance and + * accuracy of generative answers. + * This will be interpreted and used by a language model, so, for good + * results, the data should be self-descriptive, and in a simple structure. + * Example: + * ```json + * { + * "subscription plan": "Business Premium Plus", + * "devices owned": [ + * {"model": "Google Pixel 7"}, + * {"model": "Google Pixel Tablet"} + * ] + * } + * ``` + * + * Generated from protobuf field .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getEndUserMetadata() + { + return $this->end_user_metadata; + } + + public function hasEndUserMetadata() + { + return isset($this->end_user_metadata); + } + + public function clearEndUserMetadata() + { + unset($this->end_user_metadata); + } + + /** + * Optional. Information about the end-user to improve the relevance and + * accuracy of generative answers. + * This will be interpreted and used by a language model, so, for good + * results, the data should be self-descriptive, and in a simple structure. + * Example: + * ```json + * { + * "subscription plan": "Business Premium Plus", + * "devices owned": [ + * {"model": "Google Pixel 7"}, + * {"model": "Google Pixel Tablet"} + * ] + * } + * ``` + * + * Generated from protobuf field .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setEndUserMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->end_user_metadata = $var; + + return $this; + } + + /** + * Optional. Search configuration for UCS search queries. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\SearchConfig|null + */ + public function getSearchConfig() + { + return $this->search_config; + } + + public function hasSearchConfig() + { + return isset($this->search_config); + } + + public function clearSearchConfig() + { + unset($this->search_config); + } + + /** + * Optional. Search configuration for UCS search queries. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SearchConfig $var + * @return $this + */ + public function setSearchConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SearchConfig::class); + $this->search_config = $var; + + return $this; + } + + /** + * Optional. If set to true and data stores are involved in serving the + * request then + * DetectIntentResponse.query_result.data_store_connection_signals + * will be filled with data that can help evaluations. + * + * Generated from protobuf field bool populate_data_store_connection_signals = 25 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return bool + * @deprecated + */ + public function getPopulateDataStoreConnectionSignals() + { + if ($this->populate_data_store_connection_signals !== false) { + @trigger_error('populate_data_store_connection_signals is deprecated.', E_USER_DEPRECATED); + } + return $this->populate_data_store_connection_signals; + } + + /** + * Optional. If set to true and data stores are involved in serving the + * request then + * DetectIntentResponse.query_result.data_store_connection_signals + * will be filled with data that can help evaluations. + * + * Generated from protobuf field bool populate_data_store_connection_signals = 25 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setPopulateDataStoreConnectionSignals($var) + { + @trigger_error('populate_data_store_connection_signals is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->populate_data_store_connection_signals = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryResult.php new file mode 100644 index 000000000000..128462621172 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryResult.php @@ -0,0 +1,1089 @@ +google.cloud.dialogflow.cx.v3.QueryResult + */ +class QueryResult extends \Google\Protobuf\Internal\Message +{ + /** + * The language that was triggered during intent detection. + * See [Language + * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + /** + * The collected [session + * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use parameter value. + * + * Generated from protobuf field .google.protobuf.Struct parameters = 3; + */ + protected $parameters = null; + /** + * The list of rich messages returned to the client. Responses vary from + * simple text messages to more sophisticated, structured payloads used + * to drive complex logic. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + */ + private $response_messages; + /** + * The list of webhook call status in the order of call sequence. + * + * Generated from protobuf field repeated .google.rpc.Status webhook_statuses = 13; + */ + private $webhook_statuses; + /** + * The list of webhook payload in + * [WebhookResponse.payload][google.cloud.dialogflow.cx.v3.WebhookResponse.payload], + * in the order of call sequence. If some webhook call fails or doesn't return + * any payload, an empty `Struct` would be used instead. + * + * Generated from protobuf field repeated .google.protobuf.Struct webhook_payloads = 6; + */ + private $webhook_payloads; + /** + * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 7; + */ + protected $current_page = null; + /** + * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + */ + protected $current_flow = null; + /** + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the + * conversational query. Some, not all fields are filled in this message, + * including but not limited to: `name` and `display_name`. This field is + * deprecated, please use + * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] + * instead. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; + * @deprecated + */ + 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. + * This field is deprecated, please use + * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] + * instead. + * + * Generated from protobuf field float intent_detection_confidence = 9 [deprecated = true]; + * @deprecated + */ + protected $intent_detection_confidence = 0.0; + /** + * Intent match result, could be an intent or an event. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 15; + */ + protected $match = null; + /** + * The free-form diagnostic info. For example, this field could contain + * webhook call latency. The fields of this data can change without notice, + * so you should not write code that depends on its structure. + * One of the fields is called "Alternative Matched Intents", which may + * aid with debugging. The following describes these intent results: + * - The list is empty if no intent was matched to end-user input. + * - Only intents that are referenced in the currently active flow are + * included. + * - The matched intent is included. + * - Other intents that could have matched end-user input, but did not match + * because they are referenced by intent routes that are out of + * [scope](https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope), + * are included. + * - Other intents referenced by intent routes in scope that matched end-user + * input, but had a lower confidence score. + * + * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 10; + */ + protected $diagnostic_info = null; + /** + * The sentiment analyss result, which depends on + * [`analyze_query_text_sentiment`] + * [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], + * specified in the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SentimentAnalysisResult sentiment_analysis_result = 17; + */ + protected $sentiment_analysis_result = null; + /** + * Returns the current advanced settings including IVR settings. Even though + * the operations configured by these settings are performed by Dialogflow, + * the client may need to perform special logic at the moment. For example, if + * Dialogflow exports audio to Google Cloud Storage, then the client may need + * to wait for the resulting object to appear in the bucket before proceeding. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 21; + */ + protected $advanced_settings = null; + /** + * Indicates whether the Thumbs up/Thumbs down rating controls are need to be + * shown for the response in the Dialogflow Messenger widget. + * + * Generated from protobuf field bool allow_answer_feedback = 32; + */ + protected $allow_answer_feedback = false; + /** + * Optional. Data store connection feature output signals. + * Filled only when data stores are involved in serving the query. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals data_store_connection_signals = 35 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_store_connection_signals = null; + protected $query; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was + * provided as input, this field will contain a copy of the text. + * @type string $trigger_intent + * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as + * input, this field will contain a copy of the intent identifier. Format: + * `projects//locations//agents//intents/`. + * @type string $transcript + * If [natural language speech + * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, + * this field will contain the transcript for the audio. + * @type string $trigger_event + * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as + * input, this field will contain the name of the event. + * @type \Google\Cloud\Dialogflow\Cx\V3\DtmfInput $dtmf + * If a [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as + * input, this field will contain a copy of the + * [DtmfInput][google.cloud.dialogflow.cx.v3.DtmfInput]. + * @type string $language_code + * The language that was triggered during intent detection. + * See [Language + * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * for a list of the currently supported language codes. + * @type \Google\Protobuf\Struct $parameters + * The collected [session + * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use parameter value. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $response_messages + * The list of rich messages returned to the client. Responses vary from + * simple text messages to more sophisticated, structured payloads used + * to drive complex logic. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $webhook_statuses + * The list of webhook call status in the order of call sequence. + * @type array<\Google\Protobuf\Struct>|\Google\Protobuf\Internal\RepeatedField $webhook_payloads + * The list of webhook payload in + * [WebhookResponse.payload][google.cloud.dialogflow.cx.v3.WebhookResponse.payload], + * in the order of call sequence. If some webhook call fails or doesn't return + * any payload, an empty `Struct` would be used instead. + * @type \Google\Cloud\Dialogflow\Cx\V3\Page $current_page + * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Flow $current_flow + * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * @type \Google\Cloud\Dialogflow\Cx\V3\Intent $intent + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the + * conversational query. Some, not all fields are filled in this message, + * including but not limited to: `name` and `display_name`. This field is + * deprecated, please use + * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] + * instead. + * @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. + * This field is deprecated, please use + * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] + * instead. + * @type \Google\Cloud\Dialogflow\Cx\V3\PBMatch $match + * Intent match result, could be an intent or an event. + * @type \Google\Protobuf\Struct $diagnostic_info + * The free-form diagnostic info. For example, this field could contain + * webhook call latency. The fields of this data can change without notice, + * so you should not write code that depends on its structure. + * One of the fields is called "Alternative Matched Intents", which may + * aid with debugging. The following describes these intent results: + * - The list is empty if no intent was matched to end-user input. + * - Only intents that are referenced in the currently active flow are + * included. + * - The matched intent is included. + * - Other intents that could have matched end-user input, but did not match + * because they are referenced by intent routes that are out of + * [scope](https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope), + * are included. + * - Other intents referenced by intent routes in scope that matched end-user + * input, but had a lower confidence score. + * @type \Google\Cloud\Dialogflow\Cx\V3\SentimentAnalysisResult $sentiment_analysis_result + * The sentiment analyss result, which depends on + * [`analyze_query_text_sentiment`] + * [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], + * specified in the request. + * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings + * Returns the current advanced settings including IVR settings. Even though + * the operations configured by these settings are performed by Dialogflow, + * the client may need to perform special logic at the moment. For example, if + * Dialogflow exports audio to Google Cloud Storage, then the client may need + * to wait for the resulting object to appear in the bucket before proceeding. + * @type bool $allow_answer_feedback + * Indicates whether the Thumbs up/Thumbs down rating controls are need to be + * shown for the response in the Dialogflow Messenger widget. + * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals $data_store_connection_signals + * Optional. Data store connection feature output signals. + * Filled only when data stores are involved in serving the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was + * provided as input, this field will contain a copy of the text. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was + * provided as input, this field will contain a copy of the text. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as + * input, this field will contain a copy of the intent identifier. Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string trigger_intent = 11 [(.google.api.resource_reference) = { + * @return string + */ + public function getTriggerIntent() + { + return $this->readOneof(11); + } + + public function hasTriggerIntent() + { + return $this->hasOneof(11); + } + + /** + * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as + * input, this field will contain a copy of the intent identifier. Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string trigger_intent = 11 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTriggerIntent($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * If [natural language speech + * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, + * this field will contain the transcript for the audio. + * + * Generated from protobuf field string transcript = 12; + * @return string + */ + public function getTranscript() + { + return $this->readOneof(12); + } + + public function hasTranscript() + { + return $this->hasOneof(12); + } + + /** + * If [natural language speech + * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, + * this field will contain the transcript for the audio. + * + * Generated from protobuf field string transcript = 12; + * @param string $var + * @return $this + */ + public function setTranscript($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as + * input, this field will contain the name of the event. + * + * Generated from protobuf field string trigger_event = 14; + * @return string + */ + public function getTriggerEvent() + { + return $this->readOneof(14); + } + + public function hasTriggerEvent() + { + return $this->hasOneof(14); + } + + /** + * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as + * input, this field will contain the name of the event. + * + * Generated from protobuf field string trigger_event = 14; + * @param string $var + * @return $this + */ + public function setTriggerEvent($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * If a [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as + * input, this field will contain a copy of the + * [DtmfInput][google.cloud.dialogflow.cx.v3.DtmfInput]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + * @return \Google\Cloud\Dialogflow\Cx\V3\DtmfInput|null + */ + public function getDtmf() + { + return $this->readOneof(23); + } + + public function hasDtmf() + { + return $this->hasOneof(23); + } + + /** + * If a [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as + * input, this field will contain a copy of the + * [DtmfInput][google.cloud.dialogflow.cx.v3.DtmfInput]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + * @param \Google\Cloud\Dialogflow\Cx\V3\DtmfInput $var + * @return $this + */ + public function setDtmf($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DtmfInput::class); + $this->writeOneof(23, $var); + + return $this; + } + + /** + * The language that was triggered during intent detection. + * See [Language + * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 2; + * @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/cx/docs/reference/language) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The collected [session + * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use parameter value. + * + * Generated from protobuf field .google.protobuf.Struct parameters = 3; + * @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 collected [session + * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.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 then use + * map, otherwise, depending on the parameter value type, it could be one of + * string, number, boolean, null, list or map. + * * MapValue value: If parameter's entity type is a composite entity then use + * map from composite entity property names to property values, otherwise, + * use parameter value. + * + * Generated from protobuf field .google.protobuf.Struct parameters = 3; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->parameters = $var; + + return $this; + } + + /** + * The list of rich messages returned to the client. Responses vary from + * simple text messages to more sophisticated, structured payloads used + * to drive complex logic. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponseMessages() + { + return $this->response_messages; + } + + /** + * The list of rich messages returned to the client. Responses vary from + * simple text messages to more sophisticated, structured payloads used + * to drive complex logic. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponseMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::class); + $this->response_messages = $arr; + + return $this; + } + + /** + * The list of webhook call status in the order of call sequence. + * + * Generated from protobuf field repeated .google.rpc.Status webhook_statuses = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWebhookStatuses() + { + return $this->webhook_statuses; + } + + /** + * The list of webhook call status in the order of call sequence. + * + * Generated from protobuf field repeated .google.rpc.Status webhook_statuses = 13; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWebhookStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->webhook_statuses = $arr; + + return $this; + } + + /** + * The list of webhook payload in + * [WebhookResponse.payload][google.cloud.dialogflow.cx.v3.WebhookResponse.payload], + * in the order of call sequence. If some webhook call fails or doesn't return + * any payload, an empty `Struct` would be used instead. + * + * Generated from protobuf field repeated .google.protobuf.Struct webhook_payloads = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWebhookPayloads() + { + return $this->webhook_payloads; + } + + /** + * The list of webhook payload in + * [WebhookResponse.payload][google.cloud.dialogflow.cx.v3.WebhookResponse.payload], + * in the order of call sequence. If some webhook call fails or doesn't return + * any payload, an empty `Struct` would be used instead. + * + * Generated from protobuf field repeated .google.protobuf.Struct webhook_payloads = 6; + * @param array<\Google\Protobuf\Struct>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWebhookPayloads($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Struct::class); + $this->webhook_payloads = $arr; + + return $this; + } + + /** + * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 7; + * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null + */ + public function getCurrentPage() + { + return $this->current_page; + } + + public function hasCurrentPage() + { + return isset($this->current_page); + } + + public function clearCurrentPage() + { + unset($this->current_page); + } + + /** + * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 7; + * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var + * @return $this + */ + public function setCurrentPage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); + $this->current_page = $var; + + return $this; + } + + /** + * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + * @return \Google\Cloud\Dialogflow\Cx\V3\Flow|null + */ + public function getCurrentFlow() + { + return $this->current_flow; + } + + public function hasCurrentFlow() + { + return isset($this->current_flow); + } + + public function clearCurrentFlow() + { + unset($this->current_flow); + } + + /** + * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all + * fields are filled in this message, including but not limited to `name` and + * `display_name`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $var + * @return $this + */ + public function setCurrentFlow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Flow::class); + $this->current_flow = $var; + + return $this; + } + + /** + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the + * conversational query. Some, not all fields are filled in this message, + * including but not limited to: `name` and `display_name`. This field is + * deprecated, please use + * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] + * instead. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Intent|null + * @deprecated + */ + public function getIntent() + { + if (isset($this->intent)) { + @trigger_error('intent is deprecated.', E_USER_DEPRECATED); + } + return $this->intent; + } + + public function hasIntent() + { + if (isset($this->intent)) { + @trigger_error('intent is deprecated.', E_USER_DEPRECATED); + } + return isset($this->intent); + } + + public function clearIntent() + { + @trigger_error('intent is deprecated.', E_USER_DEPRECATED); + unset($this->intent); + } + + /** + * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the + * conversational query. Some, not all fields are filled in this message, + * including but not limited to: `name` and `display_name`. This field is + * deprecated, please use + * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] + * instead. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $var + * @return $this + * @deprecated + */ + public function setIntent($var) + { + @trigger_error('intent is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\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. + * This field is deprecated, please use + * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] + * instead. + * + * Generated from protobuf field float intent_detection_confidence = 9 [deprecated = true]; + * @return float + * @deprecated + */ + public function getIntentDetectionConfidence() + { + if ($this->intent_detection_confidence !== 0.0) { + @trigger_error('intent_detection_confidence is deprecated.', E_USER_DEPRECATED); + } + 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. + * This field is deprecated, please use + * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] + * instead. + * + * Generated from protobuf field float intent_detection_confidence = 9 [deprecated = true]; + * @param float $var + * @return $this + * @deprecated + */ + public function setIntentDetectionConfidence($var) + { + @trigger_error('intent_detection_confidence is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkFloat($var); + $this->intent_detection_confidence = $var; + + return $this; + } + + /** + * Intent match result, could be an intent or an event. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 15; + * @return \Google\Cloud\Dialogflow\Cx\V3\PBMatch|null + */ + public function getMatch() + { + return $this->match; + } + + public function hasMatch() + { + return isset($this->match); + } + + public function clearMatch() + { + unset($this->match); + } + + /** + * Intent match result, could be an intent or an event. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 15; + * @param \Google\Cloud\Dialogflow\Cx\V3\PBMatch $var + * @return $this + */ + public function setMatch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PBMatch::class); + $this->match = $var; + + return $this; + } + + /** + * The free-form diagnostic info. For example, this field could contain + * webhook call latency. The fields of this data can change without notice, + * so you should not write code that depends on its structure. + * One of the fields is called "Alternative Matched Intents", which may + * aid with debugging. The following describes these intent results: + * - The list is empty if no intent was matched to end-user input. + * - Only intents that are referenced in the currently active flow are + * included. + * - The matched intent is included. + * - Other intents that could have matched end-user input, but did not match + * because they are referenced by intent routes that are out of + * [scope](https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope), + * are included. + * - Other intents referenced by intent routes in scope that matched end-user + * input, but had a lower confidence score. + * + * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 10; + * @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); + } + + /** + * The free-form diagnostic info. For example, this field could contain + * webhook call latency. The fields of this data can change without notice, + * so you should not write code that depends on its structure. + * One of the fields is called "Alternative Matched Intents", which may + * aid with debugging. The following describes these intent results: + * - The list is empty if no intent was matched to end-user input. + * - Only intents that are referenced in the currently active flow are + * included. + * - The matched intent is included. + * - Other intents that could have matched end-user input, but did not match + * because they are referenced by intent routes that are out of + * [scope](https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope), + * are included. + * - Other intents referenced by intent routes in scope that matched end-user + * input, but had a lower confidence score. + * + * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 10; + * @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 analyss result, which depends on + * [`analyze_query_text_sentiment`] + * [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], + * specified in the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SentimentAnalysisResult sentiment_analysis_result = 17; + * @return \Google\Cloud\Dialogflow\Cx\V3\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 analyss result, which depends on + * [`analyze_query_text_sentiment`] + * [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], + * specified in the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SentimentAnalysisResult sentiment_analysis_result = 17; + * @param \Google\Cloud\Dialogflow\Cx\V3\SentimentAnalysisResult $var + * @return $this + */ + public function setSentimentAnalysisResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SentimentAnalysisResult::class); + $this->sentiment_analysis_result = $var; + + return $this; + } + + /** + * Returns the current advanced settings including IVR settings. Even though + * the operations configured by these settings are performed by Dialogflow, + * the client may need to perform special logic at the moment. For example, if + * Dialogflow exports audio to Google Cloud Storage, then the client may need + * to wait for the resulting object to appear in the bucket before proceeding. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 21; + * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null + */ + public function getAdvancedSettings() + { + return $this->advanced_settings; + } + + public function hasAdvancedSettings() + { + return isset($this->advanced_settings); + } + + public function clearAdvancedSettings() + { + unset($this->advanced_settings); + } + + /** + * Returns the current advanced settings including IVR settings. Even though + * the operations configured by these settings are performed by Dialogflow, + * the client may need to perform special logic at the moment. For example, if + * Dialogflow exports audio to Google Cloud Storage, then the client may need + * to wait for the resulting object to appear in the bucket before proceeding. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 21; + * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var + * @return $this + */ + public function setAdvancedSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); + $this->advanced_settings = $var; + + return $this; + } + + /** + * Indicates whether the Thumbs up/Thumbs down rating controls are need to be + * shown for the response in the Dialogflow Messenger widget. + * + * Generated from protobuf field bool allow_answer_feedback = 32; + * @return bool + */ + public function getAllowAnswerFeedback() + { + return $this->allow_answer_feedback; + } + + /** + * Indicates whether the Thumbs up/Thumbs down rating controls are need to be + * shown for the response in the Dialogflow Messenger widget. + * + * Generated from protobuf field bool allow_answer_feedback = 32; + * @param bool $var + * @return $this + */ + public function setAllowAnswerFeedback($var) + { + GPBUtil::checkBool($var); + $this->allow_answer_feedback = $var; + + return $this; + } + + /** + * Optional. Data store connection feature output signals. + * Filled only when data stores are involved in serving the query. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals data_store_connection_signals = 35 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals|null + */ + public function getDataStoreConnectionSignals() + { + return $this->data_store_connection_signals; + } + + public function hasDataStoreConnectionSignals() + { + return isset($this->data_store_connection_signals); + } + + public function clearDataStoreConnectionSignals() + { + unset($this->data_store_connection_signals); + } + + /** + * Optional. Data store connection feature output signals. + * Filled only when data stores are involved in serving the query. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals data_store_connection_signals = 35 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals $var + * @return $this + */ + public function setDataStoreConnectionSignals($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals::class); + $this->data_store_connection_signals = $var; + + return $this; + } + + /** + * @return string + */ + public function getQuery() + { + return $this->whichOneof("query"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResourceName.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResourceName.php new file mode 100644 index 000000000000..0e78c780b799 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResourceName.php @@ -0,0 +1,101 @@ +google.cloud.dialogflow.cx.v3.ResourceName + */ +class ResourceName extends \Google\Protobuf\Internal\Message +{ + /** + * Name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Display name. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name. + * @type string $display_name + * Display name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ValidationMessage::initOnce(); + parent::__construct($data); + } + + /** + * Name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name. + * + * 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; + } + + /** + * Display name. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php new file mode 100644 index 000000000000..927621442c9b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php @@ -0,0 +1,546 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage + */ +class ResponseMessage extends \Google\Protobuf\Internal\Message +{ + /** + * Response type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + */ + protected $response_type = 0; + /** + * The channel which the response is associated with. Clients can specify the + * channel via + * [QueryParameters.channel][google.cloud.dialogflow.cx.v3.QueryParameters.channel], + * and only associated channel response will be returned. + * + * Generated from protobuf field string channel = 19; + */ + protected $channel = ''; + protected $message; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text $text + * Returns a text response. + * @type \Google\Protobuf\Struct $payload + * Returns a response containing a custom, platform-specific payload. + * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\ConversationSuccess $conversation_success + * Indicates that the conversation succeeded. + * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\OutputAudioText $output_audio_text + * A text or ssml response that is preferentially used for TTS output audio + * synthesis, as described in the comment on the ResponseMessage message. + * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\LiveAgentHandoff $live_agent_handoff + * Hands off conversation to a human agent. + * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\EndInteraction $end_interaction + * Output only. A signal that indicates the interaction with the Dialogflow + * agent has ended. This message is generated by Dialogflow only when the + * conversation reaches `END_SESSION` page. It is not supposed to be defined + * by the user. + * It's guaranteed that there is at most one such message in each response. + * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\PlayAudio $play_audio + * Signal that the client should play an audio clip hosted at a + * client-specific URI. Dialogflow uses this to construct + * [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. + * However, Dialogflow itself does not try to read or process the URI in any + * way. + * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio $mixed_audio + * Output only. An audio response message composed of both the synthesized + * Dialogflow agent responses and responses defined via + * [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio]. + * This message is generated by Dialogflow only and not supposed to be + * defined by the user. + * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\TelephonyTransferCall $telephony_transfer_call + * A signal that the client should transfer the phone call connected to + * this agent to a third-party endpoint. + * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\KnowledgeInfoCard $knowledge_info_card + * Represents info card for knowledge answers, to be better rendered in + * Dialogflow Messenger. + * @type \Google\Cloud\Dialogflow\Cx\V3\ToolCall $tool_call + * Returns the definition of a tool call that should be executed by the + * client. + * @type int $response_type + * Response type. + * @type string $channel + * The channel which the response is associated with. Clients can specify the + * channel via + * [QueryParameters.channel][google.cloud.dialogflow.cx.v3.QueryParameters.channel], + * and only associated channel response will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + + /** + * Returns a text response. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text|null + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * Returns a text response. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Returns a response containing a custom, platform-specific payload. + * + * Generated from protobuf field .google.protobuf.Struct payload = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getPayload() + { + return $this->readOneof(2); + } + + public function hasPayload() + { + return $this->hasOneof(2); + } + + /** + * Returns a response containing a custom, platform-specific payload. + * + * Generated from protobuf field .google.protobuf.Struct payload = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Indicates that the conversation succeeded. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9; + * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\ConversationSuccess|null + */ + public function getConversationSuccess() + { + return $this->readOneof(9); + } + + public function hasConversationSuccess() + { + return $this->hasOneof(9); + } + + /** + * Indicates that the conversation succeeded. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9; + * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\ConversationSuccess $var + * @return $this + */ + public function setConversationSuccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\ConversationSuccess::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * A text or ssml response that is preferentially used for TTS output audio + * synthesis, as described in the comment on the ResponseMessage message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8; + * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\OutputAudioText|null + */ + public function getOutputAudioText() + { + return $this->readOneof(8); + } + + public function hasOutputAudioText() + { + return $this->hasOneof(8); + } + + /** + * A text or ssml response that is preferentially used for TTS output audio + * synthesis, as described in the comment on the ResponseMessage message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8; + * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\OutputAudioText $var + * @return $this + */ + public function setOutputAudioText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\OutputAudioText::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Hands off conversation to a human agent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10; + * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\LiveAgentHandoff|null + */ + public function getLiveAgentHandoff() + { + return $this->readOneof(10); + } + + public function hasLiveAgentHandoff() + { + return $this->hasOneof(10); + } + + /** + * Hands off conversation to a human agent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10; + * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\LiveAgentHandoff $var + * @return $this + */ + public function setLiveAgentHandoff($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\LiveAgentHandoff::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Output only. A signal that indicates the interaction with the Dialogflow + * agent has ended. This message is generated by Dialogflow only when the + * conversation reaches `END_SESSION` page. It is not supposed to be defined + * by the user. + * It's guaranteed that there is at most one such message in each response. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\EndInteraction|null + */ + public function getEndInteraction() + { + return $this->readOneof(11); + } + + public function hasEndInteraction() + { + return $this->hasOneof(11); + } + + /** + * Output only. A signal that indicates the interaction with the Dialogflow + * agent has ended. This message is generated by Dialogflow only when the + * conversation reaches `END_SESSION` page. It is not supposed to be defined + * by the user. + * It's guaranteed that there is at most one such message in each response. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\EndInteraction $var + * @return $this + */ + public function setEndInteraction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\EndInteraction::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Signal that the client should play an audio clip hosted at a + * client-specific URI. Dialogflow uses this to construct + * [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. + * However, Dialogflow itself does not try to read or process the URI in any + * way. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12; + * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\PlayAudio|null + */ + public function getPlayAudio() + { + return $this->readOneof(12); + } + + public function hasPlayAudio() + { + return $this->hasOneof(12); + } + + /** + * Signal that the client should play an audio clip hosted at a + * client-specific URI. Dialogflow uses this to construct + * [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. + * However, Dialogflow itself does not try to read or process the URI in any + * way. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12; + * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\PlayAudio $var + * @return $this + */ + public function setPlayAudio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\PlayAudio::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Output only. An audio response message composed of both the synthesized + * Dialogflow agent responses and responses defined via + * [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio]. + * This message is generated by Dialogflow only and not supposed to be + * defined by the user. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio|null + */ + public function getMixedAudio() + { + return $this->readOneof(13); + } + + public function hasMixedAudio() + { + return $this->hasOneof(13); + } + + /** + * Output only. An audio response message composed of both the synthesized + * Dialogflow agent responses and responses defined via + * [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio]. + * This message is generated by Dialogflow only and not supposed to be + * defined by the user. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio $var + * @return $this + */ + public function setMixedAudio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * A signal that the client should transfer the phone call connected to + * this agent to a third-party endpoint. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall telephony_transfer_call = 18; + * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\TelephonyTransferCall|null + */ + public function getTelephonyTransferCall() + { + return $this->readOneof(18); + } + + public function hasTelephonyTransferCall() + { + return $this->hasOneof(18); + } + + /** + * A signal that the client should transfer the phone call connected to + * this agent to a third-party endpoint. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall telephony_transfer_call = 18; + * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\TelephonyTransferCall $var + * @return $this + */ + public function setTelephonyTransferCall($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\TelephonyTransferCall::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Represents info card for knowledge answers, to be better rendered in + * Dialogflow Messenger. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\KnowledgeInfoCard|null + */ + public function getKnowledgeInfoCard() + { + return $this->readOneof(20); + } + + public function hasKnowledgeInfoCard() + { + return $this->hasOneof(20); + } + + /** + * Represents info card for knowledge answers, to be better rendered in + * Dialogflow Messenger. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; + * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\KnowledgeInfoCard $var + * @return $this + */ + public function setKnowledgeInfoCard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\KnowledgeInfoCard::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * Returns the definition of a tool call that should be executed by the + * client. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + * @return \Google\Cloud\Dialogflow\Cx\V3\ToolCall|null + */ + public function getToolCall() + { + return $this->readOneof(22); + } + + public function hasToolCall() + { + return $this->hasOneof(22); + } + + /** + * Returns the definition of a tool call that should be executed by the + * client. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + * @param \Google\Cloud\Dialogflow\Cx\V3\ToolCall $var + * @return $this + */ + public function setToolCall($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ToolCall::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * Response type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * @return int + */ + public function getResponseType() + { + return $this->response_type; + } + + /** + * Response type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; + * @param int $var + * @return $this + */ + public function setResponseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\ResponseType::class); + $this->response_type = $var; + + return $this; + } + + /** + * The channel which the response is associated with. Clients can specify the + * channel via + * [QueryParameters.channel][google.cloud.dialogflow.cx.v3.QueryParameters.channel], + * and only associated channel response will be returned. + * + * Generated from protobuf field string channel = 19; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * The channel which the response is associated with. Clients can specify the + * channel via + * [QueryParameters.channel][google.cloud.dialogflow.cx.v3.QueryParameters.channel], + * and only associated channel response will be returned. + * + * Generated from protobuf field string channel = 19; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * @return string + */ + public function getMessage() + { + return $this->whichOneof("message"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ConversationSuccess.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ConversationSuccess.php new file mode 100644 index 000000000000..f4fd757629ee --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ConversationSuccess.php @@ -0,0 +1,93 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + */ +class ConversationSuccess extends \Google\Protobuf\Internal\Message +{ + /** + * Custom metadata. Dialogflow doesn't impose any structure on this. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 1; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $metadata + * Custom metadata. Dialogflow doesn't impose any structure on this. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + + /** + * Custom metadata. Dialogflow doesn't impose any structure on this. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 1; + * @return \Google\Protobuf\Struct|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Custom metadata. Dialogflow doesn't impose any structure on this. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 1; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->metadata = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConversationSuccess::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_ConversationSuccess::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/EndInteraction.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/EndInteraction.php new file mode 100644 index 000000000000..a32728dff006 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/EndInteraction.php @@ -0,0 +1,38 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + */ +class EndInteraction 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\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EndInteraction::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_EndInteraction::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/KnowledgeInfoCard.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/KnowledgeInfoCard.php new file mode 100644 index 000000000000..afec68f545a5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/KnowledgeInfoCard.php @@ -0,0 +1,39 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard + */ +class KnowledgeInfoCard 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\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KnowledgeInfoCard::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_KnowledgeInfoCard::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/LiveAgentHandoff.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/LiveAgentHandoff.php new file mode 100644 index 000000000000..e794ff3679a3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/LiveAgentHandoff.php @@ -0,0 +1,95 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + */ +class LiveAgentHandoff extends \Google\Protobuf\Internal\Message +{ + /** + * Custom metadata for your handoff procedure. Dialogflow doesn't impose + * any structure on this. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 1; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $metadata + * Custom metadata for your handoff procedure. Dialogflow doesn't impose + * any structure on this. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + + /** + * Custom metadata for your handoff procedure. Dialogflow doesn't impose + * any structure on this. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 1; + * @return \Google\Protobuf\Struct|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Custom metadata for your handoff procedure. Dialogflow doesn't impose + * any structure on this. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 1; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->metadata = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LiveAgentHandoff::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_LiveAgentHandoff::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio.php new file mode 100644 index 000000000000..23c44b0702b1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio.php @@ -0,0 +1,76 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio + */ +class MixedAudio extends \Google\Protobuf\Internal\Message +{ + /** + * Segments this audio response is composed of. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + */ + private $segments; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio\Segment>|\Google\Protobuf\Internal\RepeatedField $segments + * Segments this audio response is composed of. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + + /** + * Segments this audio response is composed of. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSegments() + { + return $this->segments; + } + + /** + * Segments this audio response is composed of. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio\Segment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio\Segment::class); + $this->segments = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MixedAudio::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_MixedAudio::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio/Segment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio/Segment.php new file mode 100644 index 000000000000..42cb0dca11d9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio/Segment.php @@ -0,0 +1,159 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment + */ +class Segment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether the playback of this segment can be interrupted by + * the end user's speech and the client should then start the next + * Dialogflow request. + * + * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $allow_playback_interruption = false; + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $audio + * Raw audio synthesized from the Dialogflow agent's response using + * the output config specified in the request. + * @type string $uri + * Client-specific URI that points to an audio clip accessible to the + * client. Dialogflow does not impose any validation on it. + * @type bool $allow_playback_interruption + * Output only. Whether the playback of this segment can be interrupted by + * the end user's speech and the client should then start the next + * Dialogflow request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + + /** + * Raw audio synthesized from the Dialogflow agent's response using + * the output config specified in the request. + * + * Generated from protobuf field bytes audio = 1; + * @return string + */ + public function getAudio() + { + return $this->readOneof(1); + } + + public function hasAudio() + { + return $this->hasOneof(1); + } + + /** + * Raw audio synthesized from the Dialogflow agent's response using + * the output config specified in the request. + * + * Generated from protobuf field bytes audio = 1; + * @param string $var + * @return $this + */ + public function setAudio($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Client-specific URI that points to an audio clip accessible to the + * client. Dialogflow does not impose any validation on it. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->readOneof(2); + } + + public function hasUri() + { + return $this->hasOneof(2); + } + + /** + * Client-specific URI that points to an audio clip accessible to the + * client. Dialogflow does not impose any validation on it. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Output only. Whether the playback of this segment can be interrupted by + * the end user's speech and the client should then start the next + * Dialogflow request. + * + * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getAllowPlaybackInterruption() + { + return $this->allow_playback_interruption; + } + + /** + * Output only. Whether the playback of this segment can be interrupted by + * the end user's speech and the client should then start the next + * Dialogflow request. + * + * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAllowPlaybackInterruption($var) + { + GPBUtil::checkBool($var); + $this->allow_playback_interruption = $var; + + return $this; + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Segment::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_MixedAudio_Segment::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/OutputAudioText.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/OutputAudioText.php new file mode 100644 index 000000000000..43b1f4902867 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/OutputAudioText.php @@ -0,0 +1,157 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + */ +class OutputAudioText extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * + * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $allow_playback_interruption = false; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The raw text to be synthesized. + * @type string $ssml + * The SSML text to be synthesized. For more information, see + * [SSML](/speech/text-to-speech/docs/ssml). + * @type bool $allow_playback_interruption + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + + /** + * The raw text to be synthesized. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * The raw text to be synthesized. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The SSML text to be synthesized. For more information, see + * [SSML](/speech/text-to-speech/docs/ssml). + * + * Generated from protobuf field string ssml = 2; + * @return string + */ + public function getSsml() + { + return $this->readOneof(2); + } + + public function hasSsml() + { + return $this->hasOneof(2); + } + + /** + * The SSML text to be synthesized. For more information, see + * [SSML](/speech/text-to-speech/docs/ssml). + * + * Generated from protobuf field string ssml = 2; + * @param string $var + * @return $this + */ + public function setSsml($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * + * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getAllowPlaybackInterruption() + { + return $this->allow_playback_interruption; + } + + /** + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * + * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAllowPlaybackInterruption($var) + { + GPBUtil::checkBool($var); + $this->allow_playback_interruption = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OutputAudioText::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_OutputAudioText::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/PlayAudio.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/PlayAudio.php new file mode 100644 index 000000000000..bcfa39e77a3f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/PlayAudio.php @@ -0,0 +1,116 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + */ +class PlayAudio extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI of the audio clip. Dialogflow does not impose any + * validation on this value. It is specific to the client that reads it. + * + * Generated from protobuf field string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $audio_uri = ''; + /** + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * + * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $allow_playback_interruption = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $audio_uri + * Required. URI of the audio clip. Dialogflow does not impose any + * validation on this value. It is specific to the client that reads it. + * @type bool $allow_playback_interruption + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI of the audio clip. Dialogflow does not impose any + * validation on this value. It is specific to the client that reads it. + * + * Generated from protobuf field string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAudioUri() + { + return $this->audio_uri; + } + + /** + * Required. URI of the audio clip. Dialogflow does not impose any + * validation on this value. It is specific to the client that reads it. + * + * Generated from protobuf field string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAudioUri($var) + { + GPBUtil::checkString($var, True); + $this->audio_uri = $var; + + return $this; + } + + /** + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * + * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getAllowPlaybackInterruption() + { + return $this->allow_playback_interruption; + } + + /** + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * + * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAllowPlaybackInterruption($var) + { + GPBUtil::checkBool($var); + $this->allow_playback_interruption = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PlayAudio::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_PlayAudio::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ResponseType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ResponseType.php new file mode 100644 index 000000000000..d2b3c5f10465 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ResponseType.php @@ -0,0 +1,77 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType + */ +class ResponseType +{ + /** + * Not specified. + * + * Generated from protobuf enum RESPONSE_TYPE_UNSPECIFIED = 0; + */ + const RESPONSE_TYPE_UNSPECIFIED = 0; + /** + * The response is from an [entry + * prompt][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] in the + * page. + * + * Generated from protobuf enum ENTRY_PROMPT = 1; + */ + const ENTRY_PROMPT = 1; + /** + * The response is from [form-filling + * prompt][google.cloud.dialogflow.cx.v3.Form.Parameter.fill_behavior] in + * the page. + * + * Generated from protobuf enum PARAMETER_PROMPT = 2; + */ + const PARAMETER_PROMPT = 2; + /** + * The response is from a [transition + * route][google.cloud.dialogflow.cx.v3.TransitionRoute] or an [event + * handler][EventHandler] in the page or flow or transition route group. + * + * Generated from protobuf enum HANDLER_PROMPT = 3; + */ + const HANDLER_PROMPT = 3; + + private static $valueToName = [ + self::RESPONSE_TYPE_UNSPECIFIED => 'RESPONSE_TYPE_UNSPECIFIED', + self::ENTRY_PROMPT => 'ENTRY_PROMPT', + self::PARAMETER_PROMPT => 'PARAMETER_PROMPT', + self::HANDLER_PROMPT => 'HANDLER_PROMPT', + ]; + + 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(ResponseType::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_ResponseType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/TelephonyTransferCall.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/TelephonyTransferCall.php new file mode 100644 index 000000000000..5e4cf55b5241 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/TelephonyTransferCall.php @@ -0,0 +1,82 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall + */ +class TelephonyTransferCall extends \Google\Protobuf\Internal\Message +{ + protected $endpoint; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $phone_number + * Transfer the call to a phone number + * in [E.164 format](https://en.wikipedia.org/wiki/E.164). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + + /** + * Transfer the call to a phone number + * in [E.164 format](https://en.wikipedia.org/wiki/E.164). + * + * Generated from protobuf field string phone_number = 1; + * @return string + */ + public function getPhoneNumber() + { + return $this->readOneof(1); + } + + public function hasPhoneNumber() + { + return $this->hasOneof(1); + } + + /** + * Transfer the call to a phone number + * in [E.164 format](https://en.wikipedia.org/wiki/E.164). + * + * Generated from protobuf field string phone_number = 1; + * @param string $var + * @return $this + */ + public function setPhoneNumber($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getEndpoint() + { + return $this->whichOneof("endpoint"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TelephonyTransferCall::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_TelephonyTransferCall::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/Text.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/Text.php new file mode 100644 index 000000000000..73f412507ce0 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/Text.php @@ -0,0 +1,116 @@ +google.cloud.dialogflow.cx.v3.ResponseMessage.Text + */ +class Text extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A collection of text response variants. If multiple variants + * are defined, only one text response variant is returned at runtime. + * + * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $text; + /** + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * + * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $allow_playback_interruption = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $text + * Required. A collection of text response variants. If multiple variants + * are defined, only one text response variant is returned at runtime. + * @type bool $allow_playback_interruption + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); + parent::__construct($data); + } + + /** + * Required. A collection of text response variants. If multiple variants + * are defined, only one text response variant is returned at runtime. + * + * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getText() + { + return $this->text; + } + + /** + * Required. A collection of text response variants. If multiple variants + * are defined, only one text response variant is returned at runtime. + * + * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @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; + } + + /** + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * + * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getAllowPlaybackInterruption() + { + return $this->allow_playback_interruption; + } + + /** + * Output only. Whether the playback of this message can be interrupted by + * the end user's speech and the client can then starts the next Dialogflow + * request. + * + * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAllowPlaybackInterruption($var) + { + GPBUtil::checkBool($var); + $this->allow_playback_interruption = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Text::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_Text::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest.php new file mode 100644 index 000000000000..61add1cb7f43 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest.php @@ -0,0 +1,235 @@ +google.cloud.dialogflow.cx.v3.RestoreAgentRequest + */ +class RestoreAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the agent to restore into. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Agent restore mode. If not specified, `KEEP` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption restore_option = 5; + */ + protected $restore_option = 0; + protected $agent; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the agent to restore into. + * Format: `projects//locations//agents/`. + * @type string $agent_uri + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to restore agent from. The format of this URI must be + * `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 + * Uncompressed raw byte content for agent. + * @type \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest\GitSource $git_source + * Setting for restoring from a git branch + * @type int $restore_option + * Agent restore mode. If not specified, `KEEP` is assumed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the agent to restore into. + * Format: `projects//locations//agents/`. + * + * 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 agent to restore into. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to restore agent from. The format of this URI must be + * `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 [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + * to restore agent from. The format of this URI must be + * `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; + } + + /** + * Uncompressed 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); + } + + /** + * Uncompressed 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; + } + + /** + * Setting for restoring from a git branch + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RestoreAgentRequest.GitSource git_source = 6; + * @return \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest\GitSource|null + */ + public function getGitSource() + { + return $this->readOneof(6); + } + + public function hasGitSource() + { + return $this->hasOneof(6); + } + + /** + * Setting for restoring from a git branch + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RestoreAgentRequest.GitSource git_source = 6; + * @param \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest\GitSource $var + * @return $this + */ + public function setGitSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest\GitSource::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Agent restore mode. If not specified, `KEEP` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption restore_option = 5; + * @return int + */ + public function getRestoreOption() + { + return $this->restore_option; + } + + /** + * Agent restore mode. If not specified, `KEEP` is assumed. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption restore_option = 5; + * @param int $var + * @return $this + */ + public function setRestoreOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest\RestoreOption::class); + $this->restore_option = $var; + + return $this; + } + + /** + * @return string + */ + public function getAgent() + { + return $this->whichOneof("agent"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/GitSource.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/GitSource.php new file mode 100644 index 000000000000..e4c47467ad29 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/GitSource.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.cx.v3.RestoreAgentRequest.GitSource + */ +class GitSource extends \Google\Protobuf\Internal\Message +{ + /** + * tracking branch for the git pull + * + * Generated from protobuf field string tracking_branch = 1; + */ + protected $tracking_branch = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tracking_branch + * tracking branch for the git pull + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * tracking branch for the git pull + * + * Generated from protobuf field string tracking_branch = 1; + * @return string + */ + public function getTrackingBranch() + { + return $this->tracking_branch; + } + + /** + * tracking branch for the git pull + * + * Generated from protobuf field string tracking_branch = 1; + * @param string $var + * @return $this + */ + public function setTrackingBranch($var) + { + GPBUtil::checkString($var, True); + $this->tracking_branch = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GitSource::class, \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest_GitSource::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/RestoreOption.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/RestoreOption.php new file mode 100644 index 000000000000..266fc9ce1b56 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/RestoreOption.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption + */ +class RestoreOption +{ + /** + * Unspecified. Treated as KEEP. + * + * Generated from protobuf enum RESTORE_OPTION_UNSPECIFIED = 0; + */ + const RESTORE_OPTION_UNSPECIFIED = 0; + /** + * Always respect the settings from the exported agent file. It may cause + * a restoration failure if some settings (e.g. model type) are not + * supported in the target agent. + * + * Generated from protobuf enum KEEP = 1; + */ + const KEEP = 1; + /** + * Fallback to default settings if some settings are not supported in the + * target agent. + * + * Generated from protobuf enum FALLBACK = 2; + */ + const FALLBACK = 2; + + private static $valueToName = [ + self::RESTORE_OPTION_UNSPECIFIED => 'RESTORE_OPTION_UNSPECIFIED', + self::KEEP => 'KEEP', + self::FALLBACK => 'FALLBACK', + ]; + + 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(RestoreOption::class, \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest_RestoreOption::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionRequest.php new file mode 100644 index 000000000000..4848322acf35 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + */ +class RestorePlaybookVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. Please see + * {@see PlaybooksClient::playbookVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\RestorePlaybookVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//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 playbook version. + * Format: + * `projects//locations//agents//playbooks//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionResponse.php new file mode 100644 index 000000000000..d1f8477a14ee --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionResponse.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + */ +class RestorePlaybookVersionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The updated playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + */ + protected $playbook = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Playbook $playbook + * The updated playbook. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * The updated playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\Playbook|null + */ + public function getPlaybook() + { + return $this->playbook; + } + + public function hasPlaybook() + { + return isset($this->playbook); + } + + public function clearPlaybook() + { + unset($this->playbook); + } + + /** + * The updated playbook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\Playbook $var + * @return $this + */ + public function setPlaybook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Playbook::class); + $this->playbook = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionRequest.php new file mode 100644 index 000000000000..501e069b0cae --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest + */ +class RestoreToolVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. Please see + * {@see ToolsClient::toolVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\RestoreToolVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//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 tool version. + * Format: + * `projects//locations//agents//tools//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionResponse.php new file mode 100644 index 000000000000..b7ed819c70e9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionResponse.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + */ +class RestoreToolVersionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The updated tool. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 2; + */ + protected $tool = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool $tool + * The updated tool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * The updated tool. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool|null + */ + public function getTool() + { + return $this->tool; + } + + public function hasTool() + { + return isset($this->tool); + } + + public function clearTool() + { + unset($this->tool); + } + + /** + * The updated tool. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool $var + * @return $this + */ + public function setTool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool::class); + $this->tool = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig.php new file mode 100644 index 000000000000..d493c3933674 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig.php @@ -0,0 +1,167 @@ +google.cloud.dialogflow.cx.v3.RolloutConfig + */ +class RolloutConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Steps to roll out a flow version. Steps should be sorted by percentage in + * ascending order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + */ + private $rollout_steps; + /** + * The conditions that are used to evaluate the success of a rollout + * step. If not specified, all rollout steps will proceed to the next one + * unless failure conditions are met. E.g. "containment_rate > 60% AND + * callback_rate < 20%". See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string rollout_condition = 2; + */ + protected $rollout_condition = ''; + /** + * The conditions that are used to evaluate the failure of a rollout + * step. If not specified, no rollout steps will fail. E.g. "containment_rate + * < 10% OR average_turn_count < 3". See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string failure_condition = 3; + */ + protected $failure_condition = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\RolloutConfig\RolloutStep>|\Google\Protobuf\Internal\RepeatedField $rollout_steps + * Steps to roll out a flow version. Steps should be sorted by percentage in + * ascending order. + * @type string $rollout_condition + * The conditions that are used to evaluate the success of a rollout + * step. If not specified, all rollout steps will proceed to the next one + * unless failure conditions are met. E.g. "containment_rate > 60% AND + * callback_rate < 20%". See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * @type string $failure_condition + * The conditions that are used to evaluate the failure of a rollout + * step. If not specified, no rollout steps will fail. E.g. "containment_rate + * < 10% OR average_turn_count < 3". See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Steps to roll out a flow version. Steps should be sorted by percentage in + * ascending order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRolloutSteps() + { + return $this->rollout_steps; + } + + /** + * Steps to roll out a flow version. Steps should be sorted by percentage in + * ascending order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\RolloutConfig\RolloutStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRolloutSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig\RolloutStep::class); + $this->rollout_steps = $arr; + + return $this; + } + + /** + * The conditions that are used to evaluate the success of a rollout + * step. If not specified, all rollout steps will proceed to the next one + * unless failure conditions are met. E.g. "containment_rate > 60% AND + * callback_rate < 20%". See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string rollout_condition = 2; + * @return string + */ + public function getRolloutCondition() + { + return $this->rollout_condition; + } + + /** + * The conditions that are used to evaluate the success of a rollout + * step. If not specified, all rollout steps will proceed to the next one + * unless failure conditions are met. E.g. "containment_rate > 60% AND + * callback_rate < 20%". See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string rollout_condition = 2; + * @param string $var + * @return $this + */ + public function setRolloutCondition($var) + { + GPBUtil::checkString($var, True); + $this->rollout_condition = $var; + + return $this; + } + + /** + * The conditions that are used to evaluate the failure of a rollout + * step. If not specified, no rollout steps will fail. E.g. "containment_rate + * < 10% OR average_turn_count < 3". See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string failure_condition = 3; + * @return string + */ + public function getFailureCondition() + { + return $this->failure_condition; + } + + /** + * The conditions that are used to evaluate the failure of a rollout + * step. If not specified, no rollout steps will fail. E.g. "containment_rate + * < 10% OR average_turn_count < 3". See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * + * Generated from protobuf field string failure_condition = 3; + * @param string $var + * @return $this + */ + public function setFailureCondition($var) + { + GPBUtil::checkString($var, True); + $this->failure_condition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig/RolloutStep.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig/RolloutStep.php new file mode 100644 index 000000000000..17ab73e82dab --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig/RolloutStep.php @@ -0,0 +1,160 @@ +google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + */ +class RolloutStep extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the rollout step; + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The percentage of traffic allocated to the flow version of this rollout + * step. (0%, 100%]. + * + * Generated from protobuf field int32 traffic_percent = 2; + */ + protected $traffic_percent = 0; + /** + * The minimum time that this step should last. Should be longer than 1 + * hour. If not set, the default minimum duration for each step will be 1 + * hour. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3; + */ + protected $min_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The name of the rollout step; + * @type int $traffic_percent + * The percentage of traffic allocated to the flow version of this rollout + * step. (0%, 100%]. + * @type \Google\Protobuf\Duration $min_duration + * The minimum time that this step should last. Should be longer than 1 + * hour. If not set, the default minimum duration for each step will be 1 + * hour. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * The name of the rollout step; + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name of the rollout step; + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The percentage of traffic allocated to the flow version of this rollout + * step. (0%, 100%]. + * + * Generated from protobuf field int32 traffic_percent = 2; + * @return int + */ + public function getTrafficPercent() + { + return $this->traffic_percent; + } + + /** + * The percentage of traffic allocated to the flow version of this rollout + * step. (0%, 100%]. + * + * Generated from protobuf field int32 traffic_percent = 2; + * @param int $var + * @return $this + */ + public function setTrafficPercent($var) + { + GPBUtil::checkInt32($var); + $this->traffic_percent = $var; + + return $this; + } + + /** + * The minimum time that this step should last. Should be longer than 1 + * hour. If not set, the default minimum duration for each step will be 1 + * hour. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getMinDuration() + { + return $this->min_duration; + } + + public function hasMinDuration() + { + return isset($this->min_duration); + } + + public function clearMinDuration() + { + unset($this->min_duration); + } + + /** + * The minimum time that this step should last. Should be longer than 1 + * hour. If not set, the default minimum duration for each step will be 1 + * hour. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RolloutStep::class, \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig_RolloutStep::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutState.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutState.php new file mode 100644 index 000000000000..b8f796e8b78e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutState.php @@ -0,0 +1,145 @@ +google.cloud.dialogflow.cx.v3.RolloutState + */ +class RolloutState extends \Google\Protobuf\Internal\Message +{ + /** + * Display name of the current auto rollout step. + * + * Generated from protobuf field string step = 1; + */ + protected $step = ''; + /** + * Index of the current step in the auto rollout steps list. + * + * Generated from protobuf field int32 step_index = 3; + */ + protected $step_index = 0; + /** + * Start time of the current step. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $step + * Display name of the current auto rollout step. + * @type int $step_index + * Index of the current step in the auto rollout steps list. + * @type \Google\Protobuf\Timestamp $start_time + * Start time of the current step. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Display name of the current auto rollout step. + * + * Generated from protobuf field string step = 1; + * @return string + */ + public function getStep() + { + return $this->step; + } + + /** + * Display name of the current auto rollout step. + * + * Generated from protobuf field string step = 1; + * @param string $var + * @return $this + */ + public function setStep($var) + { + GPBUtil::checkString($var, True); + $this->step = $var; + + return $this; + } + + /** + * Index of the current step in the auto rollout steps list. + * + * Generated from protobuf field int32 step_index = 3; + * @return int + */ + public function getStepIndex() + { + return $this->step_index; + } + + /** + * Index of the current step in the auto rollout steps list. + * + * Generated from protobuf field int32 step_index = 3; + * @param int $var + * @return $this + */ + public function setStepIndex($var) + { + GPBUtil::checkInt32($var); + $this->step_index = $var; + + return $this; + } + + /** + * Start time of the current step. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @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); + } + + /** + * Start time of the current step. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestMetadata.php new file mode 100644 index 000000000000..5268445090ca --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestMetadata.php @@ -0,0 +1,69 @@ +google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + */ +class RunContinuousTestMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The test errors. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $errors + * The test errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * The test errors. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * The test errors. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestRequest.php new file mode 100644 index 000000000000..f1a0e46bb7c2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestRequest.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.cx.v3.RunContinuousTestRequest + */ +class RunContinuousTestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $environment = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $environment + * Required. Format: + * `projects//locations//agents//environments/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Required. Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestResponse.php new file mode 100644 index 000000000000..73ac7c3a10e2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestResponse.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + */ +class RunContinuousTestResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The result for a continuous test run. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_result = 1; + */ + protected $continuous_test_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult $continuous_test_result + * The result for a continuous test run. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * The result for a continuous test run. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_result = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult|null + */ + public function getContinuousTestResult() + { + return $this->continuous_test_result; + } + + public function hasContinuousTestResult() + { + return isset($this->continuous_test_result); + } + + public function clearContinuousTestResult() + { + unset($this->continuous_test_result); + } + + /** + * The result for a continuous test run. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_result = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult $var + * @return $this + */ + public function setContinuousTestResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult::class); + $this->continuous_test_result = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseMetadata.php new file mode 100644 index 000000000000..911a4f3537e9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseMetadata.php @@ -0,0 +1,35 @@ +google.cloud.dialogflow.cx.v3.RunTestCaseMetadata + */ +class RunTestCaseMetadata 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\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseRequest.php new file mode 100644 index 000000000000..90e3bf3f4682 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseRequest.php @@ -0,0 +1,114 @@ +google.cloud.dialogflow.cx.v3.RunTestCaseRequest + */ +class RunTestCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format of test case name to run: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Environment name. If not set, draft environment is assumed. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $environment = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format of test case name to run: + * `projects//locations//agents//testCases/`. + * @type string $environment + * Optional. Environment name. If not set, draft environment is assumed. + * Format: + * `projects//locations//agents//environments/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format of test case name to run: + * `projects//locations//agents//testCases/`. + * + * 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. Format of test case name to run: + * `projects//locations//agents//testCases/`. + * + * 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. Environment name. If not set, draft environment is assumed. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Optional. Environment name. If not set, draft environment is assumed. + * Format: + * `projects//locations//agents//environments/`. + * + * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseResponse.php new file mode 100644 index 000000000000..5dee95f93f91 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseResponse.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.cx.v3.RunTestCaseResponse + */ +class RunTestCaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The result. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult $result + * The result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The result. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * The result. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php new file mode 100644 index 000000000000..b3870547e05a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php @@ -0,0 +1,241 @@ +google.cloud.dialogflow.cx.v3.SafetySettings + */ +class SafetySettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Default phrase match strategy for banned phrases. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_banned_phrase_match_strategy = 0; + /** + * Banned phrases for generated text. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + private $banned_phrases; + /** + * Optional. Settings for Responsible AI checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rai_settings = null; + /** + * Optional. Immutable. Default RAI settings to be annotated on the agent, so + * that users will be able to restore their RAI configurations to the default + * settings. Read-only field for the API proto only. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $default_rai_settings = null; + /** + * Optional. Settings for prompt security checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $prompt_security_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $default_banned_phrase_match_strategy + * Optional. Default phrase match strategy for banned phrases. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\SafetySettings\Phrase>|\Google\Protobuf\Internal\RepeatedField $banned_phrases + * Banned phrases for generated text. + * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $rai_settings + * Optional. Settings for Responsible AI checks. + * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $default_rai_settings + * Optional. Immutable. Default RAI settings to be annotated on the agent, so + * that users will be able to restore their RAI configurations to the default + * settings. Read-only field for the API proto only. + * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings $prompt_security_settings + * Optional. Settings for prompt security checks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SafetySettings::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Default phrase match strategy for banned phrases. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDefaultBannedPhraseMatchStrategy() + { + return $this->default_banned_phrase_match_strategy; + } + + /** + * Optional. Default phrase match strategy for banned phrases. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDefaultBannedPhraseMatchStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PhraseMatchStrategy::class); + $this->default_banned_phrase_match_strategy = $var; + + return $this; + } + + /** + * Banned phrases for generated text. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBannedPhrases() + { + return $this->banned_phrases; + } + + /** + * Banned phrases for generated text. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\SafetySettings\Phrase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBannedPhrases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\Phrase::class); + $this->banned_phrases = $arr; + + return $this; + } + + /** + * Optional. Settings for Responsible AI checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings|null + */ + public function getRaiSettings() + { + return $this->rai_settings; + } + + public function hasRaiSettings() + { + return isset($this->rai_settings); + } + + public function clearRaiSettings() + { + unset($this->rai_settings); + } + + /** + * Optional. Settings for Responsible AI checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $var + * @return $this + */ + public function setRaiSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings::class); + $this->rai_settings = $var; + + return $this; + } + + /** + * Optional. Immutable. Default RAI settings to be annotated on the agent, so + * that users will be able to restore their RAI configurations to the default + * settings. Read-only field for the API proto only. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings|null + */ + public function getDefaultRaiSettings() + { + return $this->default_rai_settings; + } + + public function hasDefaultRaiSettings() + { + return isset($this->default_rai_settings); + } + + public function clearDefaultRaiSettings() + { + unset($this->default_rai_settings); + } + + /** + * Optional. Immutable. Default RAI settings to be annotated on the agent, so + * that users will be able to restore their RAI configurations to the default + * settings. Read-only field for the API proto only. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $var + * @return $this + */ + public function setDefaultRaiSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings::class); + $this->default_rai_settings = $var; + + return $this; + } + + /** + * Optional. Settings for prompt security checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings|null + */ + public function getPromptSecuritySettings() + { + return $this->prompt_security_settings; + } + + public function hasPromptSecuritySettings() + { + return isset($this->prompt_security_settings); + } + + public function clearPromptSecuritySettings() + { + unset($this->prompt_security_settings); + } + + /** + * Optional. Settings for prompt security checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings $var + * @return $this + */ + public function setPromptSecuritySettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings::class); + $this->prompt_security_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/Phrase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/Phrase.php new file mode 100644 index 000000000000..1b3894187c66 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/Phrase.php @@ -0,0 +1,104 @@ +google.cloud.dialogflow.cx.v3.SafetySettings.Phrase + */ +class Phrase extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Text input which can be used for prompt or banned phrases. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $text = ''; + /** + * Required. Language code of the phrase. + * + * 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. Text input which can be used for prompt or banned phrases. + * @type string $language_code + * Required. Language code of the phrase. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SafetySettings::initOnce(); + parent::__construct($data); + } + + /** + * Required. Text input which can be used for prompt or banned phrases. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. Text input which can be used for prompt or banned phrases. + * + * 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. Language code of the phrase. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Required. Language code of the phrase. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Phrase::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_Phrase::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PhraseMatchStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PhraseMatchStrategy.php new file mode 100644 index 000000000000..ed071d1aefb7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PhraseMatchStrategy.php @@ -0,0 +1,66 @@ +google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy + */ +class PhraseMatchStrategy +{ + /** + * Unspecified, defaults to PARTIAL_MATCH. + * + * Generated from protobuf enum PHRASE_MATCH_STRATEGY_UNSPECIFIED = 0; + */ + const PHRASE_MATCH_STRATEGY_UNSPECIFIED = 0; + /** + * Text that contains the phrase as a substring will be matched, e.g. "foo" + * will match "afoobar". + * + * Generated from protobuf enum PARTIAL_MATCH = 1; + */ + const PARTIAL_MATCH = 1; + /** + * Text that contains the tokenized words of the phrase will be matched, + * e.g. "foo" will match "a foo bar" and "foo bar", but not "foobar". + * + * Generated from protobuf enum WORD_MATCH = 2; + */ + const WORD_MATCH = 2; + + private static $valueToName = [ + self::PHRASE_MATCH_STRATEGY_UNSPECIFIED => 'PHRASE_MATCH_STRATEGY_UNSPECIFIED', + self::PARTIAL_MATCH => 'PARTIAL_MATCH', + self::WORD_MATCH => 'WORD_MATCH', + ]; + + 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(PhraseMatchStrategy::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_PhraseMatchStrategy::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PromptSecuritySettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PromptSecuritySettings.php new file mode 100644 index 000000000000..f4521571ecca --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PromptSecuritySettings.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + */ +class PromptSecuritySettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Enable prompt security checks. + * + * Generated from protobuf field bool enable_prompt_security = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_prompt_security = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_prompt_security + * Optional. Enable prompt security checks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SafetySettings::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Enable prompt security checks. + * + * Generated from protobuf field bool enable_prompt_security = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnablePromptSecurity() + { + return $this->enable_prompt_security; + } + + /** + * Optional. Enable prompt security checks. + * + * Generated from protobuf field bool enable_prompt_security = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnablePromptSecurity($var) + { + GPBUtil::checkBool($var); + $this->enable_prompt_security = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PromptSecuritySettings::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_PromptSecuritySettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings.php new file mode 100644 index 000000000000..ca7f48416892 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + */ +class RaiSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. RAI blocking configurations. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $category_filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings\CategoryFilter>|\Google\Protobuf\Internal\RepeatedField $category_filters + * Optional. RAI blocking configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SafetySettings::initOnce(); + parent::__construct($data); + } + + /** + * Optional. RAI blocking configurations. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategoryFilters() + { + return $this->category_filters; + } + + /** + * Optional. RAI blocking configurations. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings\CategoryFilter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategoryFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings\CategoryFilter::class); + $this->category_filters = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RaiSettings::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_RaiSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/CategoryFilter.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/CategoryFilter.php new file mode 100644 index 000000000000..4ed89eb58ae3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/CategoryFilter.php @@ -0,0 +1,104 @@ +google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + */ +class CategoryFilter extends \Google\Protobuf\Internal\Message +{ + /** + * RAI category to configure. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + */ + protected $category = 0; + /** + * Blocking sensitivity level to configure for the RAI category. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + */ + protected $filter_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $category + * RAI category to configure. + * @type int $filter_level + * Blocking sensitivity level to configure for the RAI category. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SafetySettings::initOnce(); + parent::__construct($data); + } + + /** + * RAI category to configure. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * @return int + */ + public function getCategory() + { + return $this->category; + } + + /** + * RAI category to configure. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * @param int $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings\SafetyCategory::class); + $this->category = $var; + + return $this; + } + + /** + * Blocking sensitivity level to configure for the RAI category. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * @return int + */ + public function getFilterLevel() + { + return $this->filter_level; + } + + /** + * Blocking sensitivity level to configure for the RAI category. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * @param int $var + * @return $this + */ + public function setFilterLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings\SafetyFilterLevel::class); + $this->filter_level = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CategoryFilter::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_RaiSettings_CategoryFilter::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyCategory.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyCategory.php new file mode 100644 index 000000000000..ca65f38cd1ef --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyCategory.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory + */ +class SafetyCategory +{ + /** + * Unspecified. + * + * Generated from protobuf enum SAFETY_CATEGORY_UNSPECIFIED = 0; + */ + const SAFETY_CATEGORY_UNSPECIFIED = 0; + /** + * Dangerous content. + * + * Generated from protobuf enum DANGEROUS_CONTENT = 1; + */ + const DANGEROUS_CONTENT = 1; + /** + * Hate speech. + * + * Generated from protobuf enum HATE_SPEECH = 2; + */ + const HATE_SPEECH = 2; + /** + * Harassment. + * + * Generated from protobuf enum HARASSMENT = 3; + */ + const HARASSMENT = 3; + /** + * Sexually explicit content. + * + * Generated from protobuf enum SEXUALLY_EXPLICIT_CONTENT = 4; + */ + const SEXUALLY_EXPLICIT_CONTENT = 4; + + private static $valueToName = [ + self::SAFETY_CATEGORY_UNSPECIFIED => 'SAFETY_CATEGORY_UNSPECIFIED', + self::DANGEROUS_CONTENT => 'DANGEROUS_CONTENT', + self::HATE_SPEECH => 'HATE_SPEECH', + self::HARASSMENT => 'HARASSMENT', + self::SEXUALLY_EXPLICIT_CONTENT => 'SEXUALLY_EXPLICIT_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(SafetyCategory::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_RaiSettings_SafetyCategory::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php new file mode 100644 index 000000000000..daf098e17429 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php @@ -0,0 +1,78 @@ +google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + */ +class SafetyFilterLevel +{ + /** + * Unspecified -- uses default sensitivity levels. + * + * Generated from protobuf enum SAFETY_FILTER_LEVEL_UNSPECIFIED = 0; + */ + const SAFETY_FILTER_LEVEL_UNSPECIFIED = 0; + /** + * Block no text -- effectively disables the category. + * + * Generated from protobuf enum BLOCK_NONE = 1; + */ + const BLOCK_NONE = 1; + /** + * Block a few suspicious texts. + * + * Generated from protobuf enum BLOCK_FEW = 2; + */ + const BLOCK_FEW = 2; + /** + * Block some suspicious texts. + * + * Generated from protobuf enum BLOCK_SOME = 3; + */ + const BLOCK_SOME = 3; + /** + * Block most suspicious texts. + * + * Generated from protobuf enum BLOCK_MOST = 4; + */ + const BLOCK_MOST = 4; + + private static $valueToName = [ + self::SAFETY_FILTER_LEVEL_UNSPECIFIED => 'SAFETY_FILTER_LEVEL_UNSPECIFIED', + self::BLOCK_NONE => 'BLOCK_NONE', + self::BLOCK_FEW => 'BLOCK_FEW', + self::BLOCK_SOME => 'BLOCK_SOME', + self::BLOCK_MOST => 'BLOCK_MOST', + ]; + + 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(SafetyFilterLevel::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_RaiSettings_SafetyFilterLevel::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SearchConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SearchConfig.php new file mode 100644 index 000000000000..df261de52ea9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SearchConfig.php @@ -0,0 +1,129 @@ +google.cloud.dialogflow.cx.v3.SearchConfig + */ +class SearchConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Boosting configuration for the datastores. + * Maps from datastore name to their boost configuration. Do not specify more + * than one BoostSpecs for each datastore name. If multiple BoostSpecs are + * provided for the same datastore name, the behavior is undefined. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $boost_specs; + /** + * Optional. Filter configuration for the datastores. + * Maps from datastore name to the filter expression for that datastore. Do + * not specify more than one FilterSpecs for each datastore name. If multiple + * FilterSpecs are provided for the same datastore name, the behavior is + * undefined. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $filter_specs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpecs>|\Google\Protobuf\Internal\RepeatedField $boost_specs + * Optional. Boosting configuration for the datastores. + * Maps from datastore name to their boost configuration. Do not specify more + * than one BoostSpecs for each datastore name. If multiple BoostSpecs are + * provided for the same datastore name, the behavior is undefined. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\FilterSpecs>|\Google\Protobuf\Internal\RepeatedField $filter_specs + * Optional. Filter configuration for the datastores. + * Maps from datastore name to the filter expression for that datastore. Do + * not specify more than one FilterSpecs for each datastore name. If multiple + * FilterSpecs are provided for the same datastore name, the behavior is + * undefined. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Boosting configuration for the datastores. + * Maps from datastore name to their boost configuration. Do not specify more + * than one BoostSpecs for each datastore name. If multiple BoostSpecs are + * provided for the same datastore name, the behavior is undefined. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBoostSpecs() + { + return $this->boost_specs; + } + + /** + * Optional. Boosting configuration for the datastores. + * Maps from datastore name to their boost configuration. Do not specify more + * than one BoostSpecs for each datastore name. If multiple BoostSpecs are + * provided for the same datastore name, the behavior is undefined. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpecs>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBoostSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\BoostSpecs::class); + $this->boost_specs = $arr; + + return $this; + } + + /** + * Optional. Filter configuration for the datastores. + * Maps from datastore name to the filter expression for that datastore. Do + * not specify more than one FilterSpecs for each datastore name. If multiple + * FilterSpecs are provided for the same datastore name, the behavior is + * undefined. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilterSpecs() + { + return $this->filter_specs; + } + + /** + * Optional. Filter configuration for the datastores. + * Maps from datastore name to the filter expression for that datastore. Do + * not specify more than one FilterSpecs for each datastore name. If multiple + * FilterSpecs are provided for the same datastore name, the behavior is + * undefined. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\FilterSpecs>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilterSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\FilterSpecs::class); + $this->filter_specs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php new file mode 100644 index 000000000000..ac6874769c0e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php @@ -0,0 +1,664 @@ +google.cloud.dialogflow.cx.v3.SecuritySettings + */ +class SecuritySettings extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the settings. + * Required for the + * [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] + * method. + * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings] + * populates the name automatically. Format: + * `projects//locations//securitySettings/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the security settings, unique within + * the location. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Strategy that defines how we do redaction. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy redaction_strategy = 3; + */ + protected $redaction_strategy = 0; + /** + * Defines the data for which Dialogflow applies redaction. Dialogflow does + * not redact data that it does not have access to – for example, Cloud + * logging. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope redaction_scope = 4; + */ + protected $redaction_scope = 0; + /** + * [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this + * template to define inspect base settings. + * The `DLP Inspect Templates Reader` role is needed on the Dialogflow + * service identity service account (has the form + * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) + * for your agent's project. + * If empty, we use the default DLP inspect config. + * The template name will have one of the following formats: + * `projects//locations//inspectTemplates/` + * OR + * `organizations//locations//inspectTemplates/` + * Note: `inspect_template` must be located in the same region as the + * `SecuritySettings`. + * + * Generated from protobuf field string inspect_template = 9 [(.google.api.resource_reference) = { + */ + protected $inspect_template = ''; + /** + * [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this + * template to define de-identification configuration for the content. + * The `DLP De-identify Templates Reader` role is needed on the Dialogflow + * service identity service account (has the form + * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) + * for your agent's project. + * If empty, Dialogflow replaces sensitive info with `[redacted]` text. + * The template name will have one of the following formats: + * `projects//locations//deidentifyTemplates/` + * OR + * `organizations//locations//deidentifyTemplates/` + * Note: `deidentify_template` must be located in the same region as the + * `SecuritySettings`. + * + * Generated from protobuf field string deidentify_template = 17 [(.google.api.resource_reference) = { + */ + protected $deidentify_template = ''; + /** + * List of types of data to remove when retention settings triggers purge. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; + */ + private $purge_data_types; + /** + * Controls audio export settings for post-conversation analytics when + * ingesting audio to conversations via [Participants.AnalyzeContent][] or + * [Participants.StreamingAnalyzeContent][]. + * If + * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] + * is set to REMOVE_AFTER_CONVERSATION or [audio_export_settings.gcs_bucket][] + * is empty, audio export is disabled. + * If audio export is enabled, audio is recorded and saved to + * [audio_export_settings.gcs_bucket][], subject to retention policy of + * [audio_export_settings.gcs_bucket][]. + * This setting won't effect audio input for implicit sessions via + * [Sessions.DetectIntent][google.cloud.dialogflow.cx.v3.Sessions.DetectIntent] + * or + * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings audio_export_settings = 12; + */ + protected $audio_export_settings = null; + /** + * Controls conversation exporting settings to Insights after conversation is + * completed. + * If + * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] + * is set to REMOVE_AFTER_CONVERSATION, Insights export is disabled no matter + * what you configure here. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + */ + protected $insights_export_settings = null; + protected $data_retention; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the settings. + * Required for the + * [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] + * method. + * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings] + * populates the name automatically. Format: + * `projects//locations//securitySettings/`. + * @type string $display_name + * Required. The human-readable name of the security settings, unique within + * the location. + * @type int $redaction_strategy + * Strategy that defines how we do redaction. + * @type int $redaction_scope + * Defines the data for which Dialogflow applies redaction. Dialogflow does + * not redact data that it does not have access to – for example, Cloud + * logging. + * @type string $inspect_template + * [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this + * template to define inspect base settings. + * The `DLP Inspect Templates Reader` role is needed on the Dialogflow + * service identity service account (has the form + * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) + * for your agent's project. + * If empty, we use the default DLP inspect config. + * The template name will have one of the following formats: + * `projects//locations//inspectTemplates/` + * OR + * `organizations//locations//inspectTemplates/` + * Note: `inspect_template` must be located in the same region as the + * `SecuritySettings`. + * @type string $deidentify_template + * [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this + * template to define de-identification configuration for the content. + * The `DLP De-identify Templates Reader` role is needed on the Dialogflow + * service identity service account (has the form + * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) + * for your agent's project. + * If empty, Dialogflow replaces sensitive info with `[redacted]` text. + * The template name will have one of the following formats: + * `projects//locations//deidentifyTemplates/` + * OR + * `organizations//locations//deidentifyTemplates/` + * Note: `deidentify_template` must be located in the same region as the + * `SecuritySettings`. + * @type int $retention_window_days + * Retains the data for the specified number of days. + * User must set a value lower than Dialogflow's default 365d TTL (30 days + * for Agent Assist traffic), higher value will be ignored and use default. + * Setting a value higher than that has no effect. A missing value or + * setting to 0 also means we use default TTL. + * When data retention configuration is changed, it only applies to the data + * created after the change; the TTL of existing data created before the + * change stays intact. + * @type int $retention_strategy + * Specifies the retention behavior defined by + * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy]. + * @type array|\Google\Protobuf\Internal\RepeatedField $purge_data_types + * List of types of data to remove when retention settings triggers purge. + * @type \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\AudioExportSettings $audio_export_settings + * Controls audio export settings for post-conversation analytics when + * ingesting audio to conversations via [Participants.AnalyzeContent][] or + * [Participants.StreamingAnalyzeContent][]. + * If + * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] + * is set to REMOVE_AFTER_CONVERSATION or [audio_export_settings.gcs_bucket][] + * is empty, audio export is disabled. + * If audio export is enabled, audio is recorded and saved to + * [audio_export_settings.gcs_bucket][], subject to retention policy of + * [audio_export_settings.gcs_bucket][]. + * This setting won't effect audio input for implicit sessions via + * [Sessions.DetectIntent][google.cloud.dialogflow.cx.v3.Sessions.DetectIntent] + * or + * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]. + * @type \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\InsightsExportSettings $insights_export_settings + * Controls conversation exporting settings to Insights after conversation is + * completed. + * If + * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] + * is set to REMOVE_AFTER_CONVERSATION, Insights export is disabled no matter + * what you configure here. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the settings. + * Required for the + * [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] + * method. + * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings] + * populates the name automatically. Format: + * `projects//locations//securitySettings/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the settings. + * Required for the + * [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] + * method. + * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings] + * populates the name automatically. Format: + * `projects//locations//securitySettings/`. + * + * 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 human-readable name of the security settings, unique within + * the location. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the security settings, unique within + * the location. + * + * 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; + } + + /** + * Strategy that defines how we do redaction. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy redaction_strategy = 3; + * @return int + */ + public function getRedactionStrategy() + { + return $this->redaction_strategy; + } + + /** + * Strategy that defines how we do redaction. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy redaction_strategy = 3; + * @param int $var + * @return $this + */ + public function setRedactionStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\RedactionStrategy::class); + $this->redaction_strategy = $var; + + return $this; + } + + /** + * Defines the data for which Dialogflow applies redaction. Dialogflow does + * not redact data that it does not have access to – for example, Cloud + * logging. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope redaction_scope = 4; + * @return int + */ + public function getRedactionScope() + { + return $this->redaction_scope; + } + + /** + * Defines the data for which Dialogflow applies redaction. Dialogflow does + * not redact data that it does not have access to – for example, Cloud + * logging. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope redaction_scope = 4; + * @param int $var + * @return $this + */ + public function setRedactionScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\RedactionScope::class); + $this->redaction_scope = $var; + + return $this; + } + + /** + * [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this + * template to define inspect base settings. + * The `DLP Inspect Templates Reader` role is needed on the Dialogflow + * service identity service account (has the form + * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) + * for your agent's project. + * If empty, we use the default DLP inspect config. + * The template name will have one of the following formats: + * `projects//locations//inspectTemplates/` + * OR + * `organizations//locations//inspectTemplates/` + * Note: `inspect_template` must be located in the same region as the + * `SecuritySettings`. + * + * Generated from protobuf field string inspect_template = 9 [(.google.api.resource_reference) = { + * @return string + */ + public function getInspectTemplate() + { + return $this->inspect_template; + } + + /** + * [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this + * template to define inspect base settings. + * The `DLP Inspect Templates Reader` role is needed on the Dialogflow + * service identity service account (has the form + * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) + * for your agent's project. + * If empty, we use the default DLP inspect config. + * The template name will have one of the following formats: + * `projects//locations//inspectTemplates/` + * OR + * `organizations//locations//inspectTemplates/` + * Note: `inspect_template` must be located in the same region as the + * `SecuritySettings`. + * + * Generated from protobuf field string inspect_template = 9 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInspectTemplate($var) + { + GPBUtil::checkString($var, True); + $this->inspect_template = $var; + + return $this; + } + + /** + * [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this + * template to define de-identification configuration for the content. + * The `DLP De-identify Templates Reader` role is needed on the Dialogflow + * service identity service account (has the form + * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) + * for your agent's project. + * If empty, Dialogflow replaces sensitive info with `[redacted]` text. + * The template name will have one of the following formats: + * `projects//locations//deidentifyTemplates/` + * OR + * `organizations//locations//deidentifyTemplates/` + * Note: `deidentify_template` must be located in the same region as the + * `SecuritySettings`. + * + * Generated from protobuf field string deidentify_template = 17 [(.google.api.resource_reference) = { + * @return string + */ + public function getDeidentifyTemplate() + { + return $this->deidentify_template; + } + + /** + * [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this + * template to define de-identification configuration for the content. + * The `DLP De-identify Templates Reader` role is needed on the Dialogflow + * service identity service account (has the form + * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) + * for your agent's project. + * If empty, Dialogflow replaces sensitive info with `[redacted]` text. + * The template name will have one of the following formats: + * `projects//locations//deidentifyTemplates/` + * OR + * `organizations//locations//deidentifyTemplates/` + * Note: `deidentify_template` must be located in the same region as the + * `SecuritySettings`. + * + * Generated from protobuf field string deidentify_template = 17 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDeidentifyTemplate($var) + { + GPBUtil::checkString($var, True); + $this->deidentify_template = $var; + + return $this; + } + + /** + * Retains the data for the specified number of days. + * User must set a value lower than Dialogflow's default 365d TTL (30 days + * for Agent Assist traffic), higher value will be ignored and use default. + * Setting a value higher than that has no effect. A missing value or + * setting to 0 also means we use default TTL. + * When data retention configuration is changed, it only applies to the data + * created after the change; the TTL of existing data created before the + * change stays intact. + * + * Generated from protobuf field int32 retention_window_days = 6; + * @return int + */ + public function getRetentionWindowDays() + { + return $this->readOneof(6); + } + + public function hasRetentionWindowDays() + { + return $this->hasOneof(6); + } + + /** + * Retains the data for the specified number of days. + * User must set a value lower than Dialogflow's default 365d TTL (30 days + * for Agent Assist traffic), higher value will be ignored and use default. + * Setting a value higher than that has no effect. A missing value or + * setting to 0 also means we use default TTL. + * When data retention configuration is changed, it only applies to the data + * created after the change; the TTL of existing data created before the + * change stays intact. + * + * Generated from protobuf field int32 retention_window_days = 6; + * @param int $var + * @return $this + */ + public function setRetentionWindowDays($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Specifies the retention behavior defined by + * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * @return int + */ + public function getRetentionStrategy() + { + return $this->readOneof(7); + } + + public function hasRetentionStrategy() + { + return $this->hasOneof(7); + } + + /** + * Specifies the retention behavior defined by + * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; + * @param int $var + * @return $this + */ + public function setRetentionStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\RetentionStrategy::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * List of types of data to remove when retention settings triggers purge. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPurgeDataTypes() + { + return $this->purge_data_types; + } + + /** + * List of types of data to remove when retention settings triggers purge. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPurgeDataTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\PurgeDataType::class); + $this->purge_data_types = $arr; + + return $this; + } + + /** + * Controls audio export settings for post-conversation analytics when + * ingesting audio to conversations via [Participants.AnalyzeContent][] or + * [Participants.StreamingAnalyzeContent][]. + * If + * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] + * is set to REMOVE_AFTER_CONVERSATION or [audio_export_settings.gcs_bucket][] + * is empty, audio export is disabled. + * If audio export is enabled, audio is recorded and saved to + * [audio_export_settings.gcs_bucket][], subject to retention policy of + * [audio_export_settings.gcs_bucket][]. + * This setting won't effect audio input for implicit sessions via + * [Sessions.DetectIntent][google.cloud.dialogflow.cx.v3.Sessions.DetectIntent] + * or + * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings audio_export_settings = 12; + * @return \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\AudioExportSettings|null + */ + public function getAudioExportSettings() + { + return $this->audio_export_settings; + } + + public function hasAudioExportSettings() + { + return isset($this->audio_export_settings); + } + + public function clearAudioExportSettings() + { + unset($this->audio_export_settings); + } + + /** + * Controls audio export settings for post-conversation analytics when + * ingesting audio to conversations via [Participants.AnalyzeContent][] or + * [Participants.StreamingAnalyzeContent][]. + * If + * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] + * is set to REMOVE_AFTER_CONVERSATION or [audio_export_settings.gcs_bucket][] + * is empty, audio export is disabled. + * If audio export is enabled, audio is recorded and saved to + * [audio_export_settings.gcs_bucket][], subject to retention policy of + * [audio_export_settings.gcs_bucket][]. + * This setting won't effect audio input for implicit sessions via + * [Sessions.DetectIntent][google.cloud.dialogflow.cx.v3.Sessions.DetectIntent] + * or + * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings audio_export_settings = 12; + * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\AudioExportSettings $var + * @return $this + */ + public function setAudioExportSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\AudioExportSettings::class); + $this->audio_export_settings = $var; + + return $this; + } + + /** + * Controls conversation exporting settings to Insights after conversation is + * completed. + * If + * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] + * is set to REMOVE_AFTER_CONVERSATION, Insights export is disabled no matter + * what you configure here. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * @return \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\InsightsExportSettings|null + */ + public function getInsightsExportSettings() + { + return $this->insights_export_settings; + } + + public function hasInsightsExportSettings() + { + return isset($this->insights_export_settings); + } + + public function clearInsightsExportSettings() + { + unset($this->insights_export_settings); + } + + /** + * Controls conversation exporting settings to Insights after conversation is + * completed. + * If + * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] + * is set to REMOVE_AFTER_CONVERSATION, Insights export is disabled no matter + * what you configure here. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\InsightsExportSettings $var + * @return $this + */ + public function setInsightsExportSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\InsightsExportSettings::class); + $this->insights_export_settings = $var; + + return $this; + } + + /** + * @return string + */ + public function getDataRetention() + { + return $this->whichOneof("data_retention"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings.php new file mode 100644 index 000000000000..dd50e8d017e7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings.php @@ -0,0 +1,250 @@ +google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + */ +class AudioExportSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud Storage bucket to export audio record to. + * Setting this field would grant the Storage Object Creator role to + * the Dialogflow Service Agent. + * API caller that tries to modify this field should have the permission of + * storage.buckets.setIamPolicy. + * + * Generated from protobuf field string gcs_bucket = 1; + */ + protected $gcs_bucket = ''; + /** + * Filename pattern for exported audio. + * {conversation} and {timestamp} are placeholders that will be replaced + * with the conversation ID and epoch micros of the conversation. + * For example, "{conversation}/recording_{timestamp}.mulaw". + * + * Generated from protobuf field string audio_export_pattern = 2; + */ + protected $audio_export_pattern = ''; + /** + * Enable audio redaction if it is true. + * Note that this only redacts end-user audio data; + * Synthesised audio from the virtual agent is not redacted. + * + * Generated from protobuf field bool enable_audio_redaction = 3; + */ + protected $enable_audio_redaction = false; + /** + * File format for exported audio file. Currently only in telephony + * recordings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat audio_format = 4; + */ + protected $audio_format = 0; + /** + * Whether to store TTS audio. By default, TTS audio from the virtual agent + * is not exported. + * + * Generated from protobuf field bool store_tts_audio = 6; + */ + protected $store_tts_audio = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_bucket + * Cloud Storage bucket to export audio record to. + * Setting this field would grant the Storage Object Creator role to + * the Dialogflow Service Agent. + * API caller that tries to modify this field should have the permission of + * storage.buckets.setIamPolicy. + * @type string $audio_export_pattern + * Filename pattern for exported audio. + * {conversation} and {timestamp} are placeholders that will be replaced + * with the conversation ID and epoch micros of the conversation. + * For example, "{conversation}/recording_{timestamp}.mulaw". + * @type bool $enable_audio_redaction + * Enable audio redaction if it is true. + * Note that this only redacts end-user audio data; + * Synthesised audio from the virtual agent is not redacted. + * @type int $audio_format + * File format for exported audio file. Currently only in telephony + * recordings. + * @type bool $store_tts_audio + * Whether to store TTS audio. By default, TTS audio from the virtual agent + * is not exported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Storage bucket to export audio record to. + * Setting this field would grant the Storage Object Creator role to + * the Dialogflow Service Agent. + * API caller that tries to modify this field should have the permission of + * storage.buckets.setIamPolicy. + * + * Generated from protobuf field string gcs_bucket = 1; + * @return string + */ + public function getGcsBucket() + { + return $this->gcs_bucket; + } + + /** + * Cloud Storage bucket to export audio record to. + * Setting this field would grant the Storage Object Creator role to + * the Dialogflow Service Agent. + * API caller that tries to modify this field should have the permission of + * storage.buckets.setIamPolicy. + * + * Generated from protobuf field string gcs_bucket = 1; + * @param string $var + * @return $this + */ + public function setGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->gcs_bucket = $var; + + return $this; + } + + /** + * Filename pattern for exported audio. + * {conversation} and {timestamp} are placeholders that will be replaced + * with the conversation ID and epoch micros of the conversation. + * For example, "{conversation}/recording_{timestamp}.mulaw". + * + * Generated from protobuf field string audio_export_pattern = 2; + * @return string + */ + public function getAudioExportPattern() + { + return $this->audio_export_pattern; + } + + /** + * Filename pattern for exported audio. + * {conversation} and {timestamp} are placeholders that will be replaced + * with the conversation ID and epoch micros of the conversation. + * For example, "{conversation}/recording_{timestamp}.mulaw". + * + * Generated from protobuf field string audio_export_pattern = 2; + * @param string $var + * @return $this + */ + public function setAudioExportPattern($var) + { + GPBUtil::checkString($var, True); + $this->audio_export_pattern = $var; + + return $this; + } + + /** + * Enable audio redaction if it is true. + * Note that this only redacts end-user audio data; + * Synthesised audio from the virtual agent is not redacted. + * + * Generated from protobuf field bool enable_audio_redaction = 3; + * @return bool + */ + public function getEnableAudioRedaction() + { + return $this->enable_audio_redaction; + } + + /** + * Enable audio redaction if it is true. + * Note that this only redacts end-user audio data; + * Synthesised audio from the virtual agent is not redacted. + * + * Generated from protobuf field bool enable_audio_redaction = 3; + * @param bool $var + * @return $this + */ + public function setEnableAudioRedaction($var) + { + GPBUtil::checkBool($var); + $this->enable_audio_redaction = $var; + + return $this; + } + + /** + * File format for exported audio file. Currently only in telephony + * recordings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat audio_format = 4; + * @return int + */ + public function getAudioFormat() + { + return $this->audio_format; + } + + /** + * File format for exported audio file. Currently only in telephony + * recordings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat audio_format = 4; + * @param int $var + * @return $this + */ + public function setAudioFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\AudioExportSettings\AudioFormat::class); + $this->audio_format = $var; + + return $this; + } + + /** + * Whether to store TTS audio. By default, TTS audio from the virtual agent + * is not exported. + * + * Generated from protobuf field bool store_tts_audio = 6; + * @return bool + */ + public function getStoreTtsAudio() + { + return $this->store_tts_audio; + } + + /** + * Whether to store TTS audio. By default, TTS audio from the virtual agent + * is not exported. + * + * Generated from protobuf field bool store_tts_audio = 6; + * @param bool $var + * @return $this + */ + public function setStoreTtsAudio($var) + { + GPBUtil::checkBool($var); + $this->store_tts_audio = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AudioExportSettings::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_AudioExportSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings/AudioFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings/AudioFormat.php new file mode 100644 index 000000000000..14def86c787f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings/AudioFormat.php @@ -0,0 +1,72 @@ +google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat + */ +class AudioFormat +{ + /** + * Unspecified. Do not use. + * + * Generated from protobuf enum AUDIO_FORMAT_UNSPECIFIED = 0; + */ + const AUDIO_FORMAT_UNSPECIFIED = 0; + /** + * G.711 mu-law PCM with 8kHz sample rate. + * + * Generated from protobuf enum MULAW = 1; + */ + const MULAW = 1; + /** + * MP3 file format. + * + * Generated from protobuf enum MP3 = 2; + */ + const MP3 = 2; + /** + * OGG Vorbis. + * + * Generated from protobuf enum OGG = 3; + */ + const OGG = 3; + + private static $valueToName = [ + self::AUDIO_FORMAT_UNSPECIFIED => 'AUDIO_FORMAT_UNSPECIFIED', + self::MULAW => 'MULAW', + self::MP3 => 'MP3', + self::OGG => 'OGG', + ]; + + 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(AudioFormat::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_AudioExportSettings_AudioFormat::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/InsightsExportSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/InsightsExportSettings.php new file mode 100644 index 000000000000..15efba779a48 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/InsightsExportSettings.php @@ -0,0 +1,75 @@ +google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + */ +class InsightsExportSettings extends \Google\Protobuf\Internal\Message +{ + /** + * If enabled, we will automatically exports + * conversations to Insights and Insights runs its analyzers. + * + * Generated from protobuf field bool enable_insights_export = 1; + */ + protected $enable_insights_export = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_insights_export + * If enabled, we will automatically exports + * conversations to Insights and Insights runs its analyzers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); + parent::__construct($data); + } + + /** + * If enabled, we will automatically exports + * conversations to Insights and Insights runs its analyzers. + * + * Generated from protobuf field bool enable_insights_export = 1; + * @return bool + */ + public function getEnableInsightsExport() + { + return $this->enable_insights_export; + } + + /** + * If enabled, we will automatically exports + * conversations to Insights and Insights runs its analyzers. + * + * Generated from protobuf field bool enable_insights_export = 1; + * @param bool $var + * @return $this + */ + public function setEnableInsightsExport($var) + { + GPBUtil::checkBool($var); + $this->enable_insights_export = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InsightsExportSettings::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_InsightsExportSettings::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/PurgeDataType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/PurgeDataType.php new file mode 100644 index 000000000000..812e66f5b94d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/PurgeDataType.php @@ -0,0 +1,58 @@ +google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType + */ +class PurgeDataType +{ + /** + * Unspecified. Do not use. + * + * Generated from protobuf enum PURGE_DATA_TYPE_UNSPECIFIED = 0; + */ + const PURGE_DATA_TYPE_UNSPECIFIED = 0; + /** + * Dialogflow history. This does not include Cloud logging, which is + * owned by the user - not Dialogflow. + * + * Generated from protobuf enum DIALOGFLOW_HISTORY = 1; + */ + const DIALOGFLOW_HISTORY = 1; + + private static $valueToName = [ + self::PURGE_DATA_TYPE_UNSPECIFIED => 'PURGE_DATA_TYPE_UNSPECIFIED', + self::DIALOGFLOW_HISTORY => 'DIALOGFLOW_HISTORY', + ]; + + 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(PurgeDataType::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_PurgeDataType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionScope.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionScope.php new file mode 100644 index 000000000000..bb8dc42d46a5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionScope.php @@ -0,0 +1,59 @@ +google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope + */ +class RedactionScope +{ + /** + * Don't redact any kind of data. + * + * Generated from protobuf enum REDACTION_SCOPE_UNSPECIFIED = 0; + */ + const REDACTION_SCOPE_UNSPECIFIED = 0; + /** + * On data to be written to disk or similar devices that are capable of + * holding data even if power is disconnected. This includes data that are + * temporarily saved on disk. + * + * Generated from protobuf enum REDACT_DISK_STORAGE = 2; + */ + const REDACT_DISK_STORAGE = 2; + + private static $valueToName = [ + self::REDACTION_SCOPE_UNSPECIFIED => 'REDACTION_SCOPE_UNSPECIFIED', + self::REDACT_DISK_STORAGE => 'REDACT_DISK_STORAGE', + ]; + + 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(RedactionScope::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_RedactionScope::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionStrategy.php new file mode 100644 index 000000000000..9df4b80256cb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionStrategy.php @@ -0,0 +1,57 @@ +google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy + */ +class RedactionStrategy +{ + /** + * Do not redact. + * + * Generated from protobuf enum REDACTION_STRATEGY_UNSPECIFIED = 0; + */ + const REDACTION_STRATEGY_UNSPECIFIED = 0; + /** + * Call redaction service to clean up the data to be persisted. + * + * Generated from protobuf enum REDACT_WITH_SERVICE = 1; + */ + const REDACT_WITH_SERVICE = 1; + + private static $valueToName = [ + self::REDACTION_STRATEGY_UNSPECIFIED => 'REDACTION_STRATEGY_UNSPECIFIED', + self::REDACT_WITH_SERVICE => 'REDACT_WITH_SERVICE', + ]; + + 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(RedactionStrategy::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_RedactionStrategy::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RetentionStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RetentionStrategy.php new file mode 100644 index 000000000000..1ed62776ef37 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RetentionStrategy.php @@ -0,0 +1,59 @@ +google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy + */ +class RetentionStrategy +{ + /** + * Retains the persisted data with Dialogflow's internal default 365d TTLs. + * + * Generated from protobuf enum RETENTION_STRATEGY_UNSPECIFIED = 0; + */ + const RETENTION_STRATEGY_UNSPECIFIED = 0; + /** + * Removes data when the conversation ends. If there is no [Conversation][] + * explicitly established, a default conversation ends when the + * corresponding Dialogflow session ends. + * + * Generated from protobuf enum REMOVE_AFTER_CONVERSATION = 1; + */ + const REMOVE_AFTER_CONVERSATION = 1; + + private static $valueToName = [ + self::RETENTION_STRATEGY_UNSPECIFIED => 'RETENTION_STRATEGY_UNSPECIFIED', + self::REMOVE_AFTER_CONVERSATION => 'REMOVE_AFTER_CONVERSATION', + ]; + + 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(RetentionStrategy::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_RetentionStrategy::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SentimentAnalysisResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SentimentAnalysisResult.php new file mode 100644 index 000000000000..f943f7222d97 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SentimentAnalysisResult.php @@ -0,0 +1,111 @@ +google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + */ +class SentimentAnalysisResult 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\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType.php new file mode 100644 index 000000000000..276fa59d7bee --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType.php @@ -0,0 +1,176 @@ +google.cloud.dialogflow.cx.v3.SessionEntityType + */ +class SessionEntityType extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique identifier of the session entity type. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * + * 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.cx.v3.SessionEntityType.EntityOverrideMode entity_override_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_override_mode = 0; + /** + * Required. The collection of entities to override or supplement the custom + * entity type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 4 [(.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 the session entity type. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * @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\Cx\V3\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * Required. The collection of entities to override or supplement the custom + * entity type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique identifier of the session entity type. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * 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 session entity type. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * 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; + } + + /** + * Required. Indicates whether the additional data should override or + * supplement the custom entity type definition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode entity_override_mode = 3 [(.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.cx.v3.SessionEntityType.EntityOverrideMode entity_override_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setEntityOverrideMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType\EntityOverrideMode::class); + $this->entity_override_mode = $var; + + return $this; + } + + /** + * Required. The collection of entities to override or supplement the custom + * entity type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * Required. The collection of entities to override or supplement the custom + * entity type. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\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\Cx\V3\EntityType\Entity::class); + $this->entities = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType/EntityOverrideMode.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType/EntityOverrideMode.php new file mode 100644 index 000000000000..d5a9388c9778 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType/EntityOverrideMode.php @@ -0,0 +1,73 @@ +google.cloud.dialogflow.cx.v3.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.cx.v3.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\Cx\V3\SessionEntityType_EntityOverrideMode::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionInfo.php new file mode 100644 index 000000000000..6a0e0c1a1945 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionInfo.php @@ -0,0 +1,169 @@ +google.cloud.dialogflow.cx.v3.SessionInfo + */ +class SessionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * unique identifier of the + * [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This + * field can be used by the webhook to identify a session. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/` + * if environment is specified. + * + * Generated from protobuf field string session = 1 [(.google.api.resource_reference) = { + */ + protected $session = ''; + /** + * Optional for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional + * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All + * parameters collected from forms and intents during the session. Parameters + * can be created, updated, or removed by the webhook. To remove a parameter + * from the session, the webhook should explicitly set the parameter value to + * null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * The map is keyed by parameters' display names. + * + * Generated from protobuf field map parameters = 2; + */ + private $parameters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $session + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * unique identifier of the + * [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This + * field can be used by the webhook to identify a session. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/` + * if environment is specified. + * @type array|\Google\Protobuf\Internal\MapField $parameters + * Optional for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional + * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All + * parameters collected from forms and intents during the session. Parameters + * can be created, updated, or removed by the webhook. To remove a parameter + * from the session, the webhook should explicitly set the parameter value to + * null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * The map is keyed by parameters' display names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * unique identifier of the + * [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This + * field can be used by the webhook to identify a session. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/` + * if environment is specified. + * + * Generated from protobuf field string session = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * Always present for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for + * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The + * unique identifier of the + * [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This + * field can be used by the webhook to identify a session. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/` + * if environment is specified. + * + * Generated from protobuf field string session = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkString($var, True); + $this->session = $var; + + return $this; + } + + /** + * Optional for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional + * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All + * parameters collected from forms and intents during the session. Parameters + * can be created, updated, or removed by the webhook. To remove a parameter + * from the session, the webhook should explicitly set the parameter value to + * null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * The map is keyed by parameters' display names. + * + * Generated from protobuf field map parameters = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Optional for + * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional + * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All + * parameters collected from forms and intents during the session. Parameters + * can be created, updated, or removed by the webhook. To remove a parameter + * from the session, the webhook should explicitly set the parameter value to + * null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. + * The map is keyed by parameters' display names. + * + * Generated from protobuf field map parameters = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->parameters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechModelVariant.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechModelVariant.php new file mode 100644 index 000000000000..fc49f268c1f0 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechModelVariant.php @@ -0,0 +1,85 @@ +google.cloud.dialogflow.cx.v3.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. + * + * 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.cx.v3.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. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechToTextSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechToTextSettings.php new file mode 100644 index 000000000000..757d670f862c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechToTextSettings.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.cx.v3.SpeechToTextSettings + */ +class SpeechToTextSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Whether to use speech adaptation for speech recognition. + * + * Generated from protobuf field bool enable_speech_adaptation = 1; + */ + protected $enable_speech_adaptation = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_speech_adaptation + * Whether to use speech adaptation for speech recognition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Whether to use speech adaptation for speech recognition. + * + * Generated from protobuf field bool enable_speech_adaptation = 1; + * @return bool + */ + public function getEnableSpeechAdaptation() + { + return $this->enable_speech_adaptation; + } + + /** + * Whether to use speech adaptation for speech recognition. + * + * Generated from protobuf field bool enable_speech_adaptation = 1; + * @param bool $var + * @return $this + */ + public function setEnableSpeechAdaptation($var) + { + GPBUtil::checkBool($var); + $this->enable_speech_adaptation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechWordInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechWordInfo.php new file mode 100644 index 000000000000..86eef94bf55c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechWordInfo.php @@ -0,0 +1,225 @@ +google.cloud.dialogflow.cx.v3.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\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SsmlVoiceGender.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SsmlVoiceGender.php new file mode 100644 index 000000000000..b08fbec467ce --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SsmlVoiceGender.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.cx.v3.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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StartExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StartExperimentRequest.php new file mode 100644 index 000000000000..b68f6792a0fd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StartExperimentRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.StartExperimentRequest + */ +class StartExperimentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the experiment to start. + * Format: + * `projects//locations//agents//environments//experiments/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the experiment to start. + * Format: + * `projects//locations//agents//environments//experiments/`. Please see + * {@see ExperimentsClient::experimentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\StartExperimentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the experiment to start. + * Format: + * `projects//locations//agents//environments//experiments/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the experiment to start. + * Format: + * `projects//locations//agents//environments//experiments/`. + * + * 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 name of the experiment to start. + * Format: + * `projects//locations//agents//environments//experiments/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StopExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StopExperimentRequest.php new file mode 100644 index 000000000000..a2803c63e258 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StopExperimentRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.StopExperimentRequest + */ +class StopExperimentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the experiment to stop. + * Format: + * `projects//locations//agents//environments//experiments/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the experiment to stop. + * Format: + * `projects//locations//agents//environments//experiments/`. Please see + * {@see ExperimentsClient::experimentName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\StopExperimentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the experiment to stop. + * Format: + * `projects//locations//agents//environments//experiments/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the experiment to stop. + * Format: + * `projects//locations//agents//environments//experiments/`. + * + * 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 name of the experiment to stop. + * Format: + * `projects//locations//agents//environments//experiments/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentRequest.php new file mode 100644 index 000000000000..5a2b556d4590 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentRequest.php @@ -0,0 +1,407 @@ +google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + */ +class StreamingDetectIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the session this query is sent to. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * Note: session must be set in the first request. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * + * Generated from protobuf field string session = 1 [(.google.api.resource_reference) = { + */ + protected $session = ''; + /** + * The parameters of this query. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; + */ + protected $query_params = null; + /** + * Required. The input specification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query_input = null; + /** + * Instructs the speech synthesizer how to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; + */ + protected $output_audio_config = null; + /** + * Enable partial detect intent response. If this flag is not enabled, + * response stream still contains only one final `DetectIntentResponse` even + * if some `Fulfillment`s in the agent have been configured to return partial + * responses. + * + * Generated from protobuf field bool enable_partial_response = 5; + */ + protected $enable_partial_response = false; + /** + * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + * + * Generated from protobuf field bool enable_debugging_info = 8; + */ + protected $enable_debugging_info = false; + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $response_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $session + * The name of the session this query is sent to. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * Note: session must be set in the first request. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * @type \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $query_params + * The parameters of this query. + * @type \Google\Cloud\Dialogflow\Cx\V3\QueryInput $query_input + * Required. The input specification. + * @type \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $output_audio_config + * Instructs the speech synthesizer how to generate the output audio. + * @type bool $enable_partial_response + * Enable partial detect intent response. If this flag is not enabled, + * response stream still contains only one final `DetectIntentResponse` even + * if some `Fulfillment`s in the agent have been configured to return partial + * responses. + * @type bool $enable_debugging_info + * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + * @type int $response_view + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * The name of the session this query is sent to. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * Note: session must be set in the first request. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * + * Generated from protobuf field string session = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * The name of the session this query is sent to. + * Format: + * `projects//locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * Note: session must be set in the first request. + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * + * Generated from protobuf field string session = 1 [(.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.cx.v3.QueryParameters query_params = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.QueryParameters query_params = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $var + * @return $this + */ + public function setQueryParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryParameters::class); + $this->query_params = $var; + + return $this; + } + + /** + * Required. The input specification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\QueryInput $var + * @return $this + */ + public function setQueryInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryInput::class); + $this->query_input = $var; + + return $this; + } + + /** + * Instructs the speech synthesizer how to generate the output audio. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\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. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $var + * @return $this + */ + public function setOutputAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig::class); + $this->output_audio_config = $var; + + return $this; + } + + /** + * Enable partial detect intent response. If this flag is not enabled, + * response stream still contains only one final `DetectIntentResponse` even + * if some `Fulfillment`s in the agent have been configured to return partial + * responses. + * + * Generated from protobuf field bool enable_partial_response = 5; + * @return bool + */ + public function getEnablePartialResponse() + { + return $this->enable_partial_response; + } + + /** + * Enable partial detect intent response. If this flag is not enabled, + * response stream still contains only one final `DetectIntentResponse` even + * if some `Fulfillment`s in the agent have been configured to return partial + * responses. + * + * Generated from protobuf field bool enable_partial_response = 5; + * @param bool $var + * @return $this + */ + public function setEnablePartialResponse($var) + { + GPBUtil::checkBool($var); + $this->enable_partial_response = $var; + + return $this; + } + + /** + * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + * + * Generated from protobuf field bool enable_debugging_info = 8; + * @return bool + */ + public function getEnableDebuggingInfo() + { + return $this->enable_debugging_info; + } + + /** + * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + * + * Generated from protobuf field bool enable_debugging_info = 8; + * @param bool $var + * @return $this + */ + public function setEnableDebuggingInfo($var) + { + GPBUtil::checkBool($var); + $this->enable_debugging_info = $var; + + return $this; + } + + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponseView::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentResponse.php new file mode 100644 index 000000000000..d482d49cea84 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentResponse.php @@ -0,0 +1,174 @@ +google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + */ +class StreamingDetectIntentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Debugging info that would get populated when + * `StreamingDetectIntentRequest.enable_debugging_info` is set to true. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo debugging_info = 4; + */ + protected $debugging_info = null; + protected $response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\StreamingRecognitionResult $recognition_result + * The result of speech recognition. + * @type \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse $detect_intent_response + * The response from detect intent. + * @type \Google\Cloud\Dialogflow\Cx\V3\CloudConversationDebuggingInfo $debugging_info + * Debugging info that would get populated when + * `StreamingDetectIntentRequest.enable_debugging_info` is set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * The result of speech recognition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.StreamingRecognitionResult recognition_result = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\StreamingRecognitionResult|null + */ + public function getRecognitionResult() + { + return $this->readOneof(1); + } + + public function hasRecognitionResult() + { + return $this->hasOneof(1); + } + + /** + * The result of speech recognition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.StreamingRecognitionResult recognition_result = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\StreamingRecognitionResult $var + * @return $this + */ + public function setRecognitionResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\StreamingRecognitionResult::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The response from detect intent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponse detect_intent_response = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse|null + */ + public function getDetectIntentResponse() + { + return $this->readOneof(2); + } + + public function hasDetectIntentResponse() + { + return $this->hasOneof(2); + } + + /** + * The response from detect intent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponse detect_intent_response = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse $var + * @return $this + */ + public function setDetectIntentResponse($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Debugging info that would get populated when + * `StreamingDetectIntentRequest.enable_debugging_info` is set to true. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo debugging_info = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\CloudConversationDebuggingInfo|null + */ + public function getDebuggingInfo() + { + return $this->debugging_info; + } + + public function hasDebuggingInfo() + { + return isset($this->debugging_info); + } + + public function clearDebuggingInfo() + { + unset($this->debugging_info); + } + + /** + * Debugging info that would get populated when + * `StreamingDetectIntentRequest.enable_debugging_info` is set to true. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo debugging_info = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\CloudConversationDebuggingInfo $var + * @return $this + */ + public function setDebuggingInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\CloudConversationDebuggingInfo::class); + $this->debugging_info = $var; + + return $this; + } + + /** + * @return string + */ + public function getResponse() + { + return $this->whichOneof("response"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult.php new file mode 100644 index 000000000000..7a946e3912d8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult.php @@ -0,0 +1,425 @@ +google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + */ +class StreamingRecognitionResult extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the result message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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; + /** + * An estimate of the likelihood that the speech recognizer will + * not change its guess about this interim recognition result: + * * If the value is unspecified or 0.0, Dialogflow didn't compute the + * stability. In particular, Dialogflow will only provide stability for + * `TRANSCRIPT` results with `is_final = false`. + * * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely + * unstable and 1.0 means completely stable. + * + * Generated from protobuf field float stability = 6; + */ + protected $stability = 0.0; + /** + * Word-specific information for the words recognized by Speech in + * [transcript][google.cloud.dialogflow.cx.v3.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.cx.v3.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 float $stability + * An estimate of the likelihood that the speech recognizer will + * not change its guess about this interim recognition result: + * * If the value is unspecified or 0.0, Dialogflow didn't compute the + * stability. In particular, Dialogflow will only provide stability for + * `TRANSCRIPT` results with `is_final = false`. + * * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely + * unstable and 1.0 means completely stable. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\SpeechWordInfo>|\Google\Protobuf\Internal\RepeatedField $speech_word_info + * Word-specific information for the words recognized by Speech in + * [transcript][google.cloud.dialogflow.cx.v3.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\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Type of the result message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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.cx.v3.StreamingRecognitionResult.MessageType message_type = 1; + * @param int $var + * @return $this + */ + public function setMessageType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\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; + } + + /** + * An estimate of the likelihood that the speech recognizer will + * not change its guess about this interim recognition result: + * * If the value is unspecified or 0.0, Dialogflow didn't compute the + * stability. In particular, Dialogflow will only provide stability for + * `TRANSCRIPT` results with `is_final = false`. + * * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely + * unstable and 1.0 means completely stable. + * + * Generated from protobuf field float stability = 6; + * @return float + */ + public function getStability() + { + return $this->stability; + } + + /** + * An estimate of the likelihood that the speech recognizer will + * not change its guess about this interim recognition result: + * * If the value is unspecified or 0.0, Dialogflow didn't compute the + * stability. In particular, Dialogflow will only provide stability for + * `TRANSCRIPT` results with `is_final = false`. + * * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely + * unstable and 1.0 means completely stable. + * + * Generated from protobuf field float stability = 6; + * @param float $var + * @return $this + */ + public function setStability($var) + { + GPBUtil::checkFloat($var); + $this->stability = $var; + + return $this; + } + + /** + * Word-specific information for the words recognized by Speech in + * [transcript][google.cloud.dialogflow.cx.v3.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.cx.v3.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.cx.v3.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.cx.v3.SpeechWordInfo speech_word_info = 7; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\SpeechWordInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpeechWordInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult/MessageType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult/MessageType.php new file mode 100644 index 000000000000..7141d9964d97 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult/MessageType.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.cx.v3.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; + /** + * This event indicates that the server has detected the end of the user's + * speech utterance and expects no additional speech. 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`][google.cloud.dialogflow.cx.v3.InputAudioConfig.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\Cx\V3\StreamingRecognitionResult_MessageType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SubmitAnswerFeedbackRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SubmitAnswerFeedbackRequest.php new file mode 100644 index 000000000000..58052fdac077 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SubmitAnswerFeedbackRequest.php @@ -0,0 +1,197 @@ +google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + */ +class SubmitAnswerFeedbackRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session the feedback was sent to. + * + * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $session = ''; + /** + * Required. ID of the response to update its feedback. This is the same as + * DetectIntentResponse.response_id. + * + * Generated from protobuf field string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $response_id = ''; + /** + * Required. Feedback provided for a bot answer. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $answer_feedback = null; + /** + * Optional. The mask to control which fields to update. If the mask is not + * present, all fields will be 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 $session + * Required. The name of the session the feedback was sent to. + * @type string $response_id + * Required. ID of the response to update its feedback. This is the same as + * DetectIntentResponse.response_id. + * @type \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback $answer_feedback + * Required. Feedback provided for a bot answer. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The mask to control which fields to update. If the mask is not + * present, all fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session the feedback was sent to. + * + * 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 feedback was sent to. + * + * 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; + } + + /** + * Required. ID of the response to update its feedback. This is the same as + * DetectIntentResponse.response_id. + * + * Generated from protobuf field string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResponseId() + { + return $this->response_id; + } + + /** + * Required. ID of the response to update its feedback. This is the same as + * DetectIntentResponse.response_id. + * + * Generated from protobuf field string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResponseId($var) + { + GPBUtil::checkString($var, True); + $this->response_id = $var; + + return $this; + } + + /** + * Required. Feedback provided for a bot answer. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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. Feedback provided for a bot answer. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback $var + * @return $this + */ + public function setAnswerFeedback($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback::class); + $this->answer_feedback = $var; + + return $this; + } + + /** + * Optional. The mask to control which fields to update. If the mask is not + * present, all fields will be 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 to update. If the mask is not + * present, all fields will be 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SynthesizeSpeechConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SynthesizeSpeechConfig.php new file mode 100644 index 000000000000..00d8c4d024dc --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SynthesizeSpeechConfig.php @@ -0,0 +1,269 @@ +google.cloud.dialogflow.cx.v3.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.cx.v3.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\Cx\V3\VoiceSelectionParams $voice + * Optional. The desired voice of the synthesized audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.VoiceSelectionParams voice = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.VoiceSelectionParams voice = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\VoiceSelectionParams $var + * @return $this + */ + public function setVoice($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\VoiceSelectionParams::class); + $this->voice = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCase.php new file mode 100644 index 000000000000..c47340f503c3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCase.php @@ -0,0 +1,367 @@ +google.cloud.dialogflow.cx.v3.TestCase + */ +class TestCase extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the test case. + * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] + * will populate the name automatically. Otherwise use format: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Tags are short descriptions that users may apply to test cases for + * organizational and filtering purposes. Each tag should start with "#" and + * has a limit of 30 characters. + * + * Generated from protobuf field repeated string tags = 2; + */ + private $tags; + /** + * Required. The human-readable name of the test case, unique within the + * agent. Limit of 200 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Additional freeform notes about the test case. Limit of 400 characters. + * + * Generated from protobuf field string notes = 4; + */ + protected $notes = ''; + /** + * Config for the test case. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + */ + protected $test_config = null; + /** + * The conversation turns uttered when the test case was created, in + * chronological order. These include the canonical set of agent utterances + * that should occur when the agent is working properly. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + */ + private $test_case_conversation_turns; + /** + * Output only. When the test was created. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creation_time = null; + /** + * The latest test result. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + */ + protected $last_test_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the test case. + * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] + * will populate the name automatically. Otherwise use format: + * `projects//locations//agents//testCases/`. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Tags are short descriptions that users may apply to test cases for + * organizational and filtering purposes. Each tag should start with "#" and + * has a limit of 30 characters. + * @type string $display_name + * Required. The human-readable name of the test case, unique within the + * agent. Limit of 200 characters. + * @type string $notes + * Additional freeform notes about the test case. Limit of 400 characters. + * @type \Google\Cloud\Dialogflow\Cx\V3\TestConfig $test_config + * Config for the test case. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ConversationTurn>|\Google\Protobuf\Internal\RepeatedField $test_case_conversation_turns + * The conversation turns uttered when the test case was created, in + * chronological order. These include the canonical set of agent utterances + * that should occur when the agent is working properly. + * @type \Google\Protobuf\Timestamp $creation_time + * Output only. When the test was created. + * @type \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult $last_test_result + * The latest test result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the test case. + * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] + * will populate the name automatically. Otherwise use format: + * `projects//locations//agents//testCases/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the test case. + * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] + * will populate the name automatically. Otherwise use format: + * `projects//locations//agents//testCases/`. + * + * 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; + } + + /** + * Tags are short descriptions that users may apply to test cases for + * organizational and filtering purposes. Each tag should start with "#" and + * has a limit of 30 characters. + * + * Generated from protobuf field repeated string tags = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Tags are short descriptions that users may apply to test cases for + * organizational and filtering purposes. Each tag should start with "#" and + * has a limit of 30 characters. + * + * Generated from protobuf field repeated string tags = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Required. The human-readable name of the test case, unique within the + * agent. Limit of 200 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the test case, unique within the + * agent. Limit of 200 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Additional freeform notes about the test case. Limit of 400 characters. + * + * Generated from protobuf field string notes = 4; + * @return string + */ + public function getNotes() + { + return $this->notes; + } + + /** + * Additional freeform notes about the test case. Limit of 400 characters. + * + * Generated from protobuf field string notes = 4; + * @param string $var + * @return $this + */ + public function setNotes($var) + { + GPBUtil::checkString($var, True); + $this->notes = $var; + + return $this; + } + + /** + * Config for the test case. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + * @return \Google\Cloud\Dialogflow\Cx\V3\TestConfig|null + */ + public function getTestConfig() + { + return $this->test_config; + } + + public function hasTestConfig() + { + return isset($this->test_config); + } + + public function clearTestConfig() + { + unset($this->test_config); + } + + /** + * Config for the test case. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; + * @param \Google\Cloud\Dialogflow\Cx\V3\TestConfig $var + * @return $this + */ + public function setTestConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestConfig::class); + $this->test_config = $var; + + return $this; + } + + /** + * The conversation turns uttered when the test case was created, in + * chronological order. These include the canonical set of agent utterances + * that should occur when the agent is working properly. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTestCaseConversationTurns() + { + return $this->test_case_conversation_turns; + } + + /** + * The conversation turns uttered when the test case was created, in + * chronological order. These include the canonical set of agent utterances + * that should occur when the agent is working properly. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ConversationTurn>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTestCaseConversationTurns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn::class); + $this->test_case_conversation_turns = $arr; + + return $this; + } + + /** + * Output only. When the test was created. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreationTime() + { + return $this->creation_time; + } + + public function hasCreationTime() + { + return isset($this->creation_time); + } + + public function clearCreationTime() + { + unset($this->creation_time); + } + + /** + * Output only. When the test was created. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->creation_time = $var; + + return $this; + } + + /** + * The latest test result. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + * @return \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult|null + */ + public function getLastTestResult() + { + return $this->last_test_result; + } + + public function hasLastTestResult() + { + return isset($this->last_test_result); + } + + public function clearLastTestResult() + { + unset($this->last_test_result); + } + + /** + * The latest test result. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; + * @param \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult $var + * @return $this + */ + public function setLastTestResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult::class); + $this->last_test_result = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseError.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseError.php new file mode 100644 index 000000000000..c0fb08d1c871 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseError.php @@ -0,0 +1,121 @@ +google.cloud.dialogflow.cx.v3.TestCaseError + */ +class TestCaseError extends \Google\Protobuf\Internal\Message +{ + /** + * The test case. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + */ + protected $test_case = null; + /** + * The status associated with the test case. + * + * 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\Cloud\Dialogflow\Cx\V3\TestCase $test_case + * The test case. + * @type \Google\Rpc\Status $status + * The status associated with the test case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The test case. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\TestCase|null + */ + public function getTestCase() + { + return $this->test_case; + } + + public function hasTestCase() + { + return isset($this->test_case); + } + + public function clearTestCase() + { + unset($this->test_case); + } + + /** + * The test case. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\TestCase $var + * @return $this + */ + public function setTestCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestCase::class); + $this->test_case = $var; + + return $this; + } + + /** + * The status associated with the test case. + * + * 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 associated with the test case. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseResult.php new file mode 100644 index 000000000000..5f6c3e68e04f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseResult.php @@ -0,0 +1,225 @@ +google.cloud.dialogflow.cx.v3.TestCaseResult + */ +class TestCaseResult extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name for the test case result. Format: + * `projects//locations//agents//testCases//results/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Environment where the test was run. If not set, it indicates the draft + * environment. + * + * Generated from protobuf field string environment = 2 [(.google.api.resource_reference) = { + */ + protected $environment = ''; + /** + * The conversation turns uttered during the test case replay in chronological + * order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + */ + private $conversation_turns; + /** + * Whether the test case passed in the agent environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + */ + protected $test_result = 0; + /** + * The time that the test was run. + * + * Generated from protobuf field .google.protobuf.Timestamp test_time = 5; + */ + protected $test_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name for the test case result. Format: + * `projects//locations//agents//testCases//results/`. + * @type string $environment + * Environment where the test was run. If not set, it indicates the draft + * environment. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ConversationTurn>|\Google\Protobuf\Internal\RepeatedField $conversation_turns + * The conversation turns uttered during the test case replay in chronological + * order. + * @type int $test_result + * Whether the test case passed in the agent environment. + * @type \Google\Protobuf\Timestamp $test_time + * The time that the test was run. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The resource name for the test case result. Format: + * `projects//locations//agents//testCases//results/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the test case result. Format: + * `projects//locations//agents//testCases//results/`. + * + * 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; + } + + /** + * Environment where the test was run. If not set, it indicates the draft + * environment. + * + * Generated from protobuf field string environment = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Environment where the test was run. If not set, it indicates the draft + * environment. + * + * Generated from protobuf field string environment = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + + /** + * The conversation turns uttered during the test case replay in chronological + * order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConversationTurns() + { + return $this->conversation_turns; + } + + /** + * The conversation turns uttered during the test case replay in chronological + * order. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ConversationTurn>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConversationTurns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn::class); + $this->conversation_turns = $arr; + + return $this; + } + + /** + * Whether the test case passed in the agent environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * @return int + */ + public function getTestResult() + { + return $this->test_result; + } + + /** + * Whether the test case passed in the agent environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; + * @param int $var + * @return $this + */ + public function setTestResult($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\TestResult::class); + $this->test_result = $var; + + return $this; + } + + /** + * The time that the test was run. + * + * Generated from protobuf field .google.protobuf.Timestamp test_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTestTime() + { + return $this->test_time; + } + + public function hasTestTime() + { + return isset($this->test_time); + } + + public function clearTestTime() + { + unset($this->test_time); + } + + /** + * The time that the test was run. + * + * Generated from protobuf field .google.protobuf.Timestamp test_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->test_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestConfig.php new file mode 100644 index 000000000000..b1dddaf28cf9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestConfig.php @@ -0,0 +1,175 @@ +google.cloud.dialogflow.cx.v3.TestConfig + */ +class TestConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Session parameters to be compared when calculating differences. + * + * Generated from protobuf field repeated string tracking_parameters = 1; + */ + private $tracking_parameters; + /** + * Flow name to start the test case with. + * Format: + * `projects//locations//agents//flows/`. + * Only one of `flow` and `page` should be set to indicate the starting point + * of the test case. If neither is set, the test case will start with start + * page on the default start flow. + * + * Generated from protobuf field string flow = 2 [(.google.api.resource_reference) = { + */ + protected $flow = ''; + /** + * The [page][google.cloud.dialogflow.cx.v3.Page] to start the test case with. + * Format: + * `projects//locations//agents//flows//pages/`. + * Only one of `flow` and `page` should be set to indicate the starting point + * of the test case. If neither is set, the test case will start with start + * page on the default start flow. + * + * Generated from protobuf field string page = 3 [(.google.api.resource_reference) = { + */ + protected $page = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $tracking_parameters + * Session parameters to be compared when calculating differences. + * @type string $flow + * Flow name to start the test case with. + * Format: + * `projects//locations//agents//flows/`. + * Only one of `flow` and `page` should be set to indicate the starting point + * of the test case. If neither is set, the test case will start with start + * page on the default start flow. + * @type string $page + * The [page][google.cloud.dialogflow.cx.v3.Page] to start the test case with. + * Format: + * `projects//locations//agents//flows//pages/`. + * Only one of `flow` and `page` should be set to indicate the starting point + * of the test case. If neither is set, the test case will start with start + * page on the default start flow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Session parameters to be compared when calculating differences. + * + * Generated from protobuf field repeated string tracking_parameters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrackingParameters() + { + return $this->tracking_parameters; + } + + /** + * Session parameters to be compared when calculating differences. + * + * Generated from protobuf field repeated string tracking_parameters = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTrackingParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tracking_parameters = $arr; + + return $this; + } + + /** + * Flow name to start the test case with. + * Format: + * `projects//locations//agents//flows/`. + * Only one of `flow` and `page` should be set to indicate the starting point + * of the test case. If neither is set, the test case will start with start + * page on the default start flow. + * + * Generated from protobuf field string flow = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getFlow() + { + return $this->flow; + } + + /** + * Flow name to start the test case with. + * Format: + * `projects//locations//agents//flows/`. + * Only one of `flow` and `page` should be set to indicate the starting point + * of the test case. If neither is set, the test case will start with start + * page on the default start flow. + * + * Generated from protobuf field string flow = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setFlow($var) + { + GPBUtil::checkString($var, True); + $this->flow = $var; + + return $this; + } + + /** + * The [page][google.cloud.dialogflow.cx.v3.Page] to start the test case with. + * Format: + * `projects//locations//agents//flows//pages/`. + * Only one of `flow` and `page` should be set to indicate the starting point + * of the test case. If neither is set, the test case will start with start + * page on the default start flow. + * + * Generated from protobuf field string page = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getPage() + { + return $this->page; + } + + /** + * The [page][google.cloud.dialogflow.cx.v3.Page] to start the test case with. + * Format: + * `projects//locations//agents//flows//pages/`. + * Only one of `flow` and `page` should be set to indicate the starting point + * of the test case. If neither is set, the test case will start with start + * page on the default start flow. + * + * Generated from protobuf field string page = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPage($var) + { + GPBUtil::checkString($var, True); + $this->page = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestError.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestError.php new file mode 100644 index 000000000000..5bfd22d39f65 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestError.php @@ -0,0 +1,155 @@ +google.cloud.dialogflow.cx.v3.TestError + */ +class TestError extends \Google\Protobuf\Internal\Message +{ + /** + * The test case resource name. + * + * Generated from protobuf field string test_case = 1 [(.google.api.resource_reference) = { + */ + protected $test_case = ''; + /** + * The status associated with the test. + * + * Generated from protobuf field .google.rpc.Status status = 2; + */ + protected $status = null; + /** + * The timestamp when the test was completed. + * + * Generated from protobuf field .google.protobuf.Timestamp test_time = 3; + */ + protected $test_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $test_case + * The test case resource name. + * @type \Google\Rpc\Status $status + * The status associated with the test. + * @type \Google\Protobuf\Timestamp $test_time + * The timestamp when the test was completed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The test case resource name. + * + * Generated from protobuf field string test_case = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getTestCase() + { + return $this->test_case; + } + + /** + * The test case resource name. + * + * Generated from protobuf field string test_case = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTestCase($var) + { + GPBUtil::checkString($var, True); + $this->test_case = $var; + + return $this; + } + + /** + * The status associated with the test. + * + * 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 associated with the test. + * + * 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; + } + + /** + * The timestamp when the test was completed. + * + * Generated from protobuf field .google.protobuf.Timestamp test_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTestTime() + { + return $this->test_time; + } + + public function hasTestTime() + { + return isset($this->test_time); + } + + public function clearTestTime() + { + unset($this->test_time); + } + + /** + * The timestamp when the test was completed. + * + * Generated from protobuf field .google.protobuf.Timestamp test_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->test_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestResult.php new file mode 100644 index 000000000000..bc0e41a2f062 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestResult.php @@ -0,0 +1,61 @@ +google.cloud.dialogflow.cx.v3.TestResult + */ +class TestResult +{ + /** + * Not specified. Should never be used. + * + * Generated from protobuf enum TEST_RESULT_UNSPECIFIED = 0; + */ + const TEST_RESULT_UNSPECIFIED = 0; + /** + * The test passed. + * + * Generated from protobuf enum PASSED = 1; + */ + const PASSED = 1; + /** + * The test did not pass. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + + private static $valueToName = [ + self::TEST_RESULT_UNSPECIFIED => 'TEST_RESULT_UNSPECIFIED', + self::PASSED => 'PASSED', + 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); + } +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference.php new file mode 100644 index 000000000000..6148508e8110 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference.php @@ -0,0 +1,105 @@ +google.cloud.dialogflow.cx.v3.TestRunDifference + */ +class TestRunDifference extends \Google\Protobuf\Internal\Message +{ + /** + * The type of diff. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + */ + protected $type = 0; + /** + * A human readable description of the diff, showing the actual output vs + * expected output. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The type of diff. + * @type string $description + * A human readable description of the diff, showing the actual output vs + * expected output. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The type of diff. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of diff. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\TestRunDifference\DiffType::class); + $this->type = $var; + + return $this; + } + + /** + * A human readable description of the diff, showing the actual output vs + * expected output. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A human readable description of the diff, showing the actual output vs + * expected output. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference/DiffType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference/DiffType.php new file mode 100644 index 000000000000..8ae622c48403 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference/DiffType.php @@ -0,0 +1,85 @@ +google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType + */ +class DiffType +{ + /** + * Should never be used. + * + * Generated from protobuf enum DIFF_TYPE_UNSPECIFIED = 0; + */ + const DIFF_TYPE_UNSPECIFIED = 0; + /** + * The intent. + * + * Generated from protobuf enum INTENT = 1; + */ + const INTENT = 1; + /** + * The page. + * + * Generated from protobuf enum PAGE = 2; + */ + const PAGE = 2; + /** + * The parameters. + * + * Generated from protobuf enum PARAMETERS = 3; + */ + const PARAMETERS = 3; + /** + * The message utterance. + * + * Generated from protobuf enum UTTERANCE = 4; + */ + const UTTERANCE = 4; + /** + * The flow. + * + * Generated from protobuf enum FLOW = 5; + */ + const FLOW = 5; + + private static $valueToName = [ + self::DIFF_TYPE_UNSPECIFIED => 'DIFF_TYPE_UNSPECIFIED', + self::INTENT => 'INTENT', + self::PAGE => 'PAGE', + self::PARAMETERS => 'PARAMETERS', + self::UTTERANCE => 'UTTERANCE', + self::FLOW => 'FLOW', + ]; + + 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(DiffType::class, \Google\Cloud\Dialogflow\Cx\V3\TestRunDifference_DiffType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextInput.php new file mode 100644 index 000000000000..30839ed91d3a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextInput.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.cx.v3.TextInput + */ +class TextInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The UTF-8 encoded natural language text to be processed. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $text = ''; + + /** + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); + parent::__construct($data); + } + + /** + * Required. The UTF-8 encoded natural language text to be processed. + * + * 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. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextToSpeechSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextToSpeechSettings.php new file mode 100644 index 000000000000..4b118fbfcc10 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextToSpeechSettings.php @@ -0,0 +1,119 @@ +google.cloud.dialogflow.cx.v3.TextToSpeechSettings + */ +class TextToSpeechSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Configuration of how speech should be synthesized, mapping from language + * (https://cloud.google.com/dialogflow/cx/docs/reference/language) to + * SynthesizeSpeechConfig. + * These settings affect: + * - The [phone + * gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway) + * synthesize configuration set via + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings]. + * - How speech is synthesized when invoking + * [session][google.cloud.dialogflow.cx.v3.Sessions] APIs. + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] + * only applies if + * [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesize_speech_config] + * is not specified. + * + * Generated from protobuf field map synthesize_speech_configs = 1; + */ + private $synthesize_speech_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $synthesize_speech_configs + * Configuration of how speech should be synthesized, mapping from language + * (https://cloud.google.com/dialogflow/cx/docs/reference/language) to + * SynthesizeSpeechConfig. + * These settings affect: + * - The [phone + * gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway) + * synthesize configuration set via + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings]. + * - How speech is synthesized when invoking + * [session][google.cloud.dialogflow.cx.v3.Sessions] APIs. + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] + * only applies if + * [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesize_speech_config] + * is not specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AudioConfig::initOnce(); + parent::__construct($data); + } + + /** + * Configuration of how speech should be synthesized, mapping from language + * (https://cloud.google.com/dialogflow/cx/docs/reference/language) to + * SynthesizeSpeechConfig. + * These settings affect: + * - The [phone + * gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway) + * synthesize configuration set via + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings]. + * - How speech is synthesized when invoking + * [session][google.cloud.dialogflow.cx.v3.Sessions] APIs. + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] + * only applies if + * [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesize_speech_config] + * is not specified. + * + * Generated from protobuf field map synthesize_speech_configs = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSynthesizeSpeechConfigs() + { + return $this->synthesize_speech_configs; + } + + /** + * Configuration of how speech should be synthesized, mapping from language + * (https://cloud.google.com/dialogflow/cx/docs/reference/language) to + * SynthesizeSpeechConfig. + * These settings affect: + * - The [phone + * gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway) + * synthesize configuration set via + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings]. + * - How speech is synthesized when invoking + * [session][google.cloud.dialogflow.cx.v3.Sessions] APIs. + * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] + * only applies if + * [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesize_speech_config] + * is not specified. + * + * Generated from protobuf field map synthesize_speech_configs = 1; + * @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\Cx\V3\SynthesizeSpeechConfig::class); + $this->synthesize_speech_configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool.php new file mode 100644 index 000000000000..4f3563470ad2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool.php @@ -0,0 +1,288 @@ +google.cloud.dialogflow.cx.v3.Tool + */ +class Tool extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the Tool. + * Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the Tool, unique within an agent. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. High level description of the Tool and its usage. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $description = ''; + /** + * Output only. The tool type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $tool_type = 0; + protected $specification; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the Tool. + * Format: + * `projects//locations//agents//tools/`. + * @type string $display_name + * Required. The human-readable name of the Tool, unique within an agent. + * @type string $description + * Required. High level description of the Tool and its usage. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\OpenApiTool $open_api_spec + * OpenAPI specification of the Tool. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\DataStoreTool $data_store_spec + * Data store search tool specification. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\FunctionTool $function_spec + * Client side executed function specification. + * @type int $tool_type + * Output only. The tool type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the Tool. + * Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the Tool. + * Format: + * `projects//locations//agents//tools/`. + * + * 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 human-readable name of the Tool, unique within an 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 human-readable name of the Tool, unique within an 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. High level description of the Tool and its usage. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Required. High level description of the Tool and its usage. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * OpenAPI specification of the Tool. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\OpenApiTool|null + */ + public function getOpenApiSpec() + { + return $this->readOneof(4); + } + + public function hasOpenApiSpec() + { + return $this->hasOneof(4); + } + + /** + * OpenAPI specification of the Tool. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\OpenApiTool $var + * @return $this + */ + public function setOpenApiSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\OpenApiTool::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Data store search tool specification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\DataStoreTool|null + */ + public function getDataStoreSpec() + { + return $this->readOneof(8); + } + + public function hasDataStoreSpec() + { + return $this->hasOneof(8); + } + + /** + * Data store search tool specification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\DataStoreTool $var + * @return $this + */ + public function setDataStoreSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\DataStoreTool::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Client side executed function specification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\FunctionTool|null + */ + public function getFunctionSpec() + { + return $this->readOneof(13); + } + + public function hasFunctionSpec() + { + return $this->hasOneof(13); + } + + /** + * Client side executed function specification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\FunctionTool $var + * @return $this + */ + public function setFunctionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\FunctionTool::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Output only. The tool type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getToolType() + { + return $this->tool_type; + } + + /** + * Output only. The tool type. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setToolType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\ToolType::class); + $this->tool_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getSpecification() + { + return $this->whichOneof("specification"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication.php new file mode 100644 index 000000000000..757c06b6751d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication.php @@ -0,0 +1,216 @@ +google.cloud.dialogflow.cx.v3.Tool.Authentication + */ +class Authentication extends \Google\Protobuf\Internal\Message +{ + protected $auth_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ApiKeyConfig $api_key_config + * Config for API key auth. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\OAuthConfig $oauth_config + * Config for OAuth. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ServiceAgentAuthConfig $service_agent_auth_config + * Config for [Diglogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) + * auth. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\BearerTokenConfig $bearer_token_config + * Config for bearer token auth. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ServiceAccountAuthConfig $service_account_auth_config + * Configuration for service account authentication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Config for API key auth. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ApiKeyConfig|null + */ + public function getApiKeyConfig() + { + return $this->readOneof(1); + } + + public function hasApiKeyConfig() + { + return $this->hasOneof(1); + } + + /** + * Config for API key auth. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ApiKeyConfig $var + * @return $this + */ + public function setApiKeyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ApiKeyConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Config for OAuth. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\OAuthConfig|null + */ + public function getOauthConfig() + { + return $this->readOneof(2); + } + + public function hasOauthConfig() + { + return $this->hasOneof(2); + } + + /** + * Config for OAuth. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\OAuthConfig $var + * @return $this + */ + public function setOauthConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\OAuthConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Config for [Diglogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) + * auth. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ServiceAgentAuthConfig|null + */ + public function getServiceAgentAuthConfig() + { + return $this->readOneof(3); + } + + public function hasServiceAgentAuthConfig() + { + return $this->hasOneof(3); + } + + /** + * Config for [Diglogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) + * auth. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ServiceAgentAuthConfig $var + * @return $this + */ + public function setServiceAgentAuthConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ServiceAgentAuthConfig::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Config for bearer token auth. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\BearerTokenConfig|null + */ + public function getBearerTokenConfig() + { + return $this->readOneof(4); + } + + public function hasBearerTokenConfig() + { + return $this->hasOneof(4); + } + + /** + * Config for bearer token auth. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\BearerTokenConfig $var + * @return $this + */ + public function setBearerTokenConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\BearerTokenConfig::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Configuration for service account authentication. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ServiceAccountAuthConfig|null + */ + public function getServiceAccountAuthConfig() + { + return $this->readOneof(5); + } + + public function hasServiceAccountAuthConfig() + { + return $this->hasOneof(5); + } + + /** + * Configuration for service account authentication. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ServiceAccountAuthConfig $var + * @return $this + */ + public function setServiceAccountAuthConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ServiceAccountAuthConfig::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthConfig() + { + return $this->whichOneof("auth_config"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Authentication::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ApiKeyConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ApiKeyConfig.php new file mode 100644 index 000000000000..16506f067080 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ApiKeyConfig.php @@ -0,0 +1,192 @@ +google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + */ +class ApiKeyConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parameter name or the header name of the API key. + * E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name. + * + * Generated from protobuf field string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key_name = ''; + /** + * Optional. The API key. If the `secret_version_for_api_key` field is + * set, this field will be ignored. + * + * Generated from protobuf field string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $api_key = ''; + /** + * Optional. The name of the SecretManager secret version resource storing + * the API key. If this field is set, the `api_key` field will be ignored. + * Format: `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $secret_version_for_api_key = ''; + /** + * Required. Key location in the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $request_location = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key_name + * Required. The parameter name or the header name of the API key. + * E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name. + * @type string $api_key + * Optional. The API key. If the `secret_version_for_api_key` field is + * set, this field will be ignored. + * @type string $secret_version_for_api_key + * Optional. The name of the SecretManager secret version resource storing + * the API key. If this field is set, the `api_key` field will be ignored. + * Format: `projects/{project}/secrets/{secret}/versions/{version}` + * @type int $request_location + * Required. Key location in the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parameter name or the header name of the API key. + * E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name. + * + * Generated from protobuf field string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKeyName() + { + return $this->key_name; + } + + /** + * Required. The parameter name or the header name of the API key. + * E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name. + * + * Generated from protobuf field string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKeyName($var) + { + GPBUtil::checkString($var, True); + $this->key_name = $var; + + return $this; + } + + /** + * Optional. The API key. If the `secret_version_for_api_key` field is + * set, this field will be ignored. + * + * Generated from protobuf field string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getApiKey() + { + return $this->api_key; + } + + /** + * Optional. The API key. If the `secret_version_for_api_key` field is + * set, this field will be ignored. + * + * Generated from protobuf field string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setApiKey($var) + { + GPBUtil::checkString($var, True); + $this->api_key = $var; + + return $this; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the API key. If this field is set, the `api_key` field will be ignored. + * Format: `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getSecretVersionForApiKey() + { + return $this->secret_version_for_api_key; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the API key. If this field is set, the `api_key` field will be ignored. + * Format: `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecretVersionForApiKey($var) + { + GPBUtil::checkString($var, True); + $this->secret_version_for_api_key = $var; + + return $this; + } + + /** + * Required. Key location in the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getRequestLocation() + { + return $this->request_location; + } + + /** + * Required. Key location in the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setRequestLocation($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\RequestLocation::class); + $this->request_location = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ApiKeyConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_ApiKeyConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/BearerTokenConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/BearerTokenConfig.php new file mode 100644 index 000000000000..6fac6fb413a6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/BearerTokenConfig.php @@ -0,0 +1,136 @@ +google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + */ +class BearerTokenConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The text token appended to the text `Bearer` to the request + * Authorization header. + * [Session parameters + * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) + * can be used to pass the token dynamically, e.g. + * `$session.params.parameter-id`. + * + * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $token = ''; + /** + * Optional. The name of the SecretManager secret version resource storing + * the Bearer token. If this field is set, the `token` field will be + * ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $secret_version_for_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $token + * Optional. The text token appended to the text `Bearer` to the request + * Authorization header. + * [Session parameters + * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) + * can be used to pass the token dynamically, e.g. + * `$session.params.parameter-id`. + * @type string $secret_version_for_token + * Optional. The name of the SecretManager secret version resource storing + * the Bearer token. If this field is set, the `token` field will be + * ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The text token appended to the text `Bearer` to the request + * Authorization header. + * [Session parameters + * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) + * can be used to pass the token dynamically, e.g. + * `$session.params.parameter-id`. + * + * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * Optional. The text token appended to the text `Bearer` to the request + * Authorization header. + * [Session parameters + * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) + * can be used to pass the token dynamically, e.g. + * `$session.params.parameter-id`. + * + * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the Bearer token. If this field is set, the `token` field will be + * ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getSecretVersionForToken() + { + return $this->secret_version_for_token; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the Bearer token. If this field is set, the `token` field will be + * ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecretVersionForToken($var) + { + GPBUtil::checkString($var, True); + $this->secret_version_for_token = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BearerTokenConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_BearerTokenConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig.php new file mode 100644 index 000000000000..4fcf1617a0b1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig.php @@ -0,0 +1,264 @@ +google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + */ +class OAuthConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. OAuth grant types. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $oauth_grant_type = 0; + /** + * Required. The client ID from the OAuth provider. + * + * Generated from protobuf field string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_id = ''; + /** + * Optional. The client secret from the OAuth provider. If the + * `secret_version_for_client_secret` field is set, this field will be + * ignored. + * + * Generated from protobuf field string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client_secret = ''; + /** + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $secret_version_for_client_secret = ''; + /** + * Required. The token endpoint in the OAuth provider to exchange for an + * access token. + * + * Generated from protobuf field string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $token_endpoint = ''; + /** + * Optional. The OAuth scopes to grant. + * + * Generated from protobuf field repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $scopes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $oauth_grant_type + * Required. OAuth grant types. + * @type string $client_id + * Required. The client ID from the OAuth provider. + * @type string $client_secret + * Optional. The client secret from the OAuth provider. If the + * `secret_version_for_client_secret` field is set, this field will be + * ignored. + * @type string $secret_version_for_client_secret + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * @type string $token_endpoint + * Required. The token endpoint in the OAuth provider to exchange for an + * access token. + * @type array|\Google\Protobuf\Internal\RepeatedField $scopes + * Optional. The OAuth scopes to grant. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. OAuth grant types. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getOauthGrantType() + { + return $this->oauth_grant_type; + } + + /** + * Required. OAuth grant types. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setOauthGrantType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\OAuthConfig\OauthGrantType::class); + $this->oauth_grant_type = $var; + + return $this; + } + + /** + * Required. The client ID from the OAuth provider. + * + * Generated from protobuf field string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClientId() + { + return $this->client_id; + } + + /** + * Required. The client ID from the OAuth provider. + * + * Generated from protobuf field string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setClientId($var) + { + GPBUtil::checkString($var, True); + $this->client_id = $var; + + return $this; + } + + /** + * Optional. The client secret from the OAuth provider. If the + * `secret_version_for_client_secret` field is set, this field will be + * ignored. + * + * Generated from protobuf field string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClientSecret() + { + return $this->client_secret; + } + + /** + * Optional. The client secret from the OAuth provider. If the + * `secret_version_for_client_secret` field is set, this field will be + * ignored. + * + * Generated from protobuf field string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClientSecret($var) + { + GPBUtil::checkString($var, True); + $this->client_secret = $var; + + return $this; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getSecretVersionForClientSecret() + { + return $this->secret_version_for_client_secret; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecretVersionForClientSecret($var) + { + GPBUtil::checkString($var, True); + $this->secret_version_for_client_secret = $var; + + return $this; + } + + /** + * Required. The token endpoint in the OAuth provider to exchange for an + * access token. + * + * Generated from protobuf field string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTokenEndpoint() + { + return $this->token_endpoint; + } + + /** + * Required. The token endpoint in the OAuth provider to exchange for an + * access token. + * + * Generated from protobuf field string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTokenEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->token_endpoint = $var; + + return $this; + } + + /** + * Optional. The OAuth scopes to grant. + * + * Generated from protobuf field repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScopes() + { + return $this->scopes; + } + + /** + * Optional. The OAuth scopes to grant. + * + * Generated from protobuf field repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scopes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OAuthConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_OAuthConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php new file mode 100644 index 000000000000..820fc6e6810c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php @@ -0,0 +1,60 @@ +google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + */ +class OauthGrantType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum OAUTH_GRANT_TYPE_UNSPECIFIED = 0; + */ + const OAUTH_GRANT_TYPE_UNSPECIFIED = 0; + /** + * Represents the [client credential + * flow](https://oauth.net/2/grant-types/client-credentials). + * + * Generated from protobuf enum CLIENT_CREDENTIAL = 1; + */ + const CLIENT_CREDENTIAL = 1; + + private static $valueToName = [ + self::OAUTH_GRANT_TYPE_UNSPECIFIED => 'OAUTH_GRANT_TYPE_UNSPECIFIED', + self::CLIENT_CREDENTIAL => 'CLIENT_CREDENTIAL', + ]; + + 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(OauthGrantType::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_OAuthConfig_OauthGrantType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/RequestLocation.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/RequestLocation.php new file mode 100644 index 000000000000..b0e48b72ddeb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/RequestLocation.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation + */ +class RequestLocation +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum REQUEST_LOCATION_UNSPECIFIED = 0; + */ + const REQUEST_LOCATION_UNSPECIFIED = 0; + /** + * Represents the key in http header. + * + * Generated from protobuf enum HEADER = 1; + */ + const HEADER = 1; + /** + * Represents the key in query string. + * + * Generated from protobuf enum QUERY_STRING = 2; + */ + const QUERY_STRING = 2; + + private static $valueToName = [ + self::REQUEST_LOCATION_UNSPECIFIED => 'REQUEST_LOCATION_UNSPECIFIED', + self::HEADER => 'HEADER', + self::QUERY_STRING => 'QUERY_STRING', + ]; + + 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(RequestLocation::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_RequestLocation::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAccountAuthConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAccountAuthConfig.php new file mode 100644 index 000000000000..fb2af67f8989 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAccountAuthConfig.php @@ -0,0 +1,98 @@ +google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + */ +class ServiceAccountAuthConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The email address of the service account used to authenticate + * the tool call. Dialogflow uses this service account to exchange an + * access token and the access token is then sent in the `Authorization` + * header of the tool request. + * The service account must have the + * `roles/iam.serviceAccountTokenCreator` role granted to the + * [Dialogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * + * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_account = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_account + * Required. The email address of the service account used to authenticate + * the tool call. Dialogflow uses this service account to exchange an + * access token and the access token is then sent in the `Authorization` + * header of the tool request. + * The service account must have the + * `roles/iam.serviceAccountTokenCreator` role granted to the + * [Dialogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The email address of the service account used to authenticate + * the tool call. Dialogflow uses this service account to exchange an + * access token and the access token is then sent in the `Authorization` + * header of the tool request. + * The service account must have the + * `roles/iam.serviceAccountTokenCreator` role granted to the + * [Dialogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * + * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Required. The email address of the service account used to authenticate + * the tool call. Dialogflow uses this service account to exchange an + * access token and the access token is then sent in the `Authorization` + * header of the tool request. + * The service account must have the + * `roles/iam.serviceAccountTokenCreator` role granted to the + * [Dialogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * + * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceAccountAuthConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_ServiceAccountAuthConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig.php new file mode 100644 index 000000000000..07eef078163e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig.php @@ -0,0 +1,83 @@ +google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + */ +class ServiceAgentAuthConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Indicate the auth token type generated from the [Diglogflow + * service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * The generated token is sent in the Authorization header. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_agent_auth = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $service_agent_auth + * Optional. Indicate the auth token type generated from the [Diglogflow + * service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * The generated token is sent in the Authorization header. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Indicate the auth token type generated from the [Diglogflow + * service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * The generated token is sent in the Authorization header. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getServiceAgentAuth() + { + return $this->service_agent_auth; + } + + /** + * Optional. Indicate the auth token type generated from the [Diglogflow + * service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * The generated token is sent in the Authorization header. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setServiceAgentAuth($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication\ServiceAgentAuthConfig\ServiceAgentAuth::class); + $this->service_agent_auth = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceAgentAuthConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_ServiceAgentAuthConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php new file mode 100644 index 000000000000..86fed1a3692b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php @@ -0,0 +1,73 @@ +google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth + */ +class ServiceAgentAuth +{ + /** + * Service agent auth type unspecified. Default to ID_TOKEN. + * + * Generated from protobuf enum SERVICE_AGENT_AUTH_UNSPECIFIED = 0; + */ + const SERVICE_AGENT_AUTH_UNSPECIFIED = 0; + /** + * Use [ID + * token](https://cloud.google.com/docs/authentication/token-types#id) + * generated from service agent. This can be used to access Cloud + * Function and Cloud Run after you grant Invoker role to + * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. + * + * Generated from protobuf enum ID_TOKEN = 1; + */ + const ID_TOKEN = 1; + /** + * Use [access + * token](https://cloud.google.com/docs/authentication/token-types#access) + * generated from service agent. This can be used to access other Google + * Cloud APIs after you grant required roles to + * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. + * + * Generated from protobuf enum ACCESS_TOKEN = 2; + */ + const ACCESS_TOKEN = 2; + + private static $valueToName = [ + self::SERVICE_AGENT_AUTH_UNSPECIFIED => 'SERVICE_AGENT_AUTH_UNSPECIFIED', + self::ID_TOKEN => 'ID_TOKEN', + self::ACCESS_TOKEN => 'ACCESS_TOKEN', + ]; + + 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(ServiceAgentAuth::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_ServiceAgentAuthConfig_ServiceAgentAuth::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool.php new file mode 100644 index 000000000000..4c6054d6e513 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool.php @@ -0,0 +1,115 @@ +google.cloud.dialogflow.cx.v3.Tool.DataStoreTool + */ +class DataStoreTool extends \Google\Protobuf\Internal\Message +{ + /** + * Required. List of data stores to search. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $data_store_connections; + /** + * Required. Fallback prompt configurations to use. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fallback_prompt = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection>|\Google\Protobuf\Internal\RepeatedField $data_store_connections + * Required. List of data stores to search. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\DataStoreTool\FallbackPrompt $fallback_prompt + * Required. Fallback prompt configurations to use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. List of data stores to search. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataStoreConnections() + { + return $this->data_store_connections; + } + + /** + * Required. List of data stores to search. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataStoreConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::class); + $this->data_store_connections = $arr; + + return $this; + } + + /** + * Required. Fallback prompt configurations to use. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\DataStoreTool\FallbackPrompt|null + */ + public function getFallbackPrompt() + { + return $this->fallback_prompt; + } + + public function hasFallbackPrompt() + { + return isset($this->fallback_prompt); + } + + public function clearFallbackPrompt() + { + unset($this->fallback_prompt); + } + + /** + * Required. Fallback prompt configurations to use. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\DataStoreTool\FallbackPrompt $var + * @return $this + */ + public function setFallbackPrompt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\DataStoreTool\FallbackPrompt::class); + $this->fallback_prompt = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataStoreTool::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_DataStoreTool::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool/FallbackPrompt.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool/FallbackPrompt.php new file mode 100644 index 000000000000..54445e297eb0 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool/FallbackPrompt.php @@ -0,0 +1,37 @@ +google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + */ +class FallbackPrompt 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\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FallbackPrompt::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_DataStoreTool_FallbackPrompt::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/FunctionTool.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/FunctionTool.php new file mode 100644 index 000000000000..ce3ffcadf0f0 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/FunctionTool.php @@ -0,0 +1,148 @@ +google.cloud.dialogflow.cx.v3.Tool.FunctionTool + */ +class FunctionTool extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The JSON schema is encapsulated in a + * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of + * the function. This input is a JSON object that contains the function's + * parameters as properties of the object. + * + * Generated from protobuf field .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $input_schema = null; + /** + * Optional. The JSON schema is encapsulated in a + * [google.protobuf.Struct][google.protobuf.Struct] to describe the output + * of the function. This output is a JSON object that contains the + * function's parameters as properties of the object. + * + * Generated from protobuf field .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $output_schema = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $input_schema + * Optional. The JSON schema is encapsulated in a + * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of + * the function. This input is a JSON object that contains the function's + * parameters as properties of the object. + * @type \Google\Protobuf\Struct $output_schema + * Optional. The JSON schema is encapsulated in a + * [google.protobuf.Struct][google.protobuf.Struct] to describe the output + * of the function. This output is a JSON object that contains the + * function's parameters as properties of the object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The JSON schema is encapsulated in a + * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of + * the function. This input is a JSON object that contains the function's + * parameters as properties of the object. + * + * Generated from protobuf field .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getInputSchema() + { + return $this->input_schema; + } + + public function hasInputSchema() + { + return isset($this->input_schema); + } + + public function clearInputSchema() + { + unset($this->input_schema); + } + + /** + * Optional. The JSON schema is encapsulated in a + * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of + * the function. This input is a JSON object that contains the function's + * parameters as properties of the object. + * + * Generated from protobuf field .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setInputSchema($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->input_schema = $var; + + return $this; + } + + /** + * Optional. The JSON schema is encapsulated in a + * [google.protobuf.Struct][google.protobuf.Struct] to describe the output + * of the function. This output is a JSON object that contains the + * function's parameters as properties of the object. + * + * Generated from protobuf field .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getOutputSchema() + { + return $this->output_schema; + } + + public function hasOutputSchema() + { + return isset($this->output_schema); + } + + public function clearOutputSchema() + { + unset($this->output_schema); + } + + /** + * Optional. The JSON schema is encapsulated in a + * [google.protobuf.Struct][google.protobuf.Struct] to describe the output + * of the function. This output is a JSON object that contains the + * function's parameters as properties of the object. + * + * Generated from protobuf field .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setOutputSchema($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->output_schema = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FunctionTool::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_FunctionTool::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/OpenApiTool.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/OpenApiTool.php new file mode 100644 index 000000000000..8ba3ce3a1719 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/OpenApiTool.php @@ -0,0 +1,211 @@ +google.cloud.dialogflow.cx.v3.Tool.OpenApiTool + */ +class OpenApiTool extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Authentication information required by the API. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $authentication = null; + /** + * Optional. TLS configuration for the HTTPS verification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tls_config = null; + /** + * Optional. Service Directory configuration. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_directory_config = null; + protected $schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text_schema + * Required. The OpenAPI schema specified as a text. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication $authentication + * Optional. Authentication information required by the API. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\TLSConfig $tls_config + * Optional. TLS configuration for the HTTPS verification. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool\ServiceDirectoryConfig $service_directory_config + * Optional. Service Directory configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The OpenAPI schema specified as a text. + * + * Generated from protobuf field string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTextSchema() + { + return $this->readOneof(1); + } + + public function hasTextSchema() + { + return $this->hasOneof(1); + } + + /** + * Required. The OpenAPI schema specified as a text. + * + * Generated from protobuf field string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTextSchema($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Authentication information required by the API. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication|null + */ + public function getAuthentication() + { + return $this->authentication; + } + + public function hasAuthentication() + { + return isset($this->authentication); + } + + public function clearAuthentication() + { + unset($this->authentication); + } + + /** + * Optional. Authentication information required by the API. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication $var + * @return $this + */ + public function setAuthentication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\Authentication::class); + $this->authentication = $var; + + return $this; + } + + /** + * Optional. TLS configuration for the HTTPS verification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\TLSConfig|null + */ + public function getTlsConfig() + { + return $this->tls_config; + } + + public function hasTlsConfig() + { + return isset($this->tls_config); + } + + public function clearTlsConfig() + { + unset($this->tls_config); + } + + /** + * Optional. TLS configuration for the HTTPS verification. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\TLSConfig $var + * @return $this + */ + public function setTlsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\TLSConfig::class); + $this->tls_config = $var; + + return $this; + } + + /** + * Optional. Service Directory configuration. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool\ServiceDirectoryConfig|null + */ + public function getServiceDirectoryConfig() + { + return $this->service_directory_config; + } + + public function hasServiceDirectoryConfig() + { + return isset($this->service_directory_config); + } + + public function clearServiceDirectoryConfig() + { + unset($this->service_directory_config); + } + + /** + * Optional. Service Directory configuration. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool\ServiceDirectoryConfig $var + * @return $this + */ + public function setServiceDirectoryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool\ServiceDirectoryConfig::class); + $this->service_directory_config = $var; + + return $this; + } + + /** + * @return string + */ + public function getSchema() + { + return $this->whichOneof("schema"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OpenApiTool::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_OpenApiTool::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ServiceDirectoryConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ServiceDirectoryConfig.php new file mode 100644 index 000000000000..172b4aebd82e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ServiceDirectoryConfig.php @@ -0,0 +1,90 @@ +google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + */ +class ServiceDirectoryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of [Service + * Directory](https://cloud.google.com/service-directory) service. + * Format: + * `projects//locations//namespaces//services/`. + * `LocationID` of the service directory must be the same as the location + * of the agent. + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $service = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * Required. The name of [Service + * Directory](https://cloud.google.com/service-directory) service. + * Format: + * `projects//locations//namespaces//services/`. + * `LocationID` of the service directory must be the same as the location + * of the agent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of [Service + * Directory](https://cloud.google.com/service-directory) service. + * Format: + * `projects//locations//namespaces//services/`. + * `LocationID` of the service directory must be the same as the location + * of the agent. + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Required. The name of [Service + * Directory](https://cloud.google.com/service-directory) service. + * Format: + * `projects//locations//namespaces//services/`. + * `LocationID` of the service directory must be the same as the location + * of the agent. + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceDirectoryConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_ServiceDirectoryConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig.php new file mode 100644 index 000000000000..9fd02fa68b89 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig.php @@ -0,0 +1,74 @@ +google.cloud.dialogflow.cx.v3.Tool.TLSConfig + */ +class TLSConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Specifies a list of allowed custom CA certificates for HTTPS + * verification. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $ca_certs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\Tool\TLSConfig\CACert>|\Google\Protobuf\Internal\RepeatedField $ca_certs + * Required. Specifies a list of allowed custom CA certificates for HTTPS + * verification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Specifies a list of allowed custom CA certificates for HTTPS + * verification. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCaCerts() + { + return $this->ca_certs; + } + + /** + * Required. Specifies a list of allowed custom CA certificates for HTTPS + * verification. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\Tool\TLSConfig\CACert>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCaCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Tool\TLSConfig\CACert::class); + $this->ca_certs = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TLSConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_TLSConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig/CACert.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig/CACert.php new file mode 100644 index 000000000000..13087402fb0c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig/CACert.php @@ -0,0 +1,152 @@ +google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + */ +class CACert extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the allowed custom CA certificates. This + * can be used to disambiguate the custom CA certificates. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. The allowed custom CA certificates (in DER format) for + * HTTPS verification. This overrides the default SSL trust store. If this + * is empty or unspecified, Dialogflow will use Google's default trust + * store to verify certificates. N.B. Make sure the HTTPS server + * certificates are signed with "subject alt name". For instance a + * certificate can be self-signed using the following command: + * ``` + * openssl x509 -req -days 200 -in example.com.csr \ + * -signkey example.com.key \ + * -out example.com.crt \ + * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + * ``` + * + * Generated from protobuf field bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cert = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Required. The name of the allowed custom CA certificates. This + * can be used to disambiguate the custom CA certificates. + * @type string $cert + * Required. The allowed custom CA certificates (in DER format) for + * HTTPS verification. This overrides the default SSL trust store. If this + * is empty or unspecified, Dialogflow will use Google's default trust + * store to verify certificates. N.B. Make sure the HTTPS server + * certificates are signed with "subject alt name". For instance a + * certificate can be self-signed using the following command: + * ``` + * openssl x509 -req -days 200 -in example.com.csr \ + * -signkey example.com.key \ + * -out example.com.crt \ + * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + * ``` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the allowed custom CA certificates. This + * can be used to disambiguate the custom CA certificates. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The name of the allowed custom CA certificates. This + * can be used to disambiguate the custom CA certificates. + * + * Generated from protobuf field string display_name = 1 [(.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 allowed custom CA certificates (in DER format) for + * HTTPS verification. This overrides the default SSL trust store. If this + * is empty or unspecified, Dialogflow will use Google's default trust + * store to verify certificates. N.B. Make sure the HTTPS server + * certificates are signed with "subject alt name". For instance a + * certificate can be self-signed using the following command: + * ``` + * openssl x509 -req -days 200 -in example.com.csr \ + * -signkey example.com.key \ + * -out example.com.crt \ + * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + * ``` + * + * Generated from protobuf field bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCert() + { + return $this->cert; + } + + /** + * Required. The allowed custom CA certificates (in DER format) for + * HTTPS verification. This overrides the default SSL trust store. If this + * is empty or unspecified, Dialogflow will use Google's default trust + * store to verify certificates. N.B. Make sure the HTTPS server + * certificates are signed with "subject alt name". For instance a + * certificate can be self-signed using the following command: + * ``` + * openssl x509 -req -days 200 -in example.com.csr \ + * -signkey example.com.key \ + * -out example.com.crt \ + * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + * ``` + * + * Generated from protobuf field bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCert($var) + { + GPBUtil::checkString($var, False); + $this->cert = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CACert::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_TLSConfig_CACert::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ToolType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ToolType.php new file mode 100644 index 000000000000..7974dec15d58 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ToolType.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.Tool.ToolType + */ +class ToolType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum TOOL_TYPE_UNSPECIFIED = 0; + */ + const TOOL_TYPE_UNSPECIFIED = 0; + /** + * Customer provided tool. + * + * Generated from protobuf enum CUSTOMIZED_TOOL = 1; + */ + const CUSTOMIZED_TOOL = 1; + /** + * First party built-in tool created by Dialogflow which cannot be modified. + * + * Generated from protobuf enum BUILTIN_TOOL = 2; + */ + const BUILTIN_TOOL = 2; + + private static $valueToName = [ + self::TOOL_TYPE_UNSPECIFIED => 'TOOL_TYPE_UNSPECIFIED', + self::CUSTOMIZED_TOOL => 'CUSTOMIZED_TOOL', + self::BUILTIN_TOOL => 'BUILTIN_TOOL', + ]; + + 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(ToolType::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_ToolType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCall.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCall.php new file mode 100644 index 000000000000..bbec4adc1857 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCall.php @@ -0,0 +1,153 @@ +google.cloud.dialogflow.cx.v3.ToolCall + */ +class ToolCall extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + * this call. Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $tool = ''; + /** + * Required. The name of the tool's action associated with this call. + * + * Generated from protobuf field string action = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = ''; + /** + * Optional. The action's input parameters. + * + * Generated from protobuf field .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $input_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tool + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + * this call. Format: + * `projects//locations//agents//tools/`. + * @type string $action + * Required. The name of the tool's action associated with this call. + * @type \Google\Protobuf\Struct $input_parameters + * Optional. The action's input parameters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ToolCall::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + * this call. Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTool() + { + return $this->tool; + } + + /** + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + * this call. Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTool($var) + { + GPBUtil::checkString($var, True); + $this->tool = $var; + + return $this; + } + + /** + * Required. The name of the tool's action associated with this call. + * + * Generated from protobuf field string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * Required. The name of the tool's action associated with this call. + * + * Generated from protobuf field string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + + /** + * Optional. The action's input parameters. + * + * Generated from protobuf field .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getInputParameters() + { + return $this->input_parameters; + } + + public function hasInputParameters() + { + return isset($this->input_parameters); + } + + public function clearInputParameters() + { + unset($this->input_parameters); + } + + /** + * Optional. The action's input parameters. + * + * Generated from protobuf field .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setInputParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->input_parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult.php new file mode 100644 index 000000000000..c20105ba26db --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult.php @@ -0,0 +1,184 @@ +google.cloud.dialogflow.cx.v3.ToolCallResult + */ +class ToolCallResult extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + * this call. Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $tool = ''; + /** + * Required. The name of the tool's action associated with this call. + * + * Generated from protobuf field string action = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = ''; + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tool + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + * this call. Format: + * `projects//locations//agents//tools/`. + * @type string $action + * Required. The name of the tool's action associated with this call. + * @type \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult\Error $error + * The tool call's error. + * @type \Google\Protobuf\Struct $output_parameters + * The tool call's output parameters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ToolCall::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + * this call. Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTool() + { + return $this->tool; + } + + /** + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + * this call. Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTool($var) + { + GPBUtil::checkString($var, True); + $this->tool = $var; + + return $this; + } + + /** + * Required. The name of the tool's action associated with this call. + * + * Generated from protobuf field string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * Required. The name of the tool's action associated with this call. + * + * Generated from protobuf field string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + + /** + * The tool call's error. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult\Error|null + */ + public function getError() + { + return $this->readOneof(3); + } + + public function hasError() + { + return $this->hasOneof(3); + } + + /** + * The tool call's error. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult\Error::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The tool call's output parameters. + * + * Generated from protobuf field .google.protobuf.Struct output_parameters = 4; + * @return \Google\Protobuf\Struct|null + */ + public function getOutputParameters() + { + return $this->readOneof(4); + } + + public function hasOutputParameters() + { + return $this->hasOneof(4); + } + + /** + * The tool call's output parameters. + * + * Generated from protobuf field .google.protobuf.Struct output_parameters = 4; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setOutputParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult/Error.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult/Error.php new file mode 100644 index 000000000000..508eb805654b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult/Error.php @@ -0,0 +1,70 @@ +google.cloud.dialogflow.cx.v3.ToolCallResult.Error + */ +class Error extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The error message of the function. + * + * Generated from protobuf field string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * Optional. The error message of the function. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ToolCall::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The error message of the function. + * + * Generated from protobuf field string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Optional. The error message of the function. + * + * Generated from protobuf field string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Error::class, \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult_Error::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolUse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolUse.php new file mode 100644 index 000000000000..b34ac2aa0772 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolUse.php @@ -0,0 +1,231 @@ +google.cloud.dialogflow.cx.v3.ToolUse + */ +class ToolUse extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be + * used. Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $tool = ''; + /** + * Output only. The display name of the tool. + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Optional. Name of the action to be called during the tool use. + * + * Generated from protobuf field string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $action = ''; + /** + * Optional. A list of input parameters for the action. + * + * Generated from protobuf field .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $input_action_parameters = null; + /** + * Optional. A list of output parameters generated by the action. + * + * Generated from protobuf field .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $output_action_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tool + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be + * used. Format: + * `projects//locations//agents//tools/`. + * @type string $display_name + * Output only. The display name of the tool. + * @type string $action + * Optional. Name of the action to be called during the tool use. + * @type \Google\Protobuf\Struct $input_action_parameters + * Optional. A list of input parameters for the action. + * @type \Google\Protobuf\Struct $output_action_parameters + * Optional. A list of output parameters generated by the action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be + * used. Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTool() + { + return $this->tool; + } + + /** + * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be + * used. Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTool($var) + { + GPBUtil::checkString($var, True); + $this->tool = $var; + + return $this; + } + + /** + * Output only. The display name of the tool. + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name of the tool. + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Name of the action to be called during the tool use. + * + * Generated from protobuf field string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * Optional. Name of the action to be called during the tool use. + * + * Generated from protobuf field string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + + /** + * Optional. A list of input parameters for the action. + * + * Generated from protobuf field .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getInputActionParameters() + { + return $this->input_action_parameters; + } + + public function hasInputActionParameters() + { + return isset($this->input_action_parameters); + } + + public function clearInputActionParameters() + { + unset($this->input_action_parameters); + } + + /** + * Optional. A list of input parameters for the action. + * + * Generated from protobuf field .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setInputActionParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->input_action_parameters = $var; + + return $this; + } + + /** + * Optional. A list of output parameters generated by the action. + * + * Generated from protobuf field .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getOutputActionParameters() + { + return $this->output_action_parameters; + } + + public function hasOutputActionParameters() + { + return isset($this->output_action_parameters); + } + + public function clearOutputActionParameters() + { + unset($this->output_action_parameters); + } + + /** + * Optional. A list of output parameters generated by the action. + * + * Generated from protobuf field .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setOutputActionParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->output_action_parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolVersion.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolVersion.php new file mode 100644 index 000000000000..8a483a27a00f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolVersion.php @@ -0,0 +1,241 @@ +google.cloud.dialogflow.cx.v3.ToolVersion + */ +class ToolVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The unique identifier of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The display name of the tool version. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. Snapshot of the tool to be associated with this version. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tool = null; + /** + * Output only. Last time the tool version was created or modified. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last time the tool version was created or modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The unique identifier of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + * @type string $display_name + * Required. The display name of the tool version. + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool $tool + * Required. Snapshot of the tool to be associated with this version. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Last time the tool version was created or modified. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last time the tool version was created or modified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The unique identifier of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The unique identifier of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The display name of the tool version. + * + * 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 tool version. + * + * 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. Snapshot of the tool to be associated with this version. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool|null + */ + public function getTool() + { + return $this->tool; + } + + public function hasTool() + { + return isset($this->tool); + } + + public function clearTool() + { + unset($this->tool); + } + + /** + * Required. Snapshot of the tool to be associated with this version. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool $var + * @return $this + */ + public function setTool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool::class); + $this->tool = $var; + + return $this; + } + + /** + * Output only. Last time the tool version was created or modified. + * + * 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. Last time the tool version was created or modified. + * + * 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. Last time the tool version was created or modified. + * + * 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. Last time the tool version was created or modified. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TrainFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TrainFlowRequest.php new file mode 100644 index 000000000000..b2ba6e071a3c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TrainFlowRequest.php @@ -0,0 +1,92 @@ +google.cloud.dialogflow.cx.v3.TrainFlowRequest + */ +class TrainFlowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The flow to train. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The flow to train. + * Format: + * `projects//locations//agents//flows/`. Please see + * {@see FlowsClient::flowName()} for help formatting this field. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\TrainFlowRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The flow to train. + * Format: + * `projects//locations//agents//flows/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Required. The flow to train. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 flow to train. + * Format: + * `projects//locations//agents//flows/`. + * + * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage.php new file mode 100644 index 000000000000..0ba2b37b79e3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage.php @@ -0,0 +1,103 @@ +google.cloud.dialogflow.cx.v3.TransitionCoverage + */ +class TransitionCoverage extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Transitions present in the agent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + */ + private $transitions; + /** + * The percent of transitions in the agent that are covered. + * + * Generated from protobuf field float coverage_score = 2; + */ + protected $coverage_score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\Transition>|\Google\Protobuf\Internal\RepeatedField $transitions + * The list of Transitions present in the agent. + * @type float $coverage_score + * The percent of transitions in the agent that are covered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The list of Transitions present in the agent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitions() + { + return $this->transitions; + } + + /** + * The list of Transitions present in the agent. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\Transition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\Transition::class); + $this->transitions = $arr; + + return $this; + } + + /** + * The percent of transitions in the agent that are covered. + * + * Generated from protobuf field float coverage_score = 2; + * @return float + */ + public function getCoverageScore() + { + return $this->coverage_score; + } + + /** + * The percent of transitions in the agent that are covered. + * + * Generated from protobuf field float coverage_score = 2; + * @param float $var + * @return $this + */ + public function setCoverageScore($var) + { + GPBUtil::checkFloat($var); + $this->coverage_score = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/Transition.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/Transition.php new file mode 100644 index 000000000000..bae2d140eab6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/Transition.php @@ -0,0 +1,271 @@ +google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + */ +class Transition extends \Google\Protobuf\Internal\Message +{ + /** + * The start node of a transition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + */ + protected $source = null; + /** + * The index of a transition in the transition list. Starting from 0. + * + * Generated from protobuf field int32 index = 4; + */ + protected $index = 0; + /** + * The end node of a transition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + */ + protected $target = null; + /** + * Whether the transition is covered by at least one of the + * agent's test cases. + * + * Generated from protobuf field bool covered = 3; + */ + protected $covered = false; + protected $detail; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode $source + * The start node of a transition. + * @type int $index + * The index of a transition in the transition list. Starting from 0. + * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode $target + * The end node of a transition. + * @type bool $covered + * Whether the transition is covered by at least one of the + * agent's test cases. + * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute $transition_route + * Intent route or condition route. + * @type \Google\Cloud\Dialogflow\Cx\V3\EventHandler $event_handler + * Event handler. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * The start node of a transition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * The start node of a transition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode::class); + $this->source = $var; + + return $this; + } + + /** + * The index of a transition in the transition list. Starting from 0. + * + * Generated from protobuf field int32 index = 4; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * The index of a transition in the transition list. Starting from 0. + * + * Generated from protobuf field int32 index = 4; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * The end node of a transition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode|null + */ + public function getTarget() + { + return $this->target; + } + + public function hasTarget() + { + return isset($this->target); + } + + public function clearTarget() + { + unset($this->target); + } + + /** + * The end node of a transition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode::class); + $this->target = $var; + + return $this; + } + + /** + * Whether the transition is covered by at least one of the + * agent's test cases. + * + * Generated from protobuf field bool covered = 3; + * @return bool + */ + public function getCovered() + { + return $this->covered; + } + + /** + * Whether the transition is covered by at least one of the + * agent's test cases. + * + * Generated from protobuf field bool covered = 3; + * @param bool $var + * @return $this + */ + public function setCovered($var) + { + GPBUtil::checkBool($var); + $this->covered = $var; + + return $this; + } + + /** + * Intent route or condition route. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute|null + */ + public function getTransitionRoute() + { + return $this->readOneof(5); + } + + public function hasTransitionRoute() + { + return $this->hasOneof(5); + } + + /** + * Intent route or condition route. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute $var + * @return $this + */ + public function setTransitionRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Event handler. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + * @return \Google\Cloud\Dialogflow\Cx\V3\EventHandler|null + */ + public function getEventHandler() + { + return $this->readOneof(6); + } + + public function hasEventHandler() + { + return $this->hasOneof(6); + } + + /** + * Event handler. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; + * @param \Google\Cloud\Dialogflow\Cx\V3\EventHandler $var + * @return $this + */ + public function setEventHandler($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\EventHandler::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getDetail() + { + return $this->whichOneof("detail"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Transition::class, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage_Transition::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/TransitionNode.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/TransitionNode.php new file mode 100644 index 000000000000..49038574b35d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/TransitionNode.php @@ -0,0 +1,117 @@ +google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + */ +class TransitionNode extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Page $page + * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. + * Only some fields such as name and displayname will be set. + * @type \Google\Cloud\Dialogflow\Cx\V3\Flow $flow + * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. + * Only some fields such as name and displayname will be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. + * Only some fields such as name and displayname will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null + */ + public function getPage() + { + return $this->readOneof(1); + } + + public function hasPage() + { + return $this->hasOneof(1); + } + + /** + * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. + * Only some fields such as name and displayname will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var + * @return $this + */ + public function setPage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. + * Only some fields such as name and displayname will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\Flow|null + */ + public function getFlow() + { + return $this->readOneof(2); + } + + public function hasFlow() + { + return $this->hasOneof(2); + } + + /** + * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. + * Only some fields such as name and displayname will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $var + * @return $this + */ + public function setFlow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Flow::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TransitionNode::class, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage_TransitionNode::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRoute.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRoute.php new file mode 100644 index 000000000000..45a3baff3775 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRoute.php @@ -0,0 +1,382 @@ +google.cloud.dialogflow.cx.v3.TransitionRoute + */ +class TransitionRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique identifier of this transition route. + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. The description of the transition route. The maximum length is + * 500 characters. + * + * Generated from protobuf field string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. + * Format: + * `projects//locations//agents//intents/`. + * Indicates that the transition can only happen when the given intent is + * matched. + * At least one of `intent` or `condition` must be specified. When both + * `intent` and `condition` are specified, the transition can only happen + * when both are fulfilled. + * + * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { + */ + protected $intent = ''; + /** + * The condition to evaluate against [form + * parameters][google.cloud.dialogflow.cx.v3.Form.parameters] or [session + * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * At least one of `intent` or `condition` must be specified. When both + * `intent` and `condition` are specified, the transition can only happen + * when both are fulfilled. + * + * Generated from protobuf field string condition = 2; + */ + protected $condition = ''; + /** + * The fulfillment to call when the condition is satisfied. At least one of + * `trigger_fulfillment` and `target` must be specified. When both are + * defined, `trigger_fulfillment` is executed first. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + */ + protected $trigger_fulfillment = null; + protected $target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique identifier of this transition route. + * @type string $description + * Optional. The description of the transition route. The maximum length is + * 500 characters. + * @type string $intent + * The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. + * Format: + * `projects//locations//agents//intents/`. + * Indicates that the transition can only happen when the given intent is + * matched. + * At least one of `intent` or `condition` must be specified. When both + * `intent` and `condition` are specified, the transition can only happen + * when both are fulfilled. + * @type string $condition + * The condition to evaluate against [form + * parameters][google.cloud.dialogflow.cx.v3.Form.parameters] or [session + * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * At least one of `intent` or `condition` must be specified. When both + * `intent` and `condition` are specified, the transition can only happen + * when both are fulfilled. + * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $trigger_fulfillment + * The fulfillment to call when the condition is satisfied. At least one of + * `trigger_fulfillment` and `target` must be specified. When both are + * defined, `trigger_fulfillment` is executed first. + * @type string $target_page + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * @type string $target_flow + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique identifier of this transition route. + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique identifier of this transition route. + * + * Generated from protobuf field string name = 6 [(.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 description of the transition route. The maximum length is + * 500 characters. + * + * Generated from protobuf field string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of the transition route. The maximum length is + * 500 characters. + * + * Generated from protobuf field string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. + * Format: + * `projects//locations//agents//intents/`. + * Indicates that the transition can only happen when the given intent is + * matched. + * At least one of `intent` or `condition` must be specified. When both + * `intent` and `condition` are specified, the transition can only happen + * when both are fulfilled. + * + * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getIntent() + { + return $this->intent; + } + + /** + * The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. + * Format: + * `projects//locations//agents//intents/`. + * Indicates that the transition can only happen when the given intent is + * matched. + * At least one of `intent` or `condition` must be specified. When both + * `intent` and `condition` are specified, the transition can only happen + * when both are fulfilled. + * + * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIntent($var) + { + GPBUtil::checkString($var, True); + $this->intent = $var; + + return $this; + } + + /** + * The condition to evaluate against [form + * parameters][google.cloud.dialogflow.cx.v3.Form.parameters] or [session + * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * At least one of `intent` or `condition` must be specified. When both + * `intent` and `condition` are specified, the transition can only happen + * when both are fulfilled. + * + * Generated from protobuf field string condition = 2; + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * The condition to evaluate against [form + * parameters][google.cloud.dialogflow.cx.v3.Form.parameters] or [session + * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * See the [conditions + * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + * At least one of `intent` or `condition` must be specified. When both + * `intent` and `condition` are specified, the transition can only happen + * when both are fulfilled. + * + * Generated from protobuf field string condition = 2; + * @param string $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkString($var, True); + $this->condition = $var; + + return $this; + } + + /** + * The fulfillment to call when the condition is satisfied. At least one of + * `trigger_fulfillment` and `target` must be specified. When both are + * defined, `trigger_fulfillment` is executed first. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment|null + */ + public function getTriggerFulfillment() + { + return $this->trigger_fulfillment; + } + + public function hasTriggerFulfillment() + { + return isset($this->trigger_fulfillment); + } + + public function clearTriggerFulfillment() + { + unset($this->trigger_fulfillment); + } + + /** + * The fulfillment to call when the condition is satisfied. At least one of + * `trigger_fulfillment` and `target` must be specified. When both are + * defined, `trigger_fulfillment` is executed first. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var + * @return $this + */ + public function setTriggerFulfillment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); + $this->trigger_fulfillment = $var; + + return $this; + } + + /** + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string target_page = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetPage() + { + return $this->readOneof(4); + } + + public function hasTargetPage() + { + return $this->hasOneof(4); + } + + /** + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string target_page = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetPage($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string target_flow = 5 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetFlow() + { + return $this->readOneof(5); + } + + public function hasTargetFlow() + { + return $this->hasOneof(5); + } + + /** + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string target_flow = 5 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetFlow($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php new file mode 100644 index 000000000000..0a73ff6e0d8a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php @@ -0,0 +1,161 @@ +google.cloud.dialogflow.cx.v3.TransitionRouteGroup + */ +class TransitionRouteGroup extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the transition route group. + * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] + * populates the name automatically. Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * . + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the transition route group, unique + * within the flow. The display name can be no longer than 30 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Transition routes associated with the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; + */ + private $transition_routes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the transition route group. + * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] + * populates the name automatically. Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * . + * @type string $display_name + * Required. The human-readable name of the transition route group, unique + * within the flow. The display name can be no longer than 30 characters. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $transition_routes + * Transition routes associated with the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the transition route group. + * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] + * populates the name automatically. Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * . + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the transition route group. + * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] + * populates the name automatically. Format: + * `projects//locations//agents//flows//transitionRouteGroups/` + * . + * + * 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 human-readable name of the transition route group, unique + * within the flow. The display name can be no longer than 30 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the transition route group, unique + * within the flow. The display name can be no longer than 30 characters. + * + * 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; + } + + /** + * Transition routes associated with the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitionRoutes() + { + return $this->transition_routes; + } + + /** + * Transition routes associated with the + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitionRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute::class); + $this->transition_routes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage.php new file mode 100644 index 000000000000..fac11995fda2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage.php @@ -0,0 +1,107 @@ +google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + */ +class TransitionRouteGroupCoverage extends \Google\Protobuf\Internal\Message +{ + /** + * Transition route group coverages. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + */ + private $coverages; + /** + * The percent of transition routes in all the transition route groups that + * are covered. + * + * Generated from protobuf field float coverage_score = 2; + */ + protected $coverage_score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage>|\Google\Protobuf\Internal\RepeatedField $coverages + * Transition route group coverages. + * @type float $coverage_score + * The percent of transition routes in all the transition route groups that + * are covered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Transition route group coverages. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCoverages() + { + return $this->coverages; + } + + /** + * Transition route group coverages. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCoverages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage::class); + $this->coverages = $arr; + + return $this; + } + + /** + * The percent of transition routes in all the transition route groups that + * are covered. + * + * Generated from protobuf field float coverage_score = 2; + * @return float + */ + public function getCoverageScore() + { + return $this->coverage_score; + } + + /** + * The percent of transition routes in all the transition route groups that + * are covered. + * + * Generated from protobuf field float coverage_score = 2; + * @param float $var + * @return $this + */ + public function setCoverageScore($var) + { + GPBUtil::checkFloat($var); + $this->coverage_score = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage.php new file mode 100644 index 000000000000..0677e7b7fafd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage.php @@ -0,0 +1,152 @@ +google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + */ +class Coverage extends \Google\Protobuf\Internal\Message +{ + /** + * Transition route group metadata. Only name and displayName will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + */ + protected $route_group = null; + /** + * The list of transition routes and coverage in the transition route group. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + */ + private $transitions; + /** + * The percent of transition routes in the transition route group that are + * covered. + * + * Generated from protobuf field float coverage_score = 3; + */ + protected $coverage_score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $route_group + * Transition route group metadata. Only name and displayName will be set. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage\Transition>|\Google\Protobuf\Internal\RepeatedField $transitions + * The list of transition routes and coverage in the transition route group. + * @type float $coverage_score + * The percent of transition routes in the transition route group that are + * covered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Transition route group metadata. Only name and displayName will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup|null + */ + public function getRouteGroup() + { + return $this->route_group; + } + + public function hasRouteGroup() + { + return isset($this->route_group); + } + + public function clearRouteGroup() + { + unset($this->route_group); + } + + /** + * Transition route group metadata. Only name and displayName will be set. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $var + * @return $this + */ + public function setRouteGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::class); + $this->route_group = $var; + + return $this; + } + + /** + * The list of transition routes and coverage in the transition route group. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitions() + { + return $this->transitions; + } + + /** + * The list of transition routes and coverage in the transition route group. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage\Transition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage\Transition::class); + $this->transitions = $arr; + + return $this; + } + + /** + * The percent of transition routes in the transition route group that are + * covered. + * + * Generated from protobuf field float coverage_score = 3; + * @return float + */ + public function getCoverageScore() + { + return $this->coverage_score; + } + + /** + * The percent of transition routes in the transition route group that are + * covered. + * + * Generated from protobuf field float coverage_score = 3; + * @param float $var + * @return $this + */ + public function setCoverageScore($var) + { + GPBUtil::checkFloat($var); + $this->coverage_score = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Coverage::class, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage_Coverage::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage/Transition.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage/Transition.php new file mode 100644 index 000000000000..5b9c5a6674f4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage/Transition.php @@ -0,0 +1,118 @@ +google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + */ +class Transition extends \Google\Protobuf\Internal\Message +{ + /** + * Intent route or condition route. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + */ + protected $transition_route = null; + /** + * Whether the transition route is covered by at least one of the + * agent's test cases. + * + * Generated from protobuf field bool covered = 2; + */ + protected $covered = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute $transition_route + * Intent route or condition route. + * @type bool $covered + * Whether the transition route is covered by at least one of the + * agent's test cases. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Intent route or condition route. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute|null + */ + public function getTransitionRoute() + { + return $this->transition_route; + } + + public function hasTransitionRoute() + { + return isset($this->transition_route); + } + + public function clearTransitionRoute() + { + unset($this->transition_route); + } + + /** + * Intent route or condition route. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute $var + * @return $this + */ + public function setTransitionRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute::class); + $this->transition_route = $var; + + return $this; + } + + /** + * Whether the transition route is covered by at least one of the + * agent's test cases. + * + * Generated from protobuf field bool covered = 2; + * @return bool + */ + public function getCovered() + { + return $this->covered; + } + + /** + * Whether the transition route is covered by at least one of the + * agent's test cases. + * + * Generated from protobuf field bool covered = 2; + * @param bool $var + * @return $this + */ + public function setCovered($var) + { + GPBUtil::checkBool($var); + $this->covered = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Transition::class, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage_Coverage_Transition::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema.php new file mode 100644 index 000000000000..5ba7d1d75bf8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema.php @@ -0,0 +1,109 @@ +google.cloud.dialogflow.cx.v3.TypeSchema + */ +class TypeSchema extends \Google\Protobuf\Internal\Message +{ + protected $schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\InlineSchema $inline_schema + * Set if this is an inline schema definition. + * @type \Google\Cloud\Dialogflow\Cx\V3\TypeSchema\SchemaReference $schema_reference + * Set if this is a schema reference. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::initOnce(); + parent::__construct($data); + } + + /** + * Set if this is an inline schema definition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\InlineSchema|null + */ + public function getInlineSchema() + { + return $this->readOneof(1); + } + + public function hasInlineSchema() + { + return $this->hasOneof(1); + } + + /** + * Set if this is an inline schema definition. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\InlineSchema $var + * @return $this + */ + public function setInlineSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InlineSchema::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Set if this is a schema reference. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\TypeSchema\SchemaReference|null + */ + public function getSchemaReference() + { + return $this->readOneof(2); + } + + public function hasSchemaReference() + { + return $this->hasOneof(2); + } + + /** + * Set if this is a schema reference. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\TypeSchema\SchemaReference $var + * @return $this + */ + public function setSchemaReference($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TypeSchema\SchemaReference::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSchema() + { + return $this->whichOneof("schema"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema/SchemaReference.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema/SchemaReference.php new file mode 100644 index 000000000000..4ff7f6aac6a4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema/SchemaReference.php @@ -0,0 +1,112 @@ +google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + */ +class SchemaReference extends \Google\Protobuf\Internal\Message +{ + /** + * The tool that contains this schema definition. + * Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1; + */ + protected $tool = ''; + /** + * The name of the schema. + * + * Generated from protobuf field string schema = 2; + */ + protected $schema = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tool + * The tool that contains this schema definition. + * Format: + * `projects//locations//agents//tools/`. + * @type string $schema + * The name of the schema. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::initOnce(); + parent::__construct($data); + } + + /** + * The tool that contains this schema definition. + * Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1; + * @return string + */ + public function getTool() + { + return $this->tool; + } + + /** + * The tool that contains this schema definition. + * Format: + * `projects//locations//agents//tools/`. + * + * Generated from protobuf field string tool = 1; + * @param string $var + * @return $this + */ + public function setTool($var) + { + GPBUtil::checkString($var, True); + $this->tool = $var; + + return $this; + } + + /** + * The name of the schema. + * + * Generated from protobuf field string schema = 2; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * The name of the schema. + * + * Generated from protobuf field string schema = 2; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SchemaReference::class, \Google\Cloud\Dialogflow\Cx\V3\TypeSchema_SchemaReference::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateAgentRequest.php new file mode 100644 index 000000000000..8420b023c8a6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateAgentRequest.php @@ -0,0 +1,142 @@ +google.cloud.dialogflow.cx.v3.UpdateAgentRequest + */ +class UpdateAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $agent = null; + /** + * 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; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Agent $agent Required. The agent to update. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateAgentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Agent $agent, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAgent($agent) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Agent $agent + * Required. The agent to update. + * @type \Google\Protobuf\FieldMask $update_mask + * 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\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Agent $var + * @return $this + */ + public function setAgent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent::class); + $this->agent = $var; + + return $this; + } + + /** + * 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; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The 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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEntityTypeRequest.php new file mode 100644 index 000000000000..eb795ce68bf3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEntityTypeRequest.php @@ -0,0 +1,203 @@ +google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + */ +class UpdateEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The entity type to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_type = null; + /** + * The language of the following fields in `entity_type`: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + /** + * The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\EntityType $entityType Required. The entity type to update. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateEntityTypeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\EntityType $entityType, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEntityType($entityType) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\EntityType $entity_type + * Required. The entity type to update. + * @type string $language_code + * The language of the following fields in `entity_type`: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * are supported. + * Note: languages must be enabled in the agent before they can be used. + * @type \Google\Protobuf\FieldMask $update_mask + * The mask to control which fields get updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The entity type to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\EntityType $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\EntityType::class); + $this->entity_type = $var; + + return $this; + } + + /** + * The language of the following fields in `entity_type`: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the following fields in `entity_type`: + * * `EntityType.entities.value` + * * `EntityType.entities.synonyms` + * * `EntityType.excluded_phrases.value` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEnvironmentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEnvironmentRequest.php new file mode 100644 index 000000000000..cadbf57a4152 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEnvironmentRequest.php @@ -0,0 +1,137 @@ +google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + */ +class UpdateEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The environment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Environment $environment Required. The environment to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The mask to control which fields get updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateEnvironmentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Environment $environment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEnvironment($environment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Environment $environment + * Required. The environment 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\Cx\V3\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The environment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExampleRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExampleRequest.php new file mode 100644 index 000000000000..05c035fbb18a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExampleRequest.php @@ -0,0 +1,142 @@ +google.cloud.dialogflow.cx.v3.UpdateExampleRequest + */ +class UpdateExampleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The example to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $example = null; + /** + * Optional. 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) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Example $example Required. The example to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateExampleRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Example $example, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setExample($example) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Example $example + * Required. The example to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. 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\Cx\V3\Example::initOnce(); + parent::__construct($data); + } + + /** + * Required. The example to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Example|null + */ + public function getExample() + { + return $this->example; + } + + public function hasExample() + { + return isset($this->example); + } + + public function clearExample() + { + unset($this->example); + } + + /** + * Required. The example to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Example $var + * @return $this + */ + public function setExample($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Example::class); + $this->example = $var; + + return $this; + } + + /** + * Optional. 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) = 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. 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) = 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExperimentRequest.php new file mode 100644 index 000000000000..176d4b093336 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExperimentRequest.php @@ -0,0 +1,137 @@ +google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + */ +class UpdateExperimentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The experiment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $experiment = 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; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment Required. The experiment to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The mask to control which fields get updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateExperimentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setExperiment($experiment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment + * Required. The experiment 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\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The experiment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Experiment|null + */ + public function getExperiment() + { + return $this->experiment; + } + + public function hasExperiment() + { + return isset($this->experiment); + } + + public function clearExperiment() + { + unset($this->experiment); + } + + /** + * Required. The experiment to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment $var + * @return $this + */ + public function setExperiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment::class); + $this->experiment = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateFlowRequest.php new file mode 100644 index 000000000000..7958a5ad2242 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateFlowRequest.php @@ -0,0 +1,212 @@ +google.cloud.dialogflow.cx.v3.UpdateFlowRequest + */ +class UpdateFlowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The flow to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $flow = null; + /** + * 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; + */ + protected $update_mask = null; + /** + * The language of the following fields in `flow`: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + */ + protected $language_code = ''; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $flow Required. The flow to update. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateFlowRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Flow $flow, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setFlow($flow) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Flow $flow + * Required. The flow to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * @type string $language_code + * The language of the following fields in `flow`: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Required. The flow to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Flow|null + */ + public function getFlow() + { + return $this->flow; + } + + public function hasFlow() + { + return isset($this->flow); + } + + public function clearFlow() + { + unset($this->flow); + } + + /** + * Required. The flow to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $var + * @return $this + */ + public function setFlow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Flow::class); + $this->flow = $var; + + return $this; + } + + /** + * 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; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The 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; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The language of the following fields in `flow`: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the following fields in `flow`: + * * `Flow.event_handlers.trigger_fulfillment.messages` + * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + * * `Flow.transition_routes.trigger_fulfillment.messages` + * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGenerativeSettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGenerativeSettingsRequest.php new file mode 100644 index 000000000000..bb137233d7ef --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGenerativeSettingsRequest.php @@ -0,0 +1,143 @@ +google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest + */ +class UpdateGenerativeSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Generative settings to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $generative_settings = null; + /** + * Optional. 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) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings $generativeSettings Required. Generative settings to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateGenerativeSettingsRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings $generativeSettings, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGenerativeSettings($generativeSettings) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings $generative_settings + * Required. Generative settings to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. 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\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Generative settings to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings|null + */ + public function getGenerativeSettings() + { + return $this->generative_settings; + } + + public function hasGenerativeSettings() + { + return isset($this->generative_settings); + } + + public function clearGenerativeSettings() + { + unset($this->generative_settings); + } + + /** + * Required. Generative settings to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings $var + * @return $this + */ + public function setGenerativeSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::class); + $this->generative_settings = $var; + + return $this; + } + + /** + * Optional. 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) = 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. 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) = 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGeneratorRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGeneratorRequest.php new file mode 100644 index 000000000000..c7a6701d7dbd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGeneratorRequest.php @@ -0,0 +1,176 @@ +google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + */ +class UpdateGeneratorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The generator to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $generator = null; + /** + * The language to list generators for. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + /** + * 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 = 3; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Generator $generator Required. The generator to update. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateGeneratorRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Generator $generator, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGenerator($generator) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Generator $generator + * Required. The generator to update. + * @type string $language_code + * The language to list generators for. + * @type \Google\Protobuf\FieldMask $update_mask + * 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\Cx\V3\Generator::initOnce(); + parent::__construct($data); + } + + /** + * Required. The generator to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Generator|null + */ + public function getGenerator() + { + return $this->generator; + } + + public function hasGenerator() + { + return isset($this->generator); + } + + public function clearGenerator() + { + unset($this->generator); + } + + /** + * Required. The generator to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Generator $var + * @return $this + */ + public function setGenerator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Generator::class); + $this->generator = $var; + + return $this; + } + + /** + * The language to list generators for. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language to list generators for. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * 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 = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The 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 = 3; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateIntentRequest.php new file mode 100644 index 000000000000..97ea71f67b8f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateIntentRequest.php @@ -0,0 +1,200 @@ +google.cloud.dialogflow.cx.v3.UpdateIntentRequest + */ +class UpdateIntentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The intent to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intent = null; + /** + * The language of the following fields in `intent`: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + /** + * 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 = 3; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $intent Required. The intent to update. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateIntentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Intent $intent, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIntent($intent) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Intent $intent + * Required. The intent to update. + * @type string $language_code + * The language of the following fields in `intent`: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * are supported. + * Note: languages must be enabled in the agent before they can be used. + * @type \Google\Protobuf\FieldMask $update_mask + * 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\Cx\V3\Intent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The intent to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $var + * @return $this + */ + public function setIntent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Intent::class); + $this->intent = $var; + + return $this; + } + + /** + * The language of the following fields in `intent`: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the following fields in `intent`: + * * `Intent.training_phrases.parts.text` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * 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 = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The 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 = 3; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePageRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePageRequest.php new file mode 100644 index 000000000000..12a53a370793 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePageRequest.php @@ -0,0 +1,244 @@ +google.cloud.dialogflow.cx.v3.UpdatePageRequest + */ +class UpdatePageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The page to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page = null; + /** + * The language of the following fields in `page`: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + */ + protected $language_code = ''; + /** + * 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 = 3; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Page $page Required. The page to update. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdatePageRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Page $page, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPage($page) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Page $page + * Required. The page to update. + * @type string $language_code + * The language of the following fields in `page`: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * are supported. + * Note: languages must be enabled in the agent before they can be used. + * @type \Google\Protobuf\FieldMask $update_mask + * 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\Cx\V3\Page::initOnce(); + parent::__construct($data); + } + + /** + * Required. The page to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null + */ + public function getPage() + { + return $this->page; + } + + public function hasPage() + { + return isset($this->page); + } + + public function clearPage() + { + unset($this->page); + } + + /** + * Required. The page to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var + * @return $this + */ + public function setPage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); + $this->page = $var; + + return $this; + } + + /** + * The language of the following fields in `page`: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the following fields in `page`: + * * `Page.entry_fulfillment.messages` + * * `Page.entry_fulfillment.conditional_cases` + * * `Page.event_handlers.trigger_fulfillment.messages` + * * `Page.event_handlers.trigger_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + * * + * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + * * + * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + * * `Page.transition_routes.trigger_fulfillment.messages` + * * `Page.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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 = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * 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 = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The 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 = 3; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePlaybookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePlaybookRequest.php new file mode 100644 index 000000000000..5cf45d0f20ea --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePlaybookRequest.php @@ -0,0 +1,142 @@ +google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest + */ +class UpdatePlaybookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The playbook to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $playbook = null; + /** + * 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; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Playbook $playbook Required. The playbook to update. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdatePlaybookRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Playbook $playbook, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPlaybook($playbook) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Playbook $playbook + * Required. The playbook to update. + * @type \Google\Protobuf\FieldMask $update_mask + * 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\Cx\V3\Playbook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The playbook to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Playbook|null + */ + public function getPlaybook() + { + return $this->playbook; + } + + public function hasPlaybook() + { + return isset($this->playbook); + } + + public function clearPlaybook() + { + unset($this->playbook); + } + + /** + * Required. The playbook to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Playbook $var + * @return $this + */ + public function setPlaybook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Playbook::class); + $this->playbook = $var; + + return $this; + } + + /** + * 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; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The 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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSecuritySettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSecuritySettingsRequest.php new file mode 100644 index 000000000000..4615d8419770 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSecuritySettingsRequest.php @@ -0,0 +1,147 @@ +google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + */ +class UpdateSecuritySettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. [SecuritySettings] object that contains values for each of the + * fields to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_settings = 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; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $securitySettings Required. [SecuritySettings] object that contains values for each of the + * fields to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateSecuritySettingsRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $securitySettings, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSecuritySettings($securitySettings) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $security_settings + * Required. [SecuritySettings] object that contains values for each of the + * fields 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\Cx\V3\SecuritySettings::initOnce(); + parent::__construct($data); + } + + /** + * Required. [SecuritySettings] object that contains values for each of the + * fields to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings|null + */ + public function getSecuritySettings() + { + return $this->security_settings; + } + + public function hasSecuritySettings() + { + return isset($this->security_settings); + } + + public function clearSecuritySettings() + { + unset($this->security_settings); + } + + /** + * Required. [SecuritySettings] object that contains values for each of the + * fields to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $var + * @return $this + */ + public function setSecuritySettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::class); + $this->security_settings = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSessionEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSessionEntityTypeRequest.php new file mode 100644 index 000000000000..7484171605b3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSessionEntityTypeRequest.php @@ -0,0 +1,167 @@ +google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + */ +class UpdateSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The session entity type to update. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session_entity_type = null; + /** + * The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $sessionEntityType Required. The session entity type to update. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateSessionEntityTypeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $sessionEntityType, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSessionEntityType($sessionEntityType) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $session_entity_type + * Required. The session entity type to update. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. + * @type \Google\Protobuf\FieldMask $update_mask + * The mask to control which fields get updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::initOnce(); + parent::__construct($data); + } + + /** + * Required. The session entity type to update. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $var + * @return $this + */ + public function setSessionEntityType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::class); + $this->session_entity_type = $var; + + return $this; + } + + /** + * The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTestCaseRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTestCaseRequest.php new file mode 100644 index 000000000000..4f7b23f1d441 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTestCaseRequest.php @@ -0,0 +1,152 @@ +google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + */ +class UpdateTestCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The test case to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $test_case = null; + /** + * Required. The mask to specify which fields should be updated. The + * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and + * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] + * cannot be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\TestCase $testCase Required. The test case to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The mask to specify which fields should be updated. The + * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and + * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] + * cannot be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateTestCaseRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\TestCase $testCase, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTestCase($testCase) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\TestCase $test_case + * Required. The test case to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The mask to specify which fields should be updated. The + * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and + * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] + * cannot be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The test case to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\TestCase|null + */ + public function getTestCase() + { + return $this->test_case; + } + + public function hasTestCase() + { + return isset($this->test_case); + } + + public function clearTestCase() + { + unset($this->test_case); + } + + /** + * Required. The test case to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\TestCase $var + * @return $this + */ + public function setTestCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestCase::class); + $this->test_case = $var; + + return $this; + } + + /** + * Required. The mask to specify which fields should be updated. The + * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and + * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] + * cannot 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 specify which fields should be updated. The + * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and + * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] + * cannot 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateToolRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateToolRequest.php new file mode 100644 index 000000000000..5bbc761ef2f5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateToolRequest.php @@ -0,0 +1,142 @@ +google.cloud.dialogflow.cx.v3.UpdateToolRequest + */ +class UpdateToolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Tool to be updated. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tool = null; + /** + * 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; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool $tool Required. The Tool to be updated. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateToolRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Tool $tool, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTool($tool) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Tool $tool + * Required. The Tool to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * 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\Cx\V3\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Tool to be updated. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Tool|null + */ + public function getTool() + { + return $this->tool; + } + + public function hasTool() + { + return isset($this->tool); + } + + public function clearTool() + { + unset($this->tool); + } + + /** + * Required. The Tool to be updated. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Tool $var + * @return $this + */ + public function setTool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Tool::class); + $this->tool = $var; + + return $this; + } + + /** + * 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; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The 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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTransitionRouteGroupRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTransitionRouteGroupRequest.php new file mode 100644 index 000000000000..e3e033c82b6b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTransitionRouteGroupRequest.php @@ -0,0 +1,203 @@ +google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + */ +class UpdateTransitionRouteGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The transition route group to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $transition_route_group = null; + /** + * The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * The language of the following fields in `TransitionRouteGroup`: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + */ + protected $language_code = ''; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transitionRouteGroup Required. The transition route group to update. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateTransitionRouteGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transitionRouteGroup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTransitionRouteGroup($transitionRouteGroup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transition_route_group + * Required. The transition route group to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The mask to control which fields get updated. + * @type string $language_code + * The language of the following fields in `TransitionRouteGroup`: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\TransitionRouteGroup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The transition route group to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup|null + */ + public function getTransitionRouteGroup() + { + return $this->transition_route_group; + } + + public function hasTransitionRouteGroup() + { + return isset($this->transition_route_group); + } + + public function clearTransitionRouteGroup() + { + unset($this->transition_route_group); + } + + /** + * Required. The transition route group to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $var + * @return $this + */ + public function setTransitionRouteGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::class); + $this->transition_route_group = $var; + + return $this; + } + + /** + * The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The mask to control which fields get updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The language of the following fields in `TransitionRouteGroup`: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the following fields in `TransitionRouteGroup`: + * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` + * * + * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` + * If not specified, the agent's default language is used. + * [Many + * languages](https://cloud.google.com/dialogflow/cx/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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateVersionRequest.php new file mode 100644 index 000000000000..babda721b2ed --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateVersionRequest.php @@ -0,0 +1,142 @@ +google.cloud.dialogflow.cx.v3.UpdateVersionRequest + */ +class UpdateVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The version to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $version = null; + /** + * Required. The mask to control which fields get updated. Currently only + * `description` and `display_name` can be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Version $version Required. The version to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The mask to control which fields get updated. Currently only + * `description` and `display_name` can be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateVersionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Version $version, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setVersion($version) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Version $version + * Required. The version to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The mask to control which fields get updated. Currently only + * `description` and `display_name` can be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * Required. The version to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\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. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Version $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Version::class); + $this->version = $var; + + return $this; + } + + /** + * Required. The mask to control which fields get updated. Currently only + * `description` and `display_name` can 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. Currently only + * `description` and `display_name` can 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateWebhookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateWebhookRequest.php new file mode 100644 index 000000000000..621a1b1f29f1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateWebhookRequest.php @@ -0,0 +1,142 @@ +google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + */ +class UpdateWebhookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The webhook to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $webhook = null; + /** + * 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; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook Required. The webhook to update. + * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * + * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateWebhookRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setWebhook($webhook) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook + * Required. The webhook to update. + * @type \Google\Protobuf\FieldMask $update_mask + * 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\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The webhook to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook|null + */ + public function getWebhook() + { + return $this->webhook; + } + + public function hasWebhook() + { + return isset($this->webhook); + } + + public function clearWebhook() + { + unset($this->webhook); + } + + /** + * Required. The webhook to update. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook $var + * @return $this + */ + public function setWebhook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook::class); + $this->webhook = $var; + + return $this; + } + + /** + * 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; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The 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; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UserUtterance.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UserUtterance.php new file mode 100644 index 000000000000..34cdf44e590b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UserUtterance.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.cx.v3.UserUtterance + */ +class UserUtterance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Message content in text. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Required. Message content in text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. Message content in text. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. Message content in text. + * + * 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; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateAgentRequest.php new file mode 100644 index 000000000000..2590a7924b4f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateAgentRequest.php @@ -0,0 +1,106 @@ +google.cloud.dialogflow.cx.v3.ValidateAgentRequest + */ +class ValidateAgentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent to validate. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The agent to validate. + * Format: `projects//locations//agents/`. + * @type string $language_code + * If not specified, the agent's default language is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent to validate. + * Format: `projects//locations//agents/`. + * + * 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 agent to validate. + * Format: `projects//locations//agents/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateFlowRequest.php new file mode 100644 index 000000000000..122750b9e695 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateFlowRequest.php @@ -0,0 +1,110 @@ +google.cloud.dialogflow.cx.v3.ValidateFlowRequest + */ +class ValidateFlowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The flow to validate. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The flow to validate. + * Format: + * `projects//locations//agents//flows/`. + * @type string $language_code + * If not specified, the agent's default language is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); + parent::__construct($data); + } + + /** + * Required. The flow to validate. + * Format: + * `projects//locations//agents//flows/`. + * + * 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 flow to validate. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * If not specified, the agent's default language is used. + * + * Generated from protobuf field string language_code = 2; + * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php new file mode 100644 index 000000000000..afc82cf49f24 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php @@ -0,0 +1,212 @@ +google.cloud.dialogflow.cx.v3.ValidationMessage + */ +class ValidationMessage extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the resources where the message is found. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + */ + protected $resource_type = 0; + /** + * The names of the resources where the message is found. + * + * Generated from protobuf field repeated string resources = 2 [deprecated = true]; + * @deprecated + */ + private $resources; + /** + * The resource names of the resources where the message is found. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + */ + private $resource_names; + /** + * Indicates the severity of the message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + */ + protected $severity = 0; + /** + * The message detail. + * + * Generated from protobuf field string detail = 4; + */ + protected $detail = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $resource_type + * The type of the resources where the message is found. + * @type array|\Google\Protobuf\Internal\RepeatedField $resources + * The names of the resources where the message is found. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResourceName>|\Google\Protobuf\Internal\RepeatedField $resource_names + * The resource names of the resources where the message is found. + * @type int $severity + * Indicates the severity of the message. + * @type string $detail + * The message detail. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ValidationMessage::initOnce(); + parent::__construct($data); + } + + /** + * The type of the resources where the message is found. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * @return int + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * The type of the resources where the message is found. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; + * @param int $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ValidationMessage\ResourceType::class); + $this->resource_type = $var; + + return $this; + } + + /** + * The names of the resources where the message is found. + * + * Generated from protobuf field repeated string resources = 2 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getResources() + { + if ($this->resources->count() !== 0) { + @trigger_error('resources is deprecated.', E_USER_DEPRECATED); + } + return $this->resources; + } + + /** + * The names of the resources where the message is found. + * + * Generated from protobuf field repeated string resources = 2 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + if ($arr->count() !== 0) { + @trigger_error('resources is deprecated.', E_USER_DEPRECATED); + } + $this->resources = $arr; + + return $this; + } + + /** + * The resource names of the resources where the message is found. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceNames() + { + return $this->resource_names; + } + + /** + * The resource names of the resources where the message is found. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResourceName>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResourceName::class); + $this->resource_names = $arr; + + return $this; + } + + /** + * Indicates the severity of the message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Indicates the severity of the message. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ValidationMessage\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * The message detail. + * + * Generated from protobuf field string detail = 4; + * @return string + */ + public function getDetail() + { + return $this->detail; + } + + /** + * The message detail. + * + * Generated from protobuf field string detail = 4; + * @param string $var + * @return $this + */ + public function setDetail($var) + { + GPBUtil::checkString($var, True); + $this->detail = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/ResourceType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/ResourceType.php new file mode 100644 index 000000000000..306bb82066c8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/ResourceType.php @@ -0,0 +1,148 @@ +google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType + */ +class ResourceType +{ + /** + * Unspecified. + * + * Generated from protobuf enum RESOURCE_TYPE_UNSPECIFIED = 0; + */ + const RESOURCE_TYPE_UNSPECIFIED = 0; + /** + * Agent. + * + * Generated from protobuf enum AGENT = 1; + */ + const AGENT = 1; + /** + * Intent. + * + * Generated from protobuf enum INTENT = 2; + */ + const INTENT = 2; + /** + * Intent training phrase. + * + * Generated from protobuf enum INTENT_TRAINING_PHRASE = 8; + */ + const INTENT_TRAINING_PHRASE = 8; + /** + * Intent parameter. + * + * Generated from protobuf enum INTENT_PARAMETER = 9; + */ + const INTENT_PARAMETER = 9; + /** + * Multiple intents. + * + * Generated from protobuf enum INTENTS = 10; + */ + const INTENTS = 10; + /** + * Multiple training phrases. + * + * Generated from protobuf enum INTENT_TRAINING_PHRASES = 11; + */ + const INTENT_TRAINING_PHRASES = 11; + /** + * Entity type. + * + * Generated from protobuf enum ENTITY_TYPE = 3; + */ + const ENTITY_TYPE = 3; + /** + * Multiple entity types. + * + * Generated from protobuf enum ENTITY_TYPES = 12; + */ + const ENTITY_TYPES = 12; + /** + * Webhook. + * + * Generated from protobuf enum WEBHOOK = 4; + */ + const WEBHOOK = 4; + /** + * Flow. + * + * Generated from protobuf enum FLOW = 5; + */ + const FLOW = 5; + /** + * Page. + * + * Generated from protobuf enum PAGE = 6; + */ + const PAGE = 6; + /** + * Multiple pages. + * + * Generated from protobuf enum PAGES = 13; + */ + const PAGES = 13; + /** + * Transition route group. + * + * Generated from protobuf enum TRANSITION_ROUTE_GROUP = 7; + */ + const TRANSITION_ROUTE_GROUP = 7; + /** + * Agent transition route group. + * + * Generated from protobuf enum AGENT_TRANSITION_ROUTE_GROUP = 14; + */ + const AGENT_TRANSITION_ROUTE_GROUP = 14; + + private static $valueToName = [ + self::RESOURCE_TYPE_UNSPECIFIED => 'RESOURCE_TYPE_UNSPECIFIED', + self::AGENT => 'AGENT', + self::INTENT => 'INTENT', + self::INTENT_TRAINING_PHRASE => 'INTENT_TRAINING_PHRASE', + self::INTENT_PARAMETER => 'INTENT_PARAMETER', + self::INTENTS => 'INTENTS', + self::INTENT_TRAINING_PHRASES => 'INTENT_TRAINING_PHRASES', + self::ENTITY_TYPE => 'ENTITY_TYPE', + self::ENTITY_TYPES => 'ENTITY_TYPES', + self::WEBHOOK => 'WEBHOOK', + self::FLOW => 'FLOW', + self::PAGE => 'PAGE', + self::PAGES => 'PAGES', + self::TRANSITION_ROUTE_GROUP => 'TRANSITION_ROUTE_GROUP', + self::AGENT_TRANSITION_ROUTE_GROUP => 'AGENT_TRANSITION_ROUTE_GROUP', + ]; + + 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(ResourceType::class, \Google\Cloud\Dialogflow\Cx\V3\ValidationMessage_ResourceType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/Severity.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/Severity.php new file mode 100644 index 000000000000..4b54f20b6cdb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/Severity.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.cx.v3.ValidationMessage.Severity + */ +class Severity +{ + /** + * Unspecified. + * + * 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 failures. + * + * Generated from protobuf enum ERROR = 3; + */ + const ERROR = 3; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::INFO => 'INFO', + self::WARNING => 'WARNING', + self::ERROR => '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(Severity::class, \Google\Cloud\Dialogflow\Cx\V3\ValidationMessage_Severity::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VariantsHistory.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VariantsHistory.php new file mode 100644 index 000000000000..94e51a84f8ee --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VariantsHistory.php @@ -0,0 +1,119 @@ +google.cloud.dialogflow.cx.v3.VariantsHistory + */ +class VariantsHistory extends \Google\Protobuf\Internal\Message +{ + /** + * Update time of the variants. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + protected $variants; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\VersionVariants $version_variants + * The flow versions as the variants. + * @type \Google\Protobuf\Timestamp $update_time + * Update time of the variants. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * The flow versions as the variants. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\VersionVariants|null + */ + public function getVersionVariants() + { + return $this->readOneof(1); + } + + public function hasVersionVariants() + { + return $this->hasOneof(1); + } + + /** + * The flow versions as the variants. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\VersionVariants $var + * @return $this + */ + public function setVersionVariants($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\VersionVariants::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Update time of the variants. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @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); + } + + /** + * Update time of the variants. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getVariants() + { + return $this->whichOneof("variants"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version.php new file mode 100644 index 000000000000..12cc69cc3bb1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version.php @@ -0,0 +1,277 @@ +google.cloud.dialogflow.cx.v3.Version + */ +class Version extends \Google\Protobuf\Internal\Message +{ + /** + * Format: + * projects//locations//agents//flows//versions/. + * Version ID is a self-increasing number generated by Dialogflow upon version + * creation. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the version. Limit of 64 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * The description of the version. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Output only. The NLU settings of the flow at version creation. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nlu_settings = null; + /** + * Output only. Create time of the version. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The state of this version. This field is read-only and cannot + * be set by create and update methods. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Format: + * projects//locations//agents//flows//versions/. + * Version ID is a self-increasing number generated by Dialogflow upon version + * creation. + * @type string $display_name + * Required. The human-readable name of the version. Limit of 64 characters. + * @type string $description + * The description of the version. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * @type \Google\Cloud\Dialogflow\Cx\V3\NluSettings $nlu_settings + * Output only. The NLU settings of the flow at version creation. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the version. + * @type int $state + * Output only. The state 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\Cx\V3\Version::initOnce(); + parent::__construct($data); + } + + /** + * Format: + * projects//locations//agents//flows//versions/. + * Version ID is a self-increasing number generated by Dialogflow upon version + * creation. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Format: + * projects//locations//agents//flows//versions/. + * Version ID is a self-increasing number generated by Dialogflow upon version + * creation. + * + * 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 human-readable name of the version. Limit of 64 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The human-readable name of the version. Limit of 64 characters. + * + * 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; + } + + /** + * The description of the version. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the version. The maximum length is 500 characters. If + * exceeded, the request is rejected. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The NLU settings of the flow at version creation. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dialogflow\Cx\V3\NluSettings|null + */ + public function getNluSettings() + { + return $this->nlu_settings; + } + + public function hasNluSettings() + { + return isset($this->nlu_settings); + } + + public function clearNluSettings() + { + unset($this->nlu_settings); + } + + /** + * Output only. The NLU settings of the flow at version creation. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dialogflow\Cx\V3\NluSettings $var + * @return $this + */ + public function setNluSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\NluSettings::class); + $this->nlu_settings = $var; + + return $this; + } + + /** + * Output only. Create time of the version. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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 version. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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 state of this version. This field is read-only and cannot + * be set by create and update methods. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of this version. This field is read-only and cannot + * be set by create and update methods. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Version\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version/State.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version/State.php new file mode 100644 index 000000000000..c2cd9105a082 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version/State.php @@ -0,0 +1,71 @@ +google.cloud.dialogflow.cx.v3.Version.State + */ +class State +{ + /** + * Not specified. This value is not used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Version is not ready to serve (e.g. training is running). + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * Training has succeeded and this version is ready to serve. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * Version training failed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + 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\Cx\V3\Version_State::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants.php new file mode 100644 index 000000000000..3dd423d41e7a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants.php @@ -0,0 +1,67 @@ +google.cloud.dialogflow.cx.v3.VersionVariants + */ +class VersionVariants extends \Google\Protobuf\Internal\Message +{ + /** + * A list of flow version variants. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + */ + private $variants; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\VersionVariants\Variant>|\Google\Protobuf\Internal\RepeatedField $variants + * A list of flow version variants. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * A list of flow version variants. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVariants() + { + return $this->variants; + } + + /** + * A list of flow version variants. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\VersionVariants\Variant>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVariants($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\VersionVariants\Variant::class); + $this->variants = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants/Variant.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants/Variant.php new file mode 100644 index 000000000000..4ac680c1f322 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants/Variant.php @@ -0,0 +1,150 @@ +google.cloud.dialogflow.cx.v3.VersionVariants.Variant + */ +class Variant extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the flow version. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * Percentage of the traffic which should be routed to this + * version of flow. Traffic allocation for a single flow must sum up to 1.0. + * + * Generated from protobuf field float traffic_allocation = 2; + */ + protected $traffic_allocation = 0.0; + /** + * Whether the variant is for the control group. + * + * Generated from protobuf field bool is_control_group = 3; + */ + protected $is_control_group = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * The name of the flow version. + * Format: + * `projects//locations//agents//flows//versions/`. + * @type float $traffic_allocation + * Percentage of the traffic which should be routed to this + * version of flow. Traffic allocation for a single flow must sum up to 1.0. + * @type bool $is_control_group + * Whether the variant is for the control group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); + parent::__construct($data); + } + + /** + * The name of the flow version. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The name of the flow version. + * Format: + * `projects//locations//agents//flows//versions/`. + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Percentage of the traffic which should be routed to this + * version of flow. Traffic allocation for a single flow must sum up to 1.0. + * + * Generated from protobuf field float traffic_allocation = 2; + * @return float + */ + public function getTrafficAllocation() + { + return $this->traffic_allocation; + } + + /** + * Percentage of the traffic which should be routed to this + * version of flow. Traffic allocation for a single flow must sum up to 1.0. + * + * Generated from protobuf field float traffic_allocation = 2; + * @param float $var + * @return $this + */ + public function setTrafficAllocation($var) + { + GPBUtil::checkFloat($var); + $this->traffic_allocation = $var; + + return $this; + } + + /** + * Whether the variant is for the control group. + * + * Generated from protobuf field bool is_control_group = 3; + * @return bool + */ + public function getIsControlGroup() + { + return $this->is_control_group; + } + + /** + * Whether the variant is for the control group. + * + * Generated from protobuf field bool is_control_group = 3; + * @param bool $var + * @return $this + */ + public function setIsControlGroup($var) + { + GPBUtil::checkBool($var); + $this->is_control_group = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Variant::class, \Google\Cloud\Dialogflow\Cx\V3\VersionVariants_Variant::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VoiceSelectionParams.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VoiceSelectionParams.php new file mode 100644 index 000000000000..ed9476386ca5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VoiceSelectionParams.php @@ -0,0 +1,137 @@ +google.cloud.dialogflow.cx.v3.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.cx.v3.VoiceSelectionParams.ssml_gender]. + * For the list of available voices, please refer to [Supported voices and + * languages](https://cloud.google.com/text-to-speech/docs/voices). + * + * 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.cx.v3.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer substitutes a voice with a + * different gender rather than failing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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.cx.v3.VoiceSelectionParams.ssml_gender]. + * For the list of available voices, please refer to [Supported voices and + * languages](https://cloud.google.com/text-to-speech/docs/voices). + * @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.cx.v3.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer substitutes a voice with a + * different gender rather than failing the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.VoiceSelectionParams.ssml_gender]. + * For the list of available voices, please refer to [Supported voices and + * languages](https://cloud.google.com/text-to-speech/docs/voices). + * + * 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.cx.v3.VoiceSelectionParams.ssml_gender]. + * For the list of available voices, please refer to [Supported voices and + * languages](https://cloud.google.com/text-to-speech/docs/voices). + * + * 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.cx.v3.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer substitutes a voice with a + * different gender rather than failing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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.cx.v3.VoiceSelectionParams.name]. Note that + * this is only a preference, not requirement. If a voice of the appropriate + * gender is not available, the synthesizer substitutes a voice with a + * different gender rather than failing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; + * @param int $var + * @return $this + */ + public function setSsmlGender($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SsmlVoiceGender::class); + $this->ssml_gender = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook.php new file mode 100644 index 000000000000..ce20199fde7f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook.php @@ -0,0 +1,292 @@ +google.cloud.dialogflow.cx.v3.Webhook + */ +class Webhook extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier of the webhook. + * Required for the + * [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook] + * method. + * [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook] + * populates the name automatically. Format: + * `projects//locations//agents//webhooks/`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The human-readable name of the webhook, unique within the agent. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Webhook execution timeout. Execution is considered failed if Dialogflow + * doesn't receive a response from webhook at the end of the timeout period. + * Defaults to 5 seconds, maximum allowed timeout is 30 seconds. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 6; + */ + protected $timeout = null; + /** + * Indicates whether the webhook is disabled. + * + * Generated from protobuf field bool disabled = 5; + */ + protected $disabled = false; + protected $webhook; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique identifier of the webhook. + * Required for the + * [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook] + * method. + * [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook] + * populates the name automatically. Format: + * `projects//locations//agents//webhooks/`. + * @type string $display_name + * Required. The human-readable name of the webhook, unique within the agent. + * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService $generic_web_service + * Configuration for a generic web service. + * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig $service_directory + * Configuration for a [Service + * Directory](https://cloud.google.com/service-directory) service. + * @type \Google\Protobuf\Duration $timeout + * Webhook execution timeout. Execution is considered failed if Dialogflow + * doesn't receive a response from webhook at the end of the timeout period. + * Defaults to 5 seconds, maximum allowed timeout is 30 seconds. + * @type bool $disabled + * Indicates whether the webhook is disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier of the webhook. + * Required for the + * [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook] + * method. + * [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook] + * populates the name automatically. Format: + * `projects//locations//agents//webhooks/`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique identifier of the webhook. + * Required for the + * [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook] + * method. + * [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook] + * populates the name automatically. Format: + * `projects//locations//agents//webhooks/`. + * + * 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 human-readable name of the webhook, unique within the 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 human-readable name of the webhook, unique within the 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; + } + + /** + * Configuration for a generic web service. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService|null + */ + public function getGenericWebService() + { + return $this->readOneof(4); + } + + public function hasGenericWebService() + { + return $this->hasOneof(4); + } + + /** + * Configuration for a generic web service. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService $var + * @return $this + */ + public function setGenericWebService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Configuration for a [Service + * Directory](https://cloud.google.com/service-directory) service. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7; + * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig|null + */ + public function getServiceDirectory() + { + return $this->readOneof(7); + } + + public function hasServiceDirectory() + { + return $this->hasOneof(7); + } + + /** + * Configuration for a [Service + * Directory](https://cloud.google.com/service-directory) service. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7; + * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig $var + * @return $this + */ + public function setServiceDirectory($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Webhook execution timeout. Execution is considered failed if Dialogflow + * doesn't receive a response from webhook at the end of the timeout period. + * Defaults to 5 seconds, maximum allowed timeout is 30 seconds. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Webhook execution timeout. Execution is considered failed if Dialogflow + * doesn't receive a response from webhook at the end of the timeout period. + * Defaults to 5 seconds, maximum allowed timeout is 30 seconds. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Indicates whether the webhook is disabled. + * + * Generated from protobuf field bool disabled = 5; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * Indicates whether the webhook is disabled. + * + * Generated from protobuf field bool disabled = 5; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * @return string + */ + public function getWebhook() + { + return $this->whichOneof("webhook"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService.php new file mode 100644 index 000000000000..070f41bf1345 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService.php @@ -0,0 +1,658 @@ +google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + */ +class GenericWebService extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The webhook URI for receiving POST requests. It must use https + * protocol. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * The user name for HTTP Basic authentication. + * + * Generated from protobuf field string username = 2 [deprecated = true]; + * @deprecated + */ + protected $username = ''; + /** + * The password for HTTP Basic authentication. + * + * Generated from protobuf field string password = 3 [deprecated = true]; + * @deprecated + */ + protected $password = ''; + /** + * Optional. The SecretManager secret version resource storing the + * username:password pair for HTTP Basic authentication. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $secret_version_for_username_password = ''; + /** + * The HTTP request headers to send together with webhook requests. + * + * Generated from protobuf field map request_headers = 4; + */ + private $request_headers; + /** + * Optional. The HTTP request headers to send together with webhook + * requests. Header values are stored in SecretManager secret versions. + * When the same header name is specified in both `request_headers` and + * `secret_versions_for_request_headers`, the value in + * `secret_versions_for_request_headers` will be used. + * + * Generated from protobuf field map secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $secret_versions_for_request_headers; + /** + * Optional. Specifies a list of allowed custom CA certificates (in DER + * format) for HTTPS verification. This overrides the default SSL trust + * store. If this is empty or unspecified, Dialogflow will use Google's + * default trust store to verify certificates. N.B. Make sure the HTTPS + * server certificates are signed with "subject alt name". For instance a + * certificate can be self-signed using the following command, + * ``` + * openssl x509 -req -days 200 -in example.com.csr \ + * -signkey example.com.key \ + * -out example.com.crt \ + * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + * ``` + * + * Generated from protobuf field repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $allowed_ca_certs; + /** + * Optional. The OAuth configuration of the webhook. If specified, + * Dialogflow will initiate the OAuth client credential flow to exchange an + * access token from the 3rd party platform and put it in the auth header. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $oauth_config = null; + /** + * Optional. Indicate the auth token type generated from the [Diglogflow + * service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * The generated token is sent in the Authorization header. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_agent_auth = 0; + /** + * Optional. Configuration for service account authentication. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account_auth_config = null; + /** + * Optional. Type of the webhook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $webhook_type = 0; + /** + * Optional. HTTP method for the flexible webhook calls. Standard webhook + * always uses POST. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $http_method = 0; + /** + * Optional. Defines a custom JSON object as request body to send to + * flexible webhook. + * + * Generated from protobuf field string request_body = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_body = ''; + /** + * Optional. Maps the values extracted from specific fields of the flexible + * webhook response into session parameters. + * - Key: session parameter name + * - Value: field path in the webhook response + * + * Generated from protobuf field map parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $parameter_mapping; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. The webhook URI for receiving POST requests. It must use https + * protocol. + * @type string $username + * The user name for HTTP Basic authentication. + * @type string $password + * The password for HTTP Basic authentication. + * @type string $secret_version_for_username_password + * Optional. The SecretManager secret version resource storing the + * username:password pair for HTTP Basic authentication. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * @type array|\Google\Protobuf\Internal\MapField $request_headers + * The HTTP request headers to send together with webhook requests. + * @type array|\Google\Protobuf\Internal\MapField $secret_versions_for_request_headers + * Optional. The HTTP request headers to send together with webhook + * requests. Header values are stored in SecretManager secret versions. + * When the same header name is specified in both `request_headers` and + * `secret_versions_for_request_headers`, the value in + * `secret_versions_for_request_headers` will be used. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_ca_certs + * Optional. Specifies a list of allowed custom CA certificates (in DER + * format) for HTTPS verification. This overrides the default SSL trust + * store. If this is empty or unspecified, Dialogflow will use Google's + * default trust store to verify certificates. N.B. Make sure the HTTPS + * server certificates are signed with "subject alt name". For instance a + * certificate can be self-signed using the following command, + * ``` + * openssl x509 -req -days 200 -in example.com.csr \ + * -signkey example.com.key \ + * -out example.com.crt \ + * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + * ``` + * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\OAuthConfig $oauth_config + * Optional. The OAuth configuration of the webhook. If specified, + * Dialogflow will initiate the OAuth client credential flow to exchange an + * access token from the 3rd party platform and put it in the auth header. + * @type int $service_agent_auth + * Optional. Indicate the auth token type generated from the [Diglogflow + * service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * The generated token is sent in the Authorization header. + * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig $service_account_auth_config + * Optional. Configuration for service account authentication. + * @type int $webhook_type + * Optional. Type of the webhook. + * @type int $http_method + * Optional. HTTP method for the flexible webhook calls. Standard webhook + * always uses POST. + * @type string $request_body + * Optional. Defines a custom JSON object as request body to send to + * flexible webhook. + * @type array|\Google\Protobuf\Internal\MapField $parameter_mapping + * Optional. Maps the values extracted from specific fields of the flexible + * webhook response into session parameters. + * - Key: session parameter name + * - Value: field path in the webhook response + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The webhook 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 webhook 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; + } + + /** + * The user name for HTTP Basic authentication. + * + * Generated from protobuf field string username = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getUsername() + { + if ($this->username !== '') { + @trigger_error('username is deprecated.', E_USER_DEPRECATED); + } + return $this->username; + } + + /** + * The user name for HTTP Basic authentication. + * + * Generated from protobuf field string username = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setUsername($var) + { + @trigger_error('username is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for HTTP Basic authentication. + * + * Generated from protobuf field string password = 3 [deprecated = true]; + * @return string + * @deprecated + */ + public function getPassword() + { + if ($this->password !== '') { + @trigger_error('password is deprecated.', E_USER_DEPRECATED); + } + return $this->password; + } + + /** + * The password for HTTP Basic authentication. + * + * Generated from protobuf field string password = 3 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setPassword($var) + { + @trigger_error('password is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Optional. The SecretManager secret version resource storing the + * username:password pair for HTTP Basic authentication. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getSecretVersionForUsernamePassword() + { + return $this->secret_version_for_username_password; + } + + /** + * Optional. The SecretManager secret version resource storing the + * username:password pair for HTTP Basic authentication. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecretVersionForUsernamePassword($var) + { + GPBUtil::checkString($var, True); + $this->secret_version_for_username_password = $var; + + return $this; + } + + /** + * The HTTP request headers to send together with webhook requests. + * + * Generated from protobuf field map request_headers = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getRequestHeaders() + { + return $this->request_headers; + } + + /** + * The HTTP request headers to send together with webhook requests. + * + * Generated from protobuf field map request_headers = 4; + * @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. The HTTP request headers to send together with webhook + * requests. Header values are stored in SecretManager secret versions. + * When the same header name is specified in both `request_headers` and + * `secret_versions_for_request_headers`, the value in + * `secret_versions_for_request_headers` will be used. + * + * Generated from protobuf field map secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSecretVersionsForRequestHeaders() + { + return $this->secret_versions_for_request_headers; + } + + /** + * Optional. The HTTP request headers to send together with webhook + * requests. Header values are stored in SecretManager secret versions. + * When the same header name is specified in both `request_headers` and + * `secret_versions_for_request_headers`, the value in + * `secret_versions_for_request_headers` will be used. + * + * Generated from protobuf field map secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSecretVersionsForRequestHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\SecretVersionHeaderValue::class); + $this->secret_versions_for_request_headers = $arr; + + return $this; + } + + /** + * Optional. Specifies a list of allowed custom CA certificates (in DER + * format) for HTTPS verification. This overrides the default SSL trust + * store. If this is empty or unspecified, Dialogflow will use Google's + * default trust store to verify certificates. N.B. Make sure the HTTPS + * server certificates are signed with "subject alt name". For instance a + * certificate can be self-signed using the following command, + * ``` + * openssl x509 -req -days 200 -in example.com.csr \ + * -signkey example.com.key \ + * -out example.com.crt \ + * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + * ``` + * + * Generated from protobuf field repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedCaCerts() + { + return $this->allowed_ca_certs; + } + + /** + * Optional. Specifies a list of allowed custom CA certificates (in DER + * format) for HTTPS verification. This overrides the default SSL trust + * store. If this is empty or unspecified, Dialogflow will use Google's + * default trust store to verify certificates. N.B. Make sure the HTTPS + * server certificates are signed with "subject alt name". For instance a + * certificate can be self-signed using the following command, + * ``` + * openssl x509 -req -days 200 -in example.com.csr \ + * -signkey example.com.key \ + * -out example.com.crt \ + * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + * ``` + * + * Generated from protobuf field repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedCaCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->allowed_ca_certs = $arr; + + return $this; + } + + /** + * Optional. The OAuth configuration of the webhook. If specified, + * Dialogflow will initiate the OAuth client credential flow to exchange an + * access token from the 3rd party platform and put it in the auth header. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\OAuthConfig|null + */ + public function getOauthConfig() + { + return $this->oauth_config; + } + + public function hasOauthConfig() + { + return isset($this->oauth_config); + } + + public function clearOauthConfig() + { + unset($this->oauth_config); + } + + /** + * Optional. The OAuth configuration of the webhook. If specified, + * Dialogflow will initiate the OAuth client credential flow to exchange an + * access token from the 3rd party platform and put it in the auth header. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\OAuthConfig $var + * @return $this + */ + public function setOauthConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\OAuthConfig::class); + $this->oauth_config = $var; + + return $this; + } + + /** + * Optional. Indicate the auth token type generated from the [Diglogflow + * service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * The generated token is sent in the Authorization header. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getServiceAgentAuth() + { + return $this->service_agent_auth; + } + + /** + * Optional. Indicate the auth token type generated from the [Diglogflow + * service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * The generated token is sent in the Authorization header. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setServiceAgentAuth($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAgentAuth::class); + $this->service_agent_auth = $var; + + return $this; + } + + /** + * Optional. Configuration for service account authentication. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig|null + */ + public function getServiceAccountAuthConfig() + { + return $this->service_account_auth_config; + } + + public function hasServiceAccountAuthConfig() + { + return isset($this->service_account_auth_config); + } + + public function clearServiceAccountAuthConfig() + { + unset($this->service_account_auth_config); + } + + /** + * Optional. Configuration for service account authentication. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig $var + * @return $this + */ + public function setServiceAccountAuthConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig::class); + $this->service_account_auth_config = $var; + + return $this; + } + + /** + * Optional. Type of the webhook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getWebhookType() + { + return $this->webhook_type; + } + + /** + * Optional. Type of the webhook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setWebhookType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\WebhookType::class); + $this->webhook_type = $var; + + return $this; + } + + /** + * Optional. HTTP method for the flexible webhook calls. Standard webhook + * always uses POST. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * Optional. HTTP method for the flexible webhook calls. Standard webhook + * always uses POST. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\HttpMethod::class); + $this->http_method = $var; + + return $this; + } + + /** + * Optional. Defines a custom JSON object as request body to send to + * flexible webhook. + * + * Generated from protobuf field string request_body = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestBody() + { + return $this->request_body; + } + + /** + * Optional. Defines a custom JSON object as request body to send to + * flexible webhook. + * + * Generated from protobuf field string request_body = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestBody($var) + { + GPBUtil::checkString($var, True); + $this->request_body = $var; + + return $this; + } + + /** + * Optional. Maps the values extracted from specific fields of the flexible + * webhook response into session parameters. + * - Key: session parameter name + * - Value: field path in the webhook response + * + * Generated from protobuf field map parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getParameterMapping() + { + return $this->parameter_mapping; + } + + /** + * Optional. Maps the values extracted from specific fields of the flexible + * webhook response into session parameters. + * - Key: session parameter name + * - Value: field path in the webhook response + * + * Generated from protobuf field map parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setParameterMapping($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->parameter_mapping = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GenericWebService::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/HttpMethod.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/HttpMethod.php new file mode 100644 index 000000000000..ddfa110512cd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/HttpMethod.php @@ -0,0 +1,99 @@ +google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod + */ +class HttpMethod +{ + /** + * HTTP method not specified. + * + * Generated from protobuf enum HTTP_METHOD_UNSPECIFIED = 0; + */ + const HTTP_METHOD_UNSPECIFIED = 0; + /** + * HTTP POST Method. + * + * Generated from protobuf enum POST = 1; + */ + const POST = 1; + /** + * HTTP GET Method. + * + * Generated from protobuf enum GET = 2; + */ + const GET = 2; + /** + * HTTP HEAD Method. + * + * Generated from protobuf enum HEAD = 3; + */ + const HEAD = 3; + /** + * HTTP PUT Method. + * + * Generated from protobuf enum PUT = 4; + */ + const PUT = 4; + /** + * HTTP DELETE Method. + * + * Generated from protobuf enum DELETE = 5; + */ + const DELETE = 5; + /** + * HTTP PATCH Method. + * + * Generated from protobuf enum PATCH = 6; + */ + const PATCH = 6; + /** + * HTTP OPTIONS Method. + * + * Generated from protobuf enum OPTIONS = 7; + */ + const OPTIONS = 7; + + private static $valueToName = [ + self::HTTP_METHOD_UNSPECIFIED => 'HTTP_METHOD_UNSPECIFIED', + self::POST => 'POST', + self::GET => 'GET', + self::HEAD => 'HEAD', + self::PUT => 'PUT', + self::DELETE => 'DELETE', + self::PATCH => 'PATCH', + self::OPTIONS => 'OPTIONS', + ]; + + 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(HttpMethod::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_HttpMethod::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/OAuthConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/OAuthConfig.php new file mode 100644 index 000000000000..0efa470f202c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/OAuthConfig.php @@ -0,0 +1,223 @@ +google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + */ +class OAuthConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The client ID provided by the 3rd party platform. + * + * Generated from protobuf field string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_id = ''; + /** + * Optional. The client secret provided by the 3rd party platform. + * + * Generated from protobuf field string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client_secret = ''; + /** + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $secret_version_for_client_secret = ''; + /** + * Required. The token endpoint provided by the 3rd party platform to + * exchange an access token. + * + * Generated from protobuf field string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $token_endpoint = ''; + /** + * Optional. The OAuth scopes to grant. + * + * Generated from protobuf field repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $scopes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $client_id + * Required. The client ID provided by the 3rd party platform. + * @type string $client_secret + * Optional. The client secret provided by the 3rd party platform. + * @type string $secret_version_for_client_secret + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * @type string $token_endpoint + * Required. The token endpoint provided by the 3rd party platform to + * exchange an access token. + * @type array|\Google\Protobuf\Internal\RepeatedField $scopes + * Optional. The OAuth scopes to grant. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The client ID provided by the 3rd party platform. + * + * Generated from protobuf field string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClientId() + { + return $this->client_id; + } + + /** + * Required. The client ID provided by the 3rd party platform. + * + * Generated from protobuf field string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setClientId($var) + { + GPBUtil::checkString($var, True); + $this->client_id = $var; + + return $this; + } + + /** + * Optional. The client secret provided by the 3rd party platform. + * + * Generated from protobuf field string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClientSecret() + { + return $this->client_secret; + } + + /** + * Optional. The client secret provided by the 3rd party platform. + * + * Generated from protobuf field string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClientSecret($var) + { + GPBUtil::checkString($var, True); + $this->client_secret = $var; + + return $this; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getSecretVersionForClientSecret() + { + return $this->secret_version_for_client_secret; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecretVersionForClientSecret($var) + { + GPBUtil::checkString($var, True); + $this->secret_version_for_client_secret = $var; + + return $this; + } + + /** + * Required. The token endpoint provided by the 3rd party platform to + * exchange an access token. + * + * Generated from protobuf field string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTokenEndpoint() + { + return $this->token_endpoint; + } + + /** + * Required. The token endpoint provided by the 3rd party platform to + * exchange an access token. + * + * Generated from protobuf field string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTokenEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->token_endpoint = $var; + + return $this; + } + + /** + * Optional. The OAuth scopes to grant. + * + * Generated from protobuf field repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScopes() + { + return $this->scopes; + } + + /** + * Optional. The OAuth scopes to grant. + * + * Generated from protobuf field repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scopes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OAuthConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_OAuthConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php new file mode 100644 index 000000000000..992da3b33e3b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php @@ -0,0 +1,75 @@ +google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + */ +class SecretVersionHeaderValue extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The SecretManager secret version resource storing the header + * value. Format: `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $secret_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $secret_version + * Required. The SecretManager secret version resource storing the header + * value. Format: `projects/{project}/secrets/{secret}/versions/{version}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The SecretManager secret version resource storing the header + * value. Format: `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSecretVersion() + { + return $this->secret_version; + } + + /** + * Required. The SecretManager secret version resource storing the header + * value. Format: `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecretVersion($var) + { + GPBUtil::checkString($var, True); + $this->secret_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecretVersionHeaderValue::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_SecretVersionHeaderValue::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php new file mode 100644 index 000000000000..8e98c66d61ce --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php @@ -0,0 +1,98 @@ +google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + */ +class ServiceAccountAuthConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The email address of the service account used to authenticate + * the webhook call. Dialogflow uses this service account to exchange an + * access token and the access token is then sent in the `Authorization` + * header of the webhook request. + * The service account must have the + * `roles/iam.serviceAccountTokenCreator` role granted to the + * [Dialogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * + * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_account = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_account + * Required. The email address of the service account used to authenticate + * the webhook call. Dialogflow uses this service account to exchange an + * access token and the access token is then sent in the `Authorization` + * header of the webhook request. + * The service account must have the + * `roles/iam.serviceAccountTokenCreator` role granted to the + * [Dialogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The email address of the service account used to authenticate + * the webhook call. Dialogflow uses this service account to exchange an + * access token and the access token is then sent in the `Authorization` + * header of the webhook request. + * The service account must have the + * `roles/iam.serviceAccountTokenCreator` role granted to the + * [Dialogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * + * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Required. The email address of the service account used to authenticate + * the webhook call. Dialogflow uses this service account to exchange an + * access token and the access token is then sent in the `Authorization` + * header of the webhook request. + * The service account must have the + * `roles/iam.serviceAccountTokenCreator` role granted to the + * [Dialogflow service + * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + * + * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceAccountAuthConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_ServiceAccountAuthConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAgentAuth.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAgentAuth.php new file mode 100644 index 000000000000..19a4b6a37a33 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAgentAuth.php @@ -0,0 +1,80 @@ +google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth + */ +class ServiceAgentAuth +{ + /** + * Service agent auth type unspecified. Default to ID_TOKEN. + * + * Generated from protobuf enum SERVICE_AGENT_AUTH_UNSPECIFIED = 0; + */ + const SERVICE_AGENT_AUTH_UNSPECIFIED = 0; + /** + * No token used. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * Use [ID + * token](https://cloud.google.com/docs/authentication/token-types#id) + * generated from service agent. This can be used to access Cloud Function + * and Cloud Run after you grant Invoker role to + * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. + * + * Generated from protobuf enum ID_TOKEN = 2; + */ + const ID_TOKEN = 2; + /** + * Use [access + * token](https://cloud.google.com/docs/authentication/token-types#access) + * generated from service agent. This can be used to access other Google + * Cloud APIs after you grant required roles to + * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. + * + * Generated from protobuf enum ACCESS_TOKEN = 3; + */ + const ACCESS_TOKEN = 3; + + private static $valueToName = [ + self::SERVICE_AGENT_AUTH_UNSPECIFIED => 'SERVICE_AGENT_AUTH_UNSPECIFIED', + self::NONE => 'NONE', + self::ID_TOKEN => 'ID_TOKEN', + self::ACCESS_TOKEN => 'ACCESS_TOKEN', + ]; + + 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(ServiceAgentAuth::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_ServiceAgentAuth::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/WebhookType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/WebhookType.php new file mode 100644 index 000000000000..a700af424e80 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/WebhookType.php @@ -0,0 +1,64 @@ +google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType + */ +class WebhookType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum WEBHOOK_TYPE_UNSPECIFIED = 0; + */ + const WEBHOOK_TYPE_UNSPECIFIED = 0; + /** + * Represents a standard webhook. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * Represents a flexible webhook. + * + * Generated from protobuf enum FLEXIBLE = 2; + */ + const FLEXIBLE = 2; + + private static $valueToName = [ + self::WEBHOOK_TYPE_UNSPECIFIED => 'WEBHOOK_TYPE_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::FLEXIBLE => 'FLEXIBLE', + ]; + + 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(WebhookType::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_WebhookType::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/ServiceDirectoryConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/ServiceDirectoryConfig.php new file mode 100644 index 000000000000..a452a45b6a0e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/ServiceDirectoryConfig.php @@ -0,0 +1,135 @@ +google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + */ +class ServiceDirectoryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of [Service + * Directory](https://cloud.google.com/service-directory) service. + * Format: + * `projects//locations//namespaces//services/`. + * `Location ID` of the service directory must be the same as the location + * of the agent. + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $service = ''; + /** + * Generic Service configuration of this webhook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 2; + */ + protected $generic_web_service = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * Required. The name of [Service + * Directory](https://cloud.google.com/service-directory) service. + * Format: + * `projects//locations//namespaces//services/`. + * `Location ID` of the service directory must be the same as the location + * of the agent. + * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService $generic_web_service + * Generic Service configuration of this webhook. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of [Service + * Directory](https://cloud.google.com/service-directory) service. + * Format: + * `projects//locations//namespaces//services/`. + * `Location ID` of the service directory must be the same as the location + * of the agent. + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Required. The name of [Service + * Directory](https://cloud.google.com/service-directory) service. + * Format: + * `projects//locations//namespaces//services/`. + * `Location ID` of the service directory must be the same as the location + * of the agent. + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Generic Service configuration of this webhook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService|null + */ + public function getGenericWebService() + { + return $this->generic_web_service; + } + + public function hasGenericWebService() + { + return isset($this->generic_web_service); + } + + public function clearGenericWebService() + { + unset($this->generic_web_service); + } + + /** + * Generic Service configuration of this webhook. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService $var + * @return $this + */ + public function setGenericWebService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService::class); + $this->generic_web_service = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceDirectoryConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_ServiceDirectoryConfig::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest.php new file mode 100644 index 000000000000..1123abe23f0e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest.php @@ -0,0 +1,673 @@ +google.cloud.dialogflow.cx.v3.WebhookRequest + */ +class WebhookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Always present. The unique identifier of the + * [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] + * that will be returned to the API caller. + * + * Generated from protobuf field string detect_intent_response_id = 1; + */ + protected $detect_intent_response_id = ''; + /** + * The language code specified in the [original + * request][QueryInput.language_code]. + * + * Generated from protobuf field string language_code = 15; + */ + protected $language_code = ''; + /** + * Always present. Information about the fulfillment that triggered this + * webhook call. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; + */ + protected $fulfillment_info = null; + /** + * Information about the last matched intent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; + */ + protected $intent_info = null; + /** + * Information about page status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; + */ + protected $page_info = null; + /** + * Information about session status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5; + */ + protected $session_info = null; + /** + * The list of rich message responses to present to the user. Webhook can + * choose to append or replace this list in + * [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response]; + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7; + */ + private $messages; + /** + * Custom data set in + * [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload]. + * + * Generated from protobuf field .google.protobuf.Struct payload = 8; + */ + protected $payload = null; + /** + * The sentiment analysis result of the current user request. The field is + * filled when sentiment analysis is configured to be enabled for the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + */ + protected $sentiment_analysis_result = null; + /** + * Information about the language of the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LanguageInfo language_info = 18; + */ + protected $language_info = null; + protected $query; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $detect_intent_response_id + * Always present. The unique identifier of the + * [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] + * that will be returned to the API caller. + * @type string $text + * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was + * provided as input, this field will contain a copy of the text. + * @type string $trigger_intent + * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as + * input, this field will contain a copy of the intent identifier. Format: + * `projects//locations//agents//intents/`. + * @type string $transcript + * If [natural language speech + * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, + * this field will contain the transcript for the audio. + * @type string $trigger_event + * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as + * input, this field will contain the name of the event. + * @type string $dtmf_digits + * If [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input, + * this field will contain the DTMF digits. + * @type string $language_code + * The language code specified in the [original + * request][QueryInput.language_code]. + * @type \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo $fulfillment_info + * Always present. Information about the fulfillment that triggered this + * webhook call. + * @type \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo $intent_info + * Information about the last matched intent. + * @type \Google\Cloud\Dialogflow\Cx\V3\PageInfo $page_info + * Information about page status. + * @type \Google\Cloud\Dialogflow\Cx\V3\SessionInfo $session_info + * Information about session status. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $messages + * The list of rich message responses to present to the user. Webhook can + * choose to append or replace this list in + * [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response]; + * @type \Google\Protobuf\Struct $payload + * Custom data set in + * [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload]. + * @type \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\SentimentAnalysisResult $sentiment_analysis_result + * The sentiment analysis result of the current user request. The field is + * filled when sentiment analysis is configured to be enabled for the request. + * @type \Google\Cloud\Dialogflow\Cx\V3\LanguageInfo $language_info + * Information about the language of the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Always present. The unique identifier of the + * [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] + * that will be returned to the API caller. + * + * Generated from protobuf field string detect_intent_response_id = 1; + * @return string + */ + public function getDetectIntentResponseId() + { + return $this->detect_intent_response_id; + } + + /** + * Always present. The unique identifier of the + * [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] + * that will be returned to the API caller. + * + * Generated from protobuf field string detect_intent_response_id = 1; + * @param string $var + * @return $this + */ + public function setDetectIntentResponseId($var) + { + GPBUtil::checkString($var, True); + $this->detect_intent_response_id = $var; + + return $this; + } + + /** + * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was + * provided as input, this field will contain a copy of the text. + * + * Generated from protobuf field string text = 10; + * @return string + */ + public function getText() + { + return $this->readOneof(10); + } + + public function hasText() + { + return $this->hasOneof(10); + } + + /** + * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was + * provided as input, this field will contain a copy of the text. + * + * Generated from protobuf field string text = 10; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as + * input, this field will contain a copy of the intent identifier. Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string trigger_intent = 11 [(.google.api.resource_reference) = { + * @return string + */ + public function getTriggerIntent() + { + return $this->readOneof(11); + } + + public function hasTriggerIntent() + { + return $this->hasOneof(11); + } + + /** + * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as + * input, this field will contain a copy of the intent identifier. Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string trigger_intent = 11 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTriggerIntent($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * If [natural language speech + * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, + * this field will contain the transcript for the audio. + * + * Generated from protobuf field string transcript = 12; + * @return string + */ + public function getTranscript() + { + return $this->readOneof(12); + } + + public function hasTranscript() + { + return $this->hasOneof(12); + } + + /** + * If [natural language speech + * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, + * this field will contain the transcript for the audio. + * + * Generated from protobuf field string transcript = 12; + * @param string $var + * @return $this + */ + public function setTranscript($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as + * input, this field will contain the name of the event. + * + * Generated from protobuf field string trigger_event = 14; + * @return string + */ + public function getTriggerEvent() + { + return $this->readOneof(14); + } + + public function hasTriggerEvent() + { + return $this->hasOneof(14); + } + + /** + * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as + * input, this field will contain the name of the event. + * + * Generated from protobuf field string trigger_event = 14; + * @param string $var + * @return $this + */ + public function setTriggerEvent($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * If [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input, + * this field will contain the DTMF digits. + * + * Generated from protobuf field string dtmf_digits = 17; + * @return string + */ + public function getDtmfDigits() + { + return $this->readOneof(17); + } + + public function hasDtmfDigits() + { + return $this->hasOneof(17); + } + + /** + * If [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input, + * this field will contain the DTMF digits. + * + * Generated from protobuf field string dtmf_digits = 17; + * @param string $var + * @return $this + */ + public function setDtmfDigits($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * The language code specified in the [original + * request][QueryInput.language_code]. + * + * Generated from protobuf field string language_code = 15; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language code specified in the [original + * request][QueryInput.language_code]. + * + * 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; + } + + /** + * Always present. Information about the fulfillment that triggered this + * webhook call. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; + * @return \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo|null + */ + public function getFulfillmentInfo() + { + return $this->fulfillment_info; + } + + public function hasFulfillmentInfo() + { + return isset($this->fulfillment_info); + } + + public function clearFulfillmentInfo() + { + unset($this->fulfillment_info); + } + + /** + * Always present. Information about the fulfillment that triggered this + * webhook call. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; + * @param \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo $var + * @return $this + */ + public function setFulfillmentInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo::class); + $this->fulfillment_info = $var; + + return $this; + } + + /** + * Information about the last matched intent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo|null + */ + public function getIntentInfo() + { + return $this->intent_info; + } + + public function hasIntentInfo() + { + return isset($this->intent_info); + } + + public function clearIntentInfo() + { + unset($this->intent_info); + } + + /** + * Information about the last matched intent. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo $var + * @return $this + */ + public function setIntentInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo::class); + $this->intent_info = $var; + + return $this; + } + + /** + * Information about page status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; + * @return \Google\Cloud\Dialogflow\Cx\V3\PageInfo|null + */ + public function getPageInfo() + { + return $this->page_info; + } + + public function hasPageInfo() + { + return isset($this->page_info); + } + + public function clearPageInfo() + { + unset($this->page_info); + } + + /** + * Information about page status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; + * @param \Google\Cloud\Dialogflow\Cx\V3\PageInfo $var + * @return $this + */ + public function setPageInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PageInfo::class); + $this->page_info = $var; + + return $this; + } + + /** + * Information about session status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5; + * @return \Google\Cloud\Dialogflow\Cx\V3\SessionInfo|null + */ + public function getSessionInfo() + { + return $this->session_info; + } + + public function hasSessionInfo() + { + return isset($this->session_info); + } + + public function clearSessionInfo() + { + unset($this->session_info); + } + + /** + * Information about session status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5; + * @param \Google\Cloud\Dialogflow\Cx\V3\SessionInfo $var + * @return $this + */ + public function setSessionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SessionInfo::class); + $this->session_info = $var; + + return $this; + } + + /** + * The list of rich message responses to present to the user. Webhook can + * choose to append or replace this list in + * [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response]; + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * The list of rich message responses to present to the user. Webhook can + * choose to append or replace this list in + * [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response]; + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::class); + $this->messages = $arr; + + return $this; + } + + /** + * Custom data set in + * [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload]. + * + * Generated from protobuf field .google.protobuf.Struct payload = 8; + * @return \Google\Protobuf\Struct|null + */ + public function getPayload() + { + return $this->payload; + } + + public function hasPayload() + { + return isset($this->payload); + } + + public function clearPayload() + { + unset($this->payload); + } + + /** + * Custom data set in + * [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload]. + * + * Generated from protobuf field .google.protobuf.Struct payload = 8; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->payload = $var; + + return $this; + } + + /** + * The sentiment analysis result of the current user request. The field is + * filled when sentiment analysis is configured to be enabled for the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * @return \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\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 of the current user request. The field is + * filled when sentiment analysis is configured to be enabled for the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; + * @param \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\SentimentAnalysisResult $var + * @return $this + */ + public function setSentimentAnalysisResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\SentimentAnalysisResult::class); + $this->sentiment_analysis_result = $var; + + return $this; + } + + /** + * Information about the language of the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LanguageInfo language_info = 18; + * @return \Google\Cloud\Dialogflow\Cx\V3\LanguageInfo|null + */ + public function getLanguageInfo() + { + return $this->language_info; + } + + public function hasLanguageInfo() + { + return isset($this->language_info); + } + + public function clearLanguageInfo() + { + unset($this->language_info); + } + + /** + * Information about the language of the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LanguageInfo language_info = 18; + * @param \Google\Cloud\Dialogflow\Cx\V3\LanguageInfo $var + * @return $this + */ + public function setLanguageInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LanguageInfo::class); + $this->language_info = $var; + + return $this; + } + + /** + * @return string + */ + public function getQuery() + { + return $this->whichOneof("query"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/FulfillmentInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/FulfillmentInfo.php new file mode 100644 index 000000000000..9c52c94b594b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/FulfillmentInfo.php @@ -0,0 +1,94 @@ +google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + */ +class FulfillmentInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Always present. + * The value of the + * [Fulfillment.tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag] field + * will be populated in this field by Dialogflow when the associated webhook + * is called. The tag is typically used by the webhook service to identify + * which fulfillment is being called, but it could be used for other + * purposes. + * + * Generated from protobuf field string tag = 1; + */ + protected $tag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tag + * Always present. + * The value of the + * [Fulfillment.tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag] field + * will be populated in this field by Dialogflow when the associated webhook + * is called. The tag is typically used by the webhook service to identify + * which fulfillment is being called, but it could be used for other + * purposes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Always present. + * The value of the + * [Fulfillment.tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag] field + * will be populated in this field by Dialogflow when the associated webhook + * is called. The tag is typically used by the webhook service to identify + * which fulfillment is being called, but it could be used for other + * purposes. + * + * Generated from protobuf field string tag = 1; + * @return string + */ + public function getTag() + { + return $this->tag; + } + + /** + * Always present. + * The value of the + * [Fulfillment.tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag] field + * will be populated in this field by Dialogflow when the associated webhook + * is called. The tag is typically used by the webhook service to identify + * which fulfillment is being called, but it could be used for other + * purposes. + * + * Generated from protobuf field string tag = 1; + * @param string $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkString($var, True); + $this->tag = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FulfillmentInfo::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest_FulfillmentInfo::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo.php new file mode 100644 index 000000000000..f1863407758c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo.php @@ -0,0 +1,204 @@ +google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + */ +class IntentInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Always present. The unique identifier of the last matched + * [intent][google.cloud.dialogflow.cx.v3.Intent]. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string last_matched_intent = 1 [(.google.api.resource_reference) = { + */ + protected $last_matched_intent = ''; + /** + * Always present. The display name of the last matched + * [intent][google.cloud.dialogflow.cx.v3.Intent]. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * Parameters identified as a result of intent matching. This is a map of + * the name of the identified parameter to the value of the parameter + * identified from the user's utterance. All parameters defined in the + * matched intent that are identified will be surfaced here. + * + * Generated from protobuf field map parameters = 2; + */ + private $parameters; + /** + * The confidence of the matched intent. Values range from 0.0 (completely + * uncertain) to 1.0 (completely certain). + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $last_matched_intent + * Always present. The unique identifier of the last matched + * [intent][google.cloud.dialogflow.cx.v3.Intent]. + * Format: + * `projects//locations//agents//intents/`. + * @type string $display_name + * Always present. The display name of the last matched + * [intent][google.cloud.dialogflow.cx.v3.Intent]. + * @type array|\Google\Protobuf\Internal\MapField $parameters + * Parameters identified as a result of intent matching. This is a map of + * the name of the identified parameter to the value of the parameter + * identified from the user's utterance. All parameters defined in the + * matched intent that are identified will be surfaced here. + * @type float $confidence + * The confidence of the matched intent. Values range from 0.0 (completely + * uncertain) to 1.0 (completely certain). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Always present. The unique identifier of the last matched + * [intent][google.cloud.dialogflow.cx.v3.Intent]. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string last_matched_intent = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getLastMatchedIntent() + { + return $this->last_matched_intent; + } + + /** + * Always present. The unique identifier of the last matched + * [intent][google.cloud.dialogflow.cx.v3.Intent]. + * Format: + * `projects//locations//agents//intents/`. + * + * Generated from protobuf field string last_matched_intent = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLastMatchedIntent($var) + { + GPBUtil::checkString($var, True); + $this->last_matched_intent = $var; + + return $this; + } + + /** + * Always present. The display name of the last matched + * [intent][google.cloud.dialogflow.cx.v3.Intent]. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Always present. The display name of the last matched + * [intent][google.cloud.dialogflow.cx.v3.Intent]. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Parameters identified as a result of intent matching. This is a map of + * the name of the identified parameter to the value of the parameter + * identified from the user's utterance. All parameters defined in the + * matched intent that are identified will be surfaced here. + * + * Generated from protobuf field map parameters = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Parameters identified as a result of intent matching. This is a map of + * the name of the identified parameter to the value of the parameter + * identified from the user's utterance. All parameters defined in the + * matched intent that are identified will be surfaced here. + * + * Generated from protobuf field map parameters = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo\IntentParameterValue::class); + $this->parameters = $arr; + + return $this; + } + + /** + * The confidence of the matched intent. Values range 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; + } + + /** + * The confidence of the matched intent. Values range 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IntentInfo::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest_IntentInfo::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo/IntentParameterValue.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo/IntentParameterValue.php new file mode 100644 index 000000000000..e8460cd057b6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo/IntentParameterValue.php @@ -0,0 +1,118 @@ +google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + */ +class IntentParameterValue extends \Google\Protobuf\Internal\Message +{ + /** + * Always present. Original text value extracted from user utterance. + * + * Generated from protobuf field string original_value = 1; + */ + protected $original_value = ''; + /** + * Always present. Structured value for the parameter extracted from user + * utterance. + * + * Generated from protobuf field .google.protobuf.Value resolved_value = 2; + */ + protected $resolved_value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $original_value + * Always present. Original text value extracted from user utterance. + * @type \Google\Protobuf\Value $resolved_value + * Always present. Structured value for the parameter extracted from user + * utterance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * Always present. Original text value extracted from user utterance. + * + * Generated from protobuf field string original_value = 1; + * @return string + */ + public function getOriginalValue() + { + return $this->original_value; + } + + /** + * Always present. Original text value extracted from user utterance. + * + * Generated from protobuf field string original_value = 1; + * @param string $var + * @return $this + */ + public function setOriginalValue($var) + { + GPBUtil::checkString($var, True); + $this->original_value = $var; + + return $this; + } + + /** + * Always present. Structured value for the parameter extracted from user + * utterance. + * + * Generated from protobuf field .google.protobuf.Value resolved_value = 2; + * @return \Google\Protobuf\Value|null + */ + public function getResolvedValue() + { + return $this->resolved_value; + } + + public function hasResolvedValue() + { + return isset($this->resolved_value); + } + + public function clearResolvedValue() + { + unset($this->resolved_value); + } + + /** + * Always present. Structured value for the parameter extracted from user + * utterance. + * + * Generated from protobuf field .google.protobuf.Value resolved_value = 2; + * @param \Google\Protobuf\Value $var + * @return $this + */ + public function setResolvedValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); + $this->resolved_value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IntentParameterValue::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest_IntentInfo_IntentParameterValue::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/SentimentAnalysisResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/SentimentAnalysisResult.php new file mode 100644 index 000000000000..51d43085e82e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/SentimentAnalysisResult.php @@ -0,0 +1,116 @@ +google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + */ +class SentimentAnalysisResult 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\Cx\V3\Webhook::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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SentimentAnalysisResult::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest_SentimentAnalysisResult::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse.php new file mode 100644 index 000000000000..7b8e07cc6404 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse.php @@ -0,0 +1,312 @@ +google.cloud.dialogflow.cx.v3.WebhookResponse + */ +class WebhookResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The fulfillment response to send to the user. This field can be omitted by + * the webhook if it does not intend to send any response to the user. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1; + */ + protected $fulfillment_response = null; + /** + * Information about page status. This field can be omitted by the webhook if + * it does not intend to modify page status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2; + */ + protected $page_info = null; + /** + * Information about session status. This field can be omitted by the webhook + * if it does not intend to modify session status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3; + */ + protected $session_info = null; + /** + * Value to append directly to + * [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads]. + * + * Generated from protobuf field .google.protobuf.Struct payload = 4; + */ + protected $payload = null; + protected $transition; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse\FulfillmentResponse $fulfillment_response + * The fulfillment response to send to the user. This field can be omitted by + * the webhook if it does not intend to send any response to the user. + * @type \Google\Cloud\Dialogflow\Cx\V3\PageInfo $page_info + * Information about page status. This field can be omitted by the webhook if + * it does not intend to modify page status. + * @type \Google\Cloud\Dialogflow\Cx\V3\SessionInfo $session_info + * Information about session status. This field can be omitted by the webhook + * if it does not intend to modify session status. + * @type \Google\Protobuf\Struct $payload + * Value to append directly to + * [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads]. + * @type string $target_page + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * @type string $target_flow + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * The fulfillment response to send to the user. This field can be omitted by + * the webhook if it does not intend to send any response to the user. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1; + * @return \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse\FulfillmentResponse|null + */ + public function getFulfillmentResponse() + { + return $this->fulfillment_response; + } + + public function hasFulfillmentResponse() + { + return isset($this->fulfillment_response); + } + + public function clearFulfillmentResponse() + { + unset($this->fulfillment_response); + } + + /** + * The fulfillment response to send to the user. This field can be omitted by + * the webhook if it does not intend to send any response to the user. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1; + * @param \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse\FulfillmentResponse $var + * @return $this + */ + public function setFulfillmentResponse($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse\FulfillmentResponse::class); + $this->fulfillment_response = $var; + + return $this; + } + + /** + * Information about page status. This field can be omitted by the webhook if + * it does not intend to modify page status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2; + * @return \Google\Cloud\Dialogflow\Cx\V3\PageInfo|null + */ + public function getPageInfo() + { + return $this->page_info; + } + + public function hasPageInfo() + { + return isset($this->page_info); + } + + public function clearPageInfo() + { + unset($this->page_info); + } + + /** + * Information about page status. This field can be omitted by the webhook if + * it does not intend to modify page status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2; + * @param \Google\Cloud\Dialogflow\Cx\V3\PageInfo $var + * @return $this + */ + public function setPageInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PageInfo::class); + $this->page_info = $var; + + return $this; + } + + /** + * Information about session status. This field can be omitted by the webhook + * if it does not intend to modify session status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3; + * @return \Google\Cloud\Dialogflow\Cx\V3\SessionInfo|null + */ + public function getSessionInfo() + { + return $this->session_info; + } + + public function hasSessionInfo() + { + return isset($this->session_info); + } + + public function clearSessionInfo() + { + unset($this->session_info); + } + + /** + * Information about session status. This field can be omitted by the webhook + * if it does not intend to modify session status. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3; + * @param \Google\Cloud\Dialogflow\Cx\V3\SessionInfo $var + * @return $this + */ + public function setSessionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SessionInfo::class); + $this->session_info = $var; + + return $this; + } + + /** + * Value to append directly to + * [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads]. + * + * 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); + } + + /** + * Value to append directly to + * [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads]. + * + * 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; + } + + /** + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string target_page = 5 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetPage() + { + return $this->readOneof(5); + } + + public function hasTargetPage() + { + return $this->hasOneof(5); + } + + /** + * The target page to transition to. + * Format: + * `projects//locations//agents//flows//pages/`. + * + * Generated from protobuf field string target_page = 5 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetPage($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string target_flow = 6 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetFlow() + { + return $this->readOneof(6); + } + + public function hasTargetFlow() + { + return $this->hasOneof(6); + } + + /** + * The target flow to transition to. + * Format: + * `projects//locations//agents//flows/`. + * + * Generated from protobuf field string target_flow = 6 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetFlow($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getTransition() + { + return $this->whichOneof("transition"); + } + +} + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse.php new file mode 100644 index 000000000000..7a7e6c859ded --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse.php @@ -0,0 +1,104 @@ +google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + */ +class FulfillmentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of rich message responses to present to the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; + */ + private $messages; + /** + * Merge behavior for `messages`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2; + */ + protected $merge_behavior = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $messages + * The list of rich message responses to present to the user. + * @type int $merge_behavior + * Merge behavior for `messages`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); + parent::__construct($data); + } + + /** + * The list of rich message responses to present to the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * The list of rich message responses to present to the user. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::class); + $this->messages = $arr; + + return $this; + } + + /** + * Merge behavior for `messages`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2; + * @return int + */ + public function getMergeBehavior() + { + return $this->merge_behavior; + } + + /** + * Merge behavior for `messages`. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2; + * @param int $var + * @return $this + */ + public function setMergeBehavior($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse\FulfillmentResponse\MergeBehavior::class); + $this->merge_behavior = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FulfillmentResponse::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse_FulfillmentResponse::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse/MergeBehavior.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse/MergeBehavior.php new file mode 100644 index 000000000000..42da4fb710c2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse/MergeBehavior.php @@ -0,0 +1,66 @@ +google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior + */ +class MergeBehavior +{ + /** + * Not specified. `APPEND` will be used. + * + * Generated from protobuf enum MERGE_BEHAVIOR_UNSPECIFIED = 0; + */ + const MERGE_BEHAVIOR_UNSPECIFIED = 0; + /** + * `messages` will be appended to the list of messages waiting to be sent + * to the user. + * + * Generated from protobuf enum APPEND = 1; + */ + const APPEND = 1; + /** + * `messages` will replace the list of messages waiting to be sent to the + * user. + * + * Generated from protobuf enum REPLACE = 2; + */ + const REPLACE = 2; + + private static $valueToName = [ + self::MERGE_BEHAVIOR_UNSPECIFIED => 'MERGE_BEHAVIOR_UNSPECIFIED', + self::APPEND => 'APPEND', + self::REPLACE => 'REPLACE', + ]; + + 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(MergeBehavior::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse_FulfillmentResponse_MergeBehavior::class); + diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/create_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/create_agent.php new file mode 100644 index 000000000000..a5719c3d9ab7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/create_agent.php @@ -0,0 +1,99 @@ +/locations/`. Please see + * {@see AgentsClient::locationName()} for help formatting this field. + * @param string $agentDisplayName The human-readable name of the agent, unique within the location. + * @param string $agentDefaultLanguageCode Immutable. The default language of the agent as a language tag. + * See [Language + * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + * for a list of the currently supported language codes. + * This field cannot be set by the + * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] + * method. + * @param string $agentTimeZone The time zone of the agent from the [time zone + * database](https://www.iana.org/time-zones), e.g., America/New_York, + * Europe/Paris. + */ +function create_agent_sample( + string $formattedParent, + string $agentDisplayName, + string $agentDefaultLanguageCode, + string $agentTimeZone +): void { + // Create a client. + $agentsClient = new AgentsClient(); + + // Prepare the request message. + $agent = (new Agent()) + ->setDisplayName($agentDisplayName) + ->setDefaultLanguageCode($agentDefaultLanguageCode) + ->setTimeZone($agentTimeZone); + $request = (new CreateAgentRequest()) + ->setParent($formattedParent) + ->setAgent($agent); + + // Call the API and handle any network failures. + try { + /** @var Agent $response */ + $response = $agentsClient->createAgent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AgentsClient::locationName('[PROJECT]', '[LOCATION]'); + $agentDisplayName = '[DISPLAY_NAME]'; + $agentDefaultLanguageCode = '[DEFAULT_LANGUAGE_CODE]'; + $agentTimeZone = '[TIME_ZONE]'; + + create_agent_sample($formattedParent, $agentDisplayName, $agentDefaultLanguageCode, $agentTimeZone); +} +// [END dialogflow_v3_generated_Agents_CreateAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/delete_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/delete_agent.php new file mode 100644 index 000000000000..87f972c5c240 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/delete_agent.php @@ -0,0 +1,70 @@ +/locations//agents/`. Please see + * {@see AgentsClient::agentName()} for help formatting this field. + */ +function delete_agent_sample(string $formattedName): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Prepare the request message. + $request = (new DeleteAgentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $agentsClient->deleteAgent($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AgentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + delete_agent_sample($formattedName); +} +// [END dialogflow_v3_generated_Agents_DeleteAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/export_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/export_agent.php new file mode 100644 index 000000000000..d46ce177ed87 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/export_agent.php @@ -0,0 +1,93 @@ +/locations//agents/`. Please see + * {@see AgentsClient::agentName()} for help formatting this field. + */ +function export_agent_sample(string $formattedName): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Prepare the request message. + $request = (new ExportAgentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $agentsClient->exportAgent($request); + $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 +{ + $formattedName = AgentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + export_agent_sample($formattedName); +} +// [END dialogflow_v3_generated_Agents_ExportAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent.php new file mode 100644 index 000000000000..9d5ad409aa13 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent.php @@ -0,0 +1,72 @@ +/locations//agents/`. Please see + * {@see AgentsClient::agentName()} for help formatting this field. + */ +function get_agent_sample(string $formattedName): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Prepare the request message. + $request = (new GetAgentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Agent $response */ + $response = $agentsClient->getAgent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AgentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + get_agent_sample($formattedName); +} +// [END dialogflow_v3_generated_Agents_GetAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent_validation_result.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent_validation_result.php new file mode 100644 index 000000000000..78c4bade1b39 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent_validation_result.php @@ -0,0 +1,74 @@ +/locations//agents//validationResult`. Please see + * {@see AgentsClient::agentValidationResultName()} for help formatting this field. + */ +function get_agent_validation_result_sample(string $formattedName): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Prepare the request message. + $request = (new GetAgentValidationResultRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AgentValidationResult $response */ + $response = $agentsClient->getAgentValidationResult($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AgentsClient::agentValidationResultName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + get_agent_validation_result_sample($formattedName); +} +// [END dialogflow_v3_generated_Agents_GetAgentValidationResult_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_generative_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_generative_settings.php new file mode 100644 index 000000000000..ff37e7650127 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_generative_settings.php @@ -0,0 +1,75 @@ +/locations//agents//generativeSettings`. Please see + * {@see AgentsClient::agentGenerativeSettingsName()} for help formatting this field. + * @param string $languageCode Language code of the generative settings. + */ +function get_generative_settings_sample(string $formattedName, string $languageCode): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Prepare the request message. + $request = (new GetGenerativeSettingsRequest()) + ->setName($formattedName) + ->setLanguageCode($languageCode); + + // Call the API and handle any network failures. + try { + /** @var GenerativeSettings $response */ + $response = $agentsClient->getGenerativeSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AgentsClient::agentGenerativeSettingsName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $languageCode = '[LANGUAGE_CODE]'; + + get_generative_settings_sample($formattedName, $languageCode); +} +// [END dialogflow_v3_generated_Agents_GetGenerativeSettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_location.php new file mode 100644 index 000000000000..f1711f0437c7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Agents_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_agents.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_agents.php new file mode 100644 index 000000000000..a4b9d1032d66 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_agents.php @@ -0,0 +1,77 @@ +/locations/`. Please see + * {@see AgentsClient::locationName()} for help formatting this field. + */ +function list_agents_sample(string $formattedParent): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Prepare the request message. + $request = (new ListAgentsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $agentsClient->listAgents($request); + + /** @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::locationName('[PROJECT]', '[LOCATION]'); + + list_agents_sample($formattedParent); +} +// [END dialogflow_v3_generated_Agents_ListAgents_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_locations.php new file mode 100644 index 000000000000..d1e2c9cb7997 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Agents_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/restore_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/restore_agent.php new file mode 100644 index 000000000000..bcb6ac8f7b2e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/restore_agent.php @@ -0,0 +1,97 @@ +/locations//agents/`. Please see + * {@see AgentsClient::agentName()} for help formatting this field. + */ +function restore_agent_sample(string $formattedName): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Prepare the request message. + $request = (new RestoreAgentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $agentsClient->restoreAgent($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AgentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + restore_agent_sample($formattedName); +} +// [END dialogflow_v3_generated_Agents_RestoreAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_agent.php new file mode 100644 index 000000000000..7c323deb68ba --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_agent.php @@ -0,0 +1,93 @@ +setDisplayName($agentDisplayName) + ->setDefaultLanguageCode($agentDefaultLanguageCode) + ->setTimeZone($agentTimeZone); + $request = (new UpdateAgentRequest()) + ->setAgent($agent); + + // Call the API and handle any network failures. + try { + /** @var Agent $response */ + $response = $agentsClient->updateAgent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $agentDisplayName = '[DISPLAY_NAME]'; + $agentDefaultLanguageCode = '[DEFAULT_LANGUAGE_CODE]'; + $agentTimeZone = '[TIME_ZONE]'; + + update_agent_sample($agentDisplayName, $agentDefaultLanguageCode, $agentTimeZone); +} +// [END dialogflow_v3_generated_Agents_UpdateAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_generative_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_generative_settings.php new file mode 100644 index 000000000000..03c04a4efc50 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_generative_settings.php @@ -0,0 +1,59 @@ +setGenerativeSettings($generativeSettings); + + // Call the API and handle any network failures. + try { + /** @var GenerativeSettings $response */ + $response = $agentsClient->updateGenerativeSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Agents_UpdateGenerativeSettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/validate_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/validate_agent.php new file mode 100644 index 000000000000..c6853d24c5f3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/validate_agent.php @@ -0,0 +1,74 @@ +/locations//agents/`. Please see + * {@see AgentsClient::agentName()} for help formatting this field. + */ +function validate_agent_sample(string $formattedName): void +{ + // Create a client. + $agentsClient = new AgentsClient(); + + // Prepare the request message. + $request = (new ValidateAgentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AgentValidationResult $response */ + $response = $agentsClient->validateAgent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AgentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + validate_agent_sample($formattedName); +} +// [END dialogflow_v3_generated_Agents_ValidateAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_changelog.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_changelog.php new file mode 100644 index 000000000000..deb70691311d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_changelog.php @@ -0,0 +1,78 @@ +/locations//agents//changelogs/`. Please see + * {@see ChangelogsClient::changelogName()} for help formatting this field. + */ +function get_changelog_sample(string $formattedName): void +{ + // Create a client. + $changelogsClient = new ChangelogsClient(); + + // Prepare the request message. + $request = (new GetChangelogRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Changelog $response */ + $response = $changelogsClient->getChangelog($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChangelogsClient::changelogName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[CHANGELOG]' + ); + + get_changelog_sample($formattedName); +} +// [END dialogflow_v3_generated_Changelogs_GetChangelog_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_location.php new file mode 100644 index 000000000000..ba9dc294d4fc --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Changelogs_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_changelogs.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_changelogs.php new file mode 100644 index 000000000000..33539c507dab --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_changelogs.php @@ -0,0 +1,77 @@ +/locations//agents/`. Please see + * {@see ChangelogsClient::agentName()} for help formatting this field. + */ +function list_changelogs_sample(string $formattedParent): void +{ + // Create a client. + $changelogsClient = new ChangelogsClient(); + + // Prepare the request message. + $request = (new ListChangelogsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $changelogsClient->listChangelogs($request); + + /** @var Changelog $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 = ChangelogsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + list_changelogs_sample($formattedParent); +} +// [END dialogflow_v3_generated_Changelogs_ListChangelogs_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_locations.php new file mode 100644 index 000000000000..ef4be5edd420 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Changelogs_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_deployment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_deployment.php new file mode 100644 index 000000000000..19f1e206b02d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_deployment.php @@ -0,0 +1,80 @@ +/locations//agents//environments//deployments/`. Please see + * {@see DeploymentsClient::deploymentName()} for help formatting this field. + */ +function get_deployment_sample(string $formattedName): void +{ + // Create a client. + $deploymentsClient = new DeploymentsClient(); + + // Prepare the request message. + $request = (new GetDeploymentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $deploymentsClient->getDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeploymentsClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]', + '[DEPLOYMENT]' + ); + + get_deployment_sample($formattedName); +} +// [END dialogflow_v3_generated_Deployments_GetDeployment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_location.php new file mode 100644 index 000000000000..73722eb84a85 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Deployments_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_deployments.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_deployments.php new file mode 100644 index 000000000000..41805186877e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_deployments.php @@ -0,0 +1,84 @@ +/locations//agents//environments/`. Please see + * {@see DeploymentsClient::environmentName()} for help formatting this field. + */ +function list_deployments_sample(string $formattedParent): void +{ + // Create a client. + $deploymentsClient = new DeploymentsClient(); + + // Prepare the request message. + $request = (new ListDeploymentsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $deploymentsClient->listDeployments($request); + + /** @var Deployment $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 = DeploymentsClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]' + ); + + list_deployments_sample($formattedParent); +} +// [END dialogflow_v3_generated_Deployments_ListDeployments_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_locations.php new file mode 100644 index 000000000000..1730b2bdff62 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Deployments_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/create_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/create_entity_type.php new file mode 100644 index 000000000000..9e9a280d795d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/create_entity_type.php @@ -0,0 +1,89 @@ +/locations//agents/`. Please see + * {@see EntityTypesClient::agentName()} for help formatting this field. + * @param string $entityTypeDisplayName The human-readable name of the entity type, unique within the + * agent. + * @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 the request message. + $entityType = (new EntityType()) + ->setDisplayName($entityTypeDisplayName) + ->setKind($entityTypeKind); + $request = (new CreateEntityTypeRequest()) + ->setParent($formattedParent) + ->setEntityType($entityType); + + // Call the API and handle any network failures. + try { + /** @var EntityType $response */ + $response = $entityTypesClient->createEntityType($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EntityTypesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $entityTypeDisplayName = '[DISPLAY_NAME]'; + $entityTypeKind = Kind::KIND_UNSPECIFIED; + + create_entity_type_sample($formattedParent, $entityTypeDisplayName, $entityTypeKind); +} +// [END dialogflow_v3_generated_EntityTypes_CreateEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/delete_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/delete_entity_type.php new file mode 100644 index 000000000000..a42d63aff203 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/delete_entity_type.php @@ -0,0 +1,80 @@ +/locations//agents//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(); + + // Prepare the request message. + $request = (new DeleteEntityTypeRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $entityTypesClient->deleteEntityType($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EntityTypesClient::entityTypeName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENTITY_TYPE]' + ); + + delete_entity_type_sample($formattedName); +} +// [END dialogflow_v3_generated_EntityTypes_DeleteEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/export_entity_types.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/export_entity_types.php new file mode 100644 index 000000000000..f7252bf3ed3c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/export_entity_types.php @@ -0,0 +1,90 @@ +/locations//agents/`. Please see + * {@see EntityTypesClient::agentName()} for help formatting this field. + * @param string $entityTypesElement The name of the entity types to export. + * Format: + * `projects//locations//agents//entityTypes/`. + */ +function export_entity_types_sample(string $formattedParent, string $entityTypesElement): void +{ + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Prepare the request message. + $entityTypes = [$entityTypesElement,]; + $request = (new ExportEntityTypesRequest()) + ->setParent($formattedParent) + ->setEntityTypes($entityTypes); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $entityTypesClient->exportEntityTypes($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportEntityTypesResponse $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]', '[LOCATION]', '[AGENT]'); + $entityTypesElement = '[ENTITY_TYPES]'; + + export_entity_types_sample($formattedParent, $entityTypesElement); +} +// [END dialogflow_v3_generated_EntityTypes_ExportEntityTypes_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_entity_type.php new file mode 100644 index 000000000000..f7315f7df88c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_entity_type.php @@ -0,0 +1,78 @@ +/locations//agents//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(); + + // Prepare the request message. + $request = (new GetEntityTypeRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var EntityType $response */ + $response = $entityTypesClient->getEntityType($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EntityTypesClient::entityTypeName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENTITY_TYPE]' + ); + + get_entity_type_sample($formattedName); +} +// [END dialogflow_v3_generated_EntityTypes_GetEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_location.php new file mode 100644 index 000000000000..c7aaa710c49a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_EntityTypes_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/import_entity_types.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/import_entity_types.php new file mode 100644 index 000000000000..85fdd193c353 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/import_entity_types.php @@ -0,0 +1,88 @@ +/locations//agents/`. Please see + * {@see EntityTypesClient::agentName()} for help formatting this field. + * @param int $mergeOption Merge option for importing entity types. + */ +function import_entity_types_sample(string $formattedParent, int $mergeOption): void +{ + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Prepare the request message. + $request = (new ImportEntityTypesRequest()) + ->setParent($formattedParent) + ->setMergeOption($mergeOption); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $entityTypesClient->importEntityTypes($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportEntityTypesResponse $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]', '[LOCATION]', '[AGENT]'); + $mergeOption = MergeOption::MERGE_OPTION_UNSPECIFIED; + + import_entity_types_sample($formattedParent, $mergeOption); +} +// [END dialogflow_v3_generated_EntityTypes_ImportEntityTypes_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_entity_types.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_entity_types.php new file mode 100644 index 000000000000..50f94f49582e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_entity_types.php @@ -0,0 +1,77 @@ +/locations//agents/`. Please see + * {@see EntityTypesClient::agentName()} for help formatting this field. + */ +function list_entity_types_sample(string $formattedParent): void +{ + // Create a client. + $entityTypesClient = new EntityTypesClient(); + + // Prepare the request message. + $request = (new ListEntityTypesRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $entityTypesClient->listEntityTypes($request); + + /** @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]', '[LOCATION]', '[AGENT]'); + + list_entity_types_sample($formattedParent); +} +// [END dialogflow_v3_generated_EntityTypes_ListEntityTypes_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_locations.php new file mode 100644 index 000000000000..51f845bf873e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_EntityTypes_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/update_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/update_entity_type.php new file mode 100644 index 000000000000..13ec57175934 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/update_entity_type.php @@ -0,0 +1,81 @@ +setDisplayName($entityTypeDisplayName) + ->setKind($entityTypeKind); + $request = (new UpdateEntityTypeRequest()) + ->setEntityType($entityType); + + // Call the API and handle any network failures. + try { + /** @var EntityType $response */ + $response = $entityTypesClient->updateEntityType($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $entityTypeDisplayName = '[DISPLAY_NAME]'; + $entityTypeKind = Kind::KIND_UNSPECIFIED; + + update_entity_type_sample($entityTypeDisplayName, $entityTypeKind); +} +// [END dialogflow_v3_generated_EntityTypes_UpdateEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/create_environment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/create_environment.php new file mode 100644 index 000000000000..616eeac27bcd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/create_environment.php @@ -0,0 +1,100 @@ +/locations//agents/`. Please see + * {@see EnvironmentsClient::agentName()} for help formatting this field. + * @param string $environmentDisplayName The human-readable name of the environment (unique in an agent). + * Limit of 64 characters. + */ +function create_environment_sample(string $formattedParent, string $environmentDisplayName): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Prepare the request message. + $environment = (new Environment()) + ->setDisplayName($environmentDisplayName); + $request = (new CreateEnvironmentRequest()) + ->setParent($formattedParent) + ->setEnvironment($environment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $environmentsClient->createEnvironment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Environment $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 = EnvironmentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $environmentDisplayName = '[DISPLAY_NAME]'; + + create_environment_sample($formattedParent, $environmentDisplayName); +} +// [END dialogflow_v3_generated_Environments_CreateEnvironment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/delete_environment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/delete_environment.php new file mode 100644 index 000000000000..77309bc5c28b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/delete_environment.php @@ -0,0 +1,77 @@ +/locations//agents//environments/`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + */ +function delete_environment_sample(string $formattedName): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Prepare the request message. + $request = (new DeleteEnvironmentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $environmentsClient->deleteEnvironment($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EnvironmentsClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]' + ); + + delete_environment_sample($formattedName); +} +// [END dialogflow_v3_generated_Environments_DeleteEnvironment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/deploy_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/deploy_flow.php new file mode 100644 index 000000000000..d98f06fc7fee --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/deploy_flow.php @@ -0,0 +1,112 @@ +/locations//agents//environments/`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + * @param string $formattedFlowVersion The flow version to deploy. + * Format: + * `projects//locations//agents//flows//versions/`. Please see + * {@see EnvironmentsClient::versionName()} for help formatting this field. + */ +function deploy_flow_sample(string $formattedEnvironment, string $formattedFlowVersion): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Prepare the request message. + $request = (new DeployFlowRequest()) + ->setEnvironment($formattedEnvironment) + ->setFlowVersion($formattedFlowVersion); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $environmentsClient->deployFlow($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DeployFlowResponse $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 +{ + $formattedEnvironment = EnvironmentsClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]' + ); + $formattedFlowVersion = EnvironmentsClient::versionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]', + '[VERSION]' + ); + + deploy_flow_sample($formattedEnvironment, $formattedFlowVersion); +} +// [END dialogflow_v3_generated_Environments_DeployFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_environment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_environment.php new file mode 100644 index 000000000000..7a81fc6979b5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_environment.php @@ -0,0 +1,79 @@ +/locations//agents//environments/`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + */ +function get_environment_sample(string $formattedName): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Prepare the request message. + $request = (new GetEnvironmentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Environment $response */ + $response = $environmentsClient->getEnvironment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EnvironmentsClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]' + ); + + get_environment_sample($formattedName); +} +// [END dialogflow_v3_generated_Environments_GetEnvironment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_location.php new file mode 100644 index 000000000000..9ea8659b3ac5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Environments_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_continuous_test_results.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_continuous_test_results.php new file mode 100644 index 000000000000..6cd9cb606e3d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_continuous_test_results.php @@ -0,0 +1,83 @@ +/locations//agents//environments/`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + */ +function list_continuous_test_results_sample(string $formattedParent): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Prepare the request message. + $request = (new ListContinuousTestResultsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $environmentsClient->listContinuousTestResults($request); + + /** @var ContinuousTestResult $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]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]' + ); + + list_continuous_test_results_sample($formattedParent); +} +// [END dialogflow_v3_generated_Environments_ListContinuousTestResults_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_environments.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_environments.php new file mode 100644 index 000000000000..2b198ce7d06b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_environments.php @@ -0,0 +1,79 @@ +/locations//agents/`. Please see + * {@see EnvironmentsClient::agentName()} for help formatting this field. + */ +function list_environments_sample(string $formattedParent): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Prepare the request message. + $request = (new ListEnvironmentsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $environmentsClient->listEnvironments($request); + + /** @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]', '[LOCATION]', '[AGENT]'); + + list_environments_sample($formattedParent); +} +// [END dialogflow_v3_generated_Environments_ListEnvironments_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_locations.php new file mode 100644 index 000000000000..979561869d9a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Environments_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/lookup_environment_history.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/lookup_environment_history.php new file mode 100644 index 000000000000..df6a5d60b5c6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/lookup_environment_history.php @@ -0,0 +1,84 @@ +/locations//agents//environments/`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + */ +function lookup_environment_history_sample(string $formattedName): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Prepare the request message. + $request = (new LookupEnvironmentHistoryRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $environmentsClient->lookupEnvironmentHistory($request); + + /** @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 +{ + $formattedName = EnvironmentsClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]' + ); + + lookup_environment_history_sample($formattedName); +} +// [END dialogflow_v3_generated_Environments_LookupEnvironmentHistory_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/run_continuous_test.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/run_continuous_test.php new file mode 100644 index 000000000000..2144257d9ebc --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/run_continuous_test.php @@ -0,0 +1,99 @@ +/locations//agents//environments/`. Please see + * {@see EnvironmentsClient::environmentName()} for help formatting this field. + */ +function run_continuous_test_sample(string $formattedEnvironment): void +{ + // Create a client. + $environmentsClient = new EnvironmentsClient(); + + // Prepare the request message. + $request = (new RunContinuousTestRequest()) + ->setEnvironment($formattedEnvironment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $environmentsClient->runContinuousTest($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RunContinuousTestResponse $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 +{ + $formattedEnvironment = EnvironmentsClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]' + ); + + run_continuous_test_sample($formattedEnvironment); +} +// [END dialogflow_v3_generated_Environments_RunContinuousTest_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/update_environment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/update_environment.php new file mode 100644 index 000000000000..5dda85b697fc --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/update_environment.php @@ -0,0 +1,97 @@ +setDisplayName($environmentDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateEnvironmentRequest()) + ->setEnvironment($environment) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $environmentsClient->updateEnvironment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Environment $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 +{ + $environmentDisplayName = '[DISPLAY_NAME]'; + + update_environment_sample($environmentDisplayName); +} +// [END dialogflow_v3_generated_Environments_UpdateEnvironment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/create_example.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/create_example.php new file mode 100644 index 000000000000..d2d2b6349918 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/create_example.php @@ -0,0 +1,88 @@ +/locations//agents//playbooks/`. Please see + * {@see ExamplesClient::playbookName()} for help formatting this field. + * @param string $exampleDisplayName The display name of the example. + * @param int $exampleConversationState Example's output state. + */ +function create_example_sample( + string $formattedParent, + string $exampleDisplayName, + int $exampleConversationState +): void { + // Create a client. + $examplesClient = new ExamplesClient(); + + // Prepare the request message. + $exampleActions = [new Action()]; + $example = (new Example()) + ->setActions($exampleActions) + ->setDisplayName($exampleDisplayName) + ->setConversationState($exampleConversationState); + $request = (new CreateExampleRequest()) + ->setParent($formattedParent) + ->setExample($example); + + // Call the API and handle any network failures. + try { + /** @var Example $response */ + $response = $examplesClient->createExample($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ExamplesClient::playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $exampleDisplayName = '[DISPLAY_NAME]'; + $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; + + create_example_sample($formattedParent, $exampleDisplayName, $exampleConversationState); +} +// [END dialogflow_v3_generated_Examples_CreateExample_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/delete_example.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/delete_example.php new file mode 100644 index 000000000000..6ecccfd82d22 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/delete_example.php @@ -0,0 +1,77 @@ +/locations//agents//playbooks//examples/`. Please see + * {@see ExamplesClient::exampleName()} for help formatting this field. + */ +function delete_example_sample(string $formattedName): void +{ + // Create a client. + $examplesClient = new ExamplesClient(); + + // Prepare the request message. + $request = (new DeleteExampleRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $examplesClient->deleteExample($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExamplesClient::exampleName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[EXAMPLE]' + ); + + delete_example_sample($formattedName); +} +// [END dialogflow_v3_generated_Examples_DeleteExample_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_example.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_example.php new file mode 100644 index 000000000000..f142433419a5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_example.php @@ -0,0 +1,79 @@ +/locations//agents//playbooks//examples/`. Please see + * {@see ExamplesClient::exampleName()} for help formatting this field. + */ +function get_example_sample(string $formattedName): void +{ + // Create a client. + $examplesClient = new ExamplesClient(); + + // Prepare the request message. + $request = (new GetExampleRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Example $response */ + $response = $examplesClient->getExample($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExamplesClient::exampleName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[EXAMPLE]' + ); + + get_example_sample($formattedName); +} +// [END dialogflow_v3_generated_Examples_GetExample_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_location.php new file mode 100644 index 000000000000..3cab506b8c9d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Examples_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_examples.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_examples.php new file mode 100644 index 000000000000..5ac6a24928fe --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_examples.php @@ -0,0 +1,78 @@ +/locations//agents//playbooks/`. Please see + * {@see ExamplesClient::playbookName()} for help formatting this field. + */ +function list_examples_sample(string $formattedParent): void +{ + // Create a client. + $examplesClient = new ExamplesClient(); + + // Prepare the request message. + $request = (new ListExamplesRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $examplesClient->listExamples($request); + + /** @var Example $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 = ExamplesClient::playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + + list_examples_sample($formattedParent); +} +// [END dialogflow_v3_generated_Examples_ListExamples_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_locations.php new file mode 100644 index 000000000000..b7c50bd25ac5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Examples_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/update_example.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/update_example.php new file mode 100644 index 000000000000..e8c250d6a3c9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/update_example.php @@ -0,0 +1,79 @@ +setActions($exampleActions) + ->setDisplayName($exampleDisplayName) + ->setConversationState($exampleConversationState); + $request = (new UpdateExampleRequest()) + ->setExample($example); + + // Call the API and handle any network failures. + try { + /** @var Example $response */ + $response = $examplesClient->updateExample($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $exampleDisplayName = '[DISPLAY_NAME]'; + $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; + + update_example_sample($exampleDisplayName, $exampleConversationState); +} +// [END dialogflow_v3_generated_Examples_UpdateExample_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/create_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/create_experiment.php new file mode 100644 index 000000000000..2eb7ff14dd0f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/create_experiment.php @@ -0,0 +1,85 @@ +/locations//agents//environments/`. Please see + * {@see ExperimentsClient::environmentName()} for help formatting this field. + * @param string $experimentDisplayName The human-readable name of the experiment (unique in an + * environment). Limit of 64 characters. + */ +function create_experiment_sample(string $formattedParent, string $experimentDisplayName): void +{ + // Create a client. + $experimentsClient = new ExperimentsClient(); + + // Prepare the request message. + $experiment = (new Experiment()) + ->setDisplayName($experimentDisplayName); + $request = (new CreateExperimentRequest()) + ->setParent($formattedParent) + ->setExperiment($experiment); + + // Call the API and handle any network failures. + try { + /** @var Experiment $response */ + $response = $experimentsClient->createExperiment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ExperimentsClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]' + ); + $experimentDisplayName = '[DISPLAY_NAME]'; + + create_experiment_sample($formattedParent, $experimentDisplayName); +} +// [END dialogflow_v3_generated_Experiments_CreateExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/delete_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/delete_experiment.php new file mode 100644 index 000000000000..5be5fa7ac008 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/delete_experiment.php @@ -0,0 +1,78 @@ +/locations//agents//environments//experiments/`. Please see + * {@see ExperimentsClient::experimentName()} for help formatting this field. + */ +function delete_experiment_sample(string $formattedName): void +{ + // Create a client. + $experimentsClient = new ExperimentsClient(); + + // Prepare the request message. + $request = (new DeleteExperimentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $experimentsClient->deleteExperiment($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExperimentsClient::experimentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]', + '[EXPERIMENT]' + ); + + delete_experiment_sample($formattedName); +} +// [END dialogflow_v3_generated_Experiments_DeleteExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_experiment.php new file mode 100644 index 000000000000..0d2927a34abd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_experiment.php @@ -0,0 +1,80 @@ +/locations//agents//environments//experiments/`. Please see + * {@see ExperimentsClient::experimentName()} for help formatting this field. + */ +function get_experiment_sample(string $formattedName): void +{ + // Create a client. + $experimentsClient = new ExperimentsClient(); + + // Prepare the request message. + $request = (new GetExperimentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Experiment $response */ + $response = $experimentsClient->getExperiment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExperimentsClient::experimentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]', + '[EXPERIMENT]' + ); + + get_experiment_sample($formattedName); +} +// [END dialogflow_v3_generated_Experiments_GetExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_location.php new file mode 100644 index 000000000000..87944cddd970 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Experiments_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_experiments.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_experiments.php new file mode 100644 index 000000000000..258a97f31ef5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_experiments.php @@ -0,0 +1,84 @@ +/locations//agents//environments/`. Please see + * {@see ExperimentsClient::environmentName()} for help formatting this field. + */ +function list_experiments_sample(string $formattedParent): void +{ + // Create a client. + $experimentsClient = new ExperimentsClient(); + + // Prepare the request message. + $request = (new ListExperimentsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $experimentsClient->listExperiments($request); + + /** @var Experiment $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 = ExperimentsClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]' + ); + + list_experiments_sample($formattedParent); +} +// [END dialogflow_v3_generated_Experiments_ListExperiments_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_locations.php new file mode 100644 index 000000000000..a858818001da --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Experiments_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/start_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/start_experiment.php new file mode 100644 index 000000000000..ecda4fdb5fc2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/start_experiment.php @@ -0,0 +1,81 @@ +/locations//agents//environments//experiments/`. Please see + * {@see ExperimentsClient::experimentName()} for help formatting this field. + */ +function start_experiment_sample(string $formattedName): void +{ + // Create a client. + $experimentsClient = new ExperimentsClient(); + + // Prepare the request message. + $request = (new StartExperimentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Experiment $response */ + $response = $experimentsClient->startExperiment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExperimentsClient::experimentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]', + '[EXPERIMENT]' + ); + + start_experiment_sample($formattedName); +} +// [END dialogflow_v3_generated_Experiments_StartExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/stop_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/stop_experiment.php new file mode 100644 index 000000000000..61af435b22a8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/stop_experiment.php @@ -0,0 +1,80 @@ +/locations//agents//environments//experiments/`. Please see + * {@see ExperimentsClient::experimentName()} for help formatting this field. + */ +function stop_experiment_sample(string $formattedName): void +{ + // Create a client. + $experimentsClient = new ExperimentsClient(); + + // Prepare the request message. + $request = (new StopExperimentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Experiment $response */ + $response = $experimentsClient->stopExperiment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExperimentsClient::experimentName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[ENVIRONMENT]', + '[EXPERIMENT]' + ); + + stop_experiment_sample($formattedName); +} +// [END dialogflow_v3_generated_Experiments_StopExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/update_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/update_experiment.php new file mode 100644 index 000000000000..b51ee0e62573 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/update_experiment.php @@ -0,0 +1,77 @@ +setDisplayName($experimentDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateExperimentRequest()) + ->setExperiment($experiment) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Experiment $response */ + $response = $experimentsClient->updateExperiment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $experimentDisplayName = '[DISPLAY_NAME]'; + + update_experiment_sample($experimentDisplayName); +} +// [END dialogflow_v3_generated_Experiments_UpdateExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/create_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/create_flow.php new file mode 100644 index 000000000000..cb38305fde0c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/create_flow.php @@ -0,0 +1,81 @@ +/locations//agents/`. Please see + * {@see FlowsClient::agentName()} for help formatting this field. + * @param string $flowDisplayName The human-readable name of the flow. + */ +function create_flow_sample(string $formattedParent, string $flowDisplayName): void +{ + // Create a client. + $flowsClient = new FlowsClient(); + + // Prepare the request message. + $flow = (new Flow()) + ->setDisplayName($flowDisplayName); + $request = (new CreateFlowRequest()) + ->setParent($formattedParent) + ->setFlow($flow); + + // Call the API and handle any network failures. + try { + /** @var Flow $response */ + $response = $flowsClient->createFlow($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FlowsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $flowDisplayName = '[DISPLAY_NAME]'; + + create_flow_sample($formattedParent, $flowDisplayName); +} +// [END dialogflow_v3_generated_Flows_CreateFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/delete_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/delete_flow.php new file mode 100644 index 000000000000..263ab2e067e4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/delete_flow.php @@ -0,0 +1,71 @@ +/locations//agents//flows/`. Please see + * {@see FlowsClient::flowName()} for help formatting this field. + */ +function delete_flow_sample(string $formattedName): void +{ + // Create a client. + $flowsClient = new FlowsClient(); + + // Prepare the request message. + $request = (new DeleteFlowRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $flowsClient->deleteFlow($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FlowsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + + delete_flow_sample($formattedName); +} +// [END dialogflow_v3_generated_Flows_DeleteFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/export_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/export_flow.php new file mode 100644 index 000000000000..dc9d790da79e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/export_flow.php @@ -0,0 +1,97 @@ +/locations//agents//flows/`. Please see + * {@see FlowsClient::flowName()} for help formatting this field. + */ +function export_flow_sample(string $formattedName): void +{ + // Create a client. + $flowsClient = new FlowsClient(); + + // Prepare the request message. + $request = (new ExportFlowRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $flowsClient->exportFlow($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportFlowResponse $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 = FlowsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + + export_flow_sample($formattedName); +} +// [END dialogflow_v3_generated_Flows_ExportFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow.php new file mode 100644 index 000000000000..83f04a23d156 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow.php @@ -0,0 +1,73 @@ +/locations//agents//flows/`. Please see + * {@see FlowsClient::flowName()} for help formatting this field. + */ +function get_flow_sample(string $formattedName): void +{ + // Create a client. + $flowsClient = new FlowsClient(); + + // Prepare the request message. + $request = (new GetFlowRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Flow $response */ + $response = $flowsClient->getFlow($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FlowsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + + get_flow_sample($formattedName); +} +// [END dialogflow_v3_generated_Flows_GetFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow_validation_result.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow_validation_result.php new file mode 100644 index 000000000000..ed938bd9134f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow_validation_result.php @@ -0,0 +1,79 @@ +/locations//agents//flows//validationResult`. Please see + * {@see FlowsClient::flowValidationResultName()} for help formatting this field. + */ +function get_flow_validation_result_sample(string $formattedName): void +{ + // Create a client. + $flowsClient = new FlowsClient(); + + // Prepare the request message. + $request = (new GetFlowValidationResultRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var FlowValidationResult $response */ + $response = $flowsClient->getFlowValidationResult($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FlowsClient::flowValidationResultName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]' + ); + + get_flow_validation_result_sample($formattedName); +} +// [END dialogflow_v3_generated_Flows_GetFlowValidationResult_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_location.php new file mode 100644 index 000000000000..30973a52c786 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Flows_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/import_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/import_flow.php new file mode 100644 index 000000000000..d7e5bcd46f3a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/import_flow.php @@ -0,0 +1,97 @@ +/locations//agents/`. Please see + * {@see FlowsClient::agentName()} for help formatting this field. + */ +function import_flow_sample(string $formattedParent): void +{ + // Create a client. + $flowsClient = new FlowsClient(); + + // Prepare the request message. + $request = (new ImportFlowRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $flowsClient->importFlow($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportFlowResponse $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 = FlowsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + import_flow_sample($formattedParent); +} +// [END dialogflow_v3_generated_Flows_ImportFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_flows.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_flows.php new file mode 100644 index 000000000000..73cfac5312f6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_flows.php @@ -0,0 +1,77 @@ +/locations//agents/`. Please see + * {@see FlowsClient::agentName()} for help formatting this field. + */ +function list_flows_sample(string $formattedParent): void +{ + // Create a client. + $flowsClient = new FlowsClient(); + + // Prepare the request message. + $request = (new ListFlowsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $flowsClient->listFlows($request); + + /** @var Flow $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 = FlowsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + list_flows_sample($formattedParent); +} +// [END dialogflow_v3_generated_Flows_ListFlows_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_locations.php new file mode 100644 index 000000000000..12e680793a4a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Flows_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/train_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/train_flow.php new file mode 100644 index 000000000000..1cc7b4865b5d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/train_flow.php @@ -0,0 +1,96 @@ +/locations//agents//flows/`. Please see + * {@see FlowsClient::flowName()} for help formatting this field. + */ +function train_flow_sample(string $formattedName): void +{ + // Create a client. + $flowsClient = new FlowsClient(); + + // Prepare the request message. + $request = (new TrainFlowRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $flowsClient->trainFlow($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FlowsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + + train_flow_sample($formattedName); +} +// [END dialogflow_v3_generated_Flows_TrainFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/update_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/update_flow.php new file mode 100644 index 000000000000..189213f83483 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/update_flow.php @@ -0,0 +1,76 @@ +setDisplayName($flowDisplayName); + $request = (new UpdateFlowRequest()) + ->setFlow($flow); + + // Call the API and handle any network failures. + try { + /** @var Flow $response */ + $response = $flowsClient->updateFlow($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $flowDisplayName = '[DISPLAY_NAME]'; + + update_flow_sample($flowDisplayName); +} +// [END dialogflow_v3_generated_Flows_UpdateFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/validate_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/validate_flow.php new file mode 100644 index 000000000000..72dfcfc25b03 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/validate_flow.php @@ -0,0 +1,75 @@ +/locations//agents//flows/`. Please see + * {@see FlowsClient::flowName()} for help formatting this field. + */ +function validate_flow_sample(string $formattedName): void +{ + // Create a client. + $flowsClient = new FlowsClient(); + + // Prepare the request message. + $request = (new ValidateFlowRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var FlowValidationResult $response */ + $response = $flowsClient->validateFlow($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FlowsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + + validate_flow_sample($formattedName); +} +// [END dialogflow_v3_generated_Flows_ValidateFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/create_generator.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/create_generator.php new file mode 100644 index 000000000000..5c0d6c2ef96d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/create_generator.php @@ -0,0 +1,89 @@ +/locations//agents/`. Please see + * {@see GeneratorsClient::agentName()} for help formatting this field. + * @param string $generatorDisplayName The human-readable name of the generator, unique within the + * agent. The prompt contains pre-defined parameters such as $conversation, + * $last-user-utterance, etc. populated by Dialogflow. It can also contain + * custom placeholders which will be resolved during fulfillment. + * @param string $generatorPromptTextText Text input which can be used for prompt or banned phrases. + */ +function create_generator_sample( + string $formattedParent, + string $generatorDisplayName, + string $generatorPromptTextText +): void { + // Create a client. + $generatorsClient = new GeneratorsClient(); + + // Prepare the request message. + $generatorPromptText = (new Phrase()) + ->setText($generatorPromptTextText); + $generator = (new Generator()) + ->setDisplayName($generatorDisplayName) + ->setPromptText($generatorPromptText); + $request = (new CreateGeneratorRequest()) + ->setParent($formattedParent) + ->setGenerator($generator); + + // Call the API and handle any network failures. + try { + /** @var Generator $response */ + $response = $generatorsClient->createGenerator($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GeneratorsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $generatorDisplayName = '[DISPLAY_NAME]'; + $generatorPromptTextText = '[TEXT]'; + + create_generator_sample($formattedParent, $generatorDisplayName, $generatorPromptTextText); +} +// [END dialogflow_v3_generated_Generators_CreateGenerator_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/delete_generator.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/delete_generator.php new file mode 100644 index 000000000000..32f9ea673e67 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/delete_generator.php @@ -0,0 +1,76 @@ +/locations//agents//generators/`. Please see + * {@see GeneratorsClient::generatorName()} for help formatting this field. + */ +function delete_generator_sample(string $formattedName): void +{ + // Create a client. + $generatorsClient = new GeneratorsClient(); + + // Prepare the request message. + $request = (new DeleteGeneratorRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $generatorsClient->deleteGenerator($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GeneratorsClient::generatorName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[GENERATOR]' + ); + + delete_generator_sample($formattedName); +} +// [END dialogflow_v3_generated_Generators_DeleteGenerator_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_generator.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_generator.php new file mode 100644 index 000000000000..cc2585e8cb91 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_generator.php @@ -0,0 +1,78 @@ +/locations//agents//generators/`. Please see + * {@see GeneratorsClient::generatorName()} for help formatting this field. + */ +function get_generator_sample(string $formattedName): void +{ + // Create a client. + $generatorsClient = new GeneratorsClient(); + + // Prepare the request message. + $request = (new GetGeneratorRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Generator $response */ + $response = $generatorsClient->getGenerator($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GeneratorsClient::generatorName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[GENERATOR]' + ); + + get_generator_sample($formattedName); +} +// [END dialogflow_v3_generated_Generators_GetGenerator_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_location.php new file mode 100644 index 000000000000..7670c9eca2b4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Generators_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_generators.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_generators.php new file mode 100644 index 000000000000..287d35f8e48b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_generators.php @@ -0,0 +1,77 @@ +/locations//agents/`. Please see + * {@see GeneratorsClient::agentName()} for help formatting this field. + */ +function list_generators_sample(string $formattedParent): void +{ + // Create a client. + $generatorsClient = new GeneratorsClient(); + + // Prepare the request message. + $request = (new ListGeneratorsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $generatorsClient->listGenerators($request); + + /** @var Generator $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 = GeneratorsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + list_generators_sample($formattedParent); +} +// [END dialogflow_v3_generated_Generators_ListGenerators_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_locations.php new file mode 100644 index 000000000000..69b42e4a6c95 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Generators_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/update_generator.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/update_generator.php new file mode 100644 index 000000000000..0ba8aec91d5e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/update_generator.php @@ -0,0 +1,83 @@ +setText($generatorPromptTextText); + $generator = (new Generator()) + ->setDisplayName($generatorDisplayName) + ->setPromptText($generatorPromptText); + $request = (new UpdateGeneratorRequest()) + ->setGenerator($generator); + + // Call the API and handle any network failures. + try { + /** @var Generator $response */ + $response = $generatorsClient->updateGenerator($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $generatorDisplayName = '[DISPLAY_NAME]'; + $generatorPromptTextText = '[TEXT]'; + + update_generator_sample($generatorDisplayName, $generatorPromptTextText); +} +// [END dialogflow_v3_generated_Generators_UpdateGenerator_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/create_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/create_intent.php new file mode 100644 index 000000000000..19c188c3c8d3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/create_intent.php @@ -0,0 +1,81 @@ +/locations//agents/`. Please see + * {@see IntentsClient::agentName()} for help formatting this field. + * @param string $intentDisplayName The human-readable name of the intent, unique within the agent. + */ +function create_intent_sample(string $formattedParent, string $intentDisplayName): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Prepare the request message. + $intent = (new Intent()) + ->setDisplayName($intentDisplayName); + $request = (new CreateIntentRequest()) + ->setParent($formattedParent) + ->setIntent($intent); + + // Call the API and handle any network failures. + try { + /** @var Intent $response */ + $response = $intentsClient->createIntent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = IntentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $intentDisplayName = '[DISPLAY_NAME]'; + + create_intent_sample($formattedParent, $intentDisplayName); +} +// [END dialogflow_v3_generated_Intents_CreateIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/delete_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/delete_intent.php new file mode 100644 index 000000000000..1d5345701cd8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/delete_intent.php @@ -0,0 +1,75 @@ +/locations//agents//intents/`. Please see + * {@see IntentsClient::intentName()} for help formatting this field. + */ +function delete_intent_sample(string $formattedName): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Prepare the request message. + $request = (new DeleteIntentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $intentsClient->deleteIntent($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = IntentsClient::intentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[INTENT]'); + + delete_intent_sample($formattedName); +} +// [END dialogflow_v3_generated_Intents_DeleteIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/export_intents.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/export_intents.php new file mode 100644 index 000000000000..60a983d6690b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/export_intents.php @@ -0,0 +1,99 @@ +/locations//agents/`. Please see + * {@see IntentsClient::agentName()} for help formatting this field. + * @param string $intentsElement The name of the intents to export. + * Format: + * `projects//locations//agents//intents/`. + */ +function export_intents_sample(string $formattedParent, string $intentsElement): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Prepare the request message. + $intents = [$intentsElement,]; + $request = (new ExportIntentsRequest()) + ->setParent($formattedParent) + ->setIntents($intents); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $intentsClient->exportIntents($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportIntentsResponse $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]', '[LOCATION]', '[AGENT]'); + $intentsElement = '[INTENTS]'; + + export_intents_sample($formattedParent, $intentsElement); +} +// [END dialogflow_v3_generated_Intents_ExportIntents_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_intent.php new file mode 100644 index 000000000000..1aa991aabfc9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_intent.php @@ -0,0 +1,73 @@ +/locations//agents//intents/`. Please see + * {@see IntentsClient::intentName()} for help formatting this field. + */ +function get_intent_sample(string $formattedName): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Prepare the request message. + $request = (new GetIntentRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Intent $response */ + $response = $intentsClient->getIntent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = IntentsClient::intentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[INTENT]'); + + get_intent_sample($formattedName); +} +// [END dialogflow_v3_generated_Intents_GetIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_location.php new file mode 100644 index 000000000000..eef330a3cd70 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Intents_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/import_intents.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/import_intents.php new file mode 100644 index 000000000000..2741b8bed542 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/import_intents.php @@ -0,0 +1,93 @@ +/locations//agents/`. Please see + * {@see IntentsClient::agentName()} for help formatting this field. + */ +function import_intents_sample(string $formattedParent): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Prepare the request message. + $request = (new ImportIntentsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $intentsClient->importIntents($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportIntentsResponse $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]', '[LOCATION]', '[AGENT]'); + + import_intents_sample($formattedParent); +} +// [END dialogflow_v3_generated_Intents_ImportIntents_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_intents.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_intents.php new file mode 100644 index 000000000000..38d890c213c5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_intents.php @@ -0,0 +1,77 @@ +/locations//agents/`. Please see + * {@see IntentsClient::agentName()} for help formatting this field. + */ +function list_intents_sample(string $formattedParent): void +{ + // Create a client. + $intentsClient = new IntentsClient(); + + // Prepare the request message. + $request = (new ListIntentsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $intentsClient->listIntents($request); + + /** @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]', '[LOCATION]', '[AGENT]'); + + list_intents_sample($formattedParent); +} +// [END dialogflow_v3_generated_Intents_ListIntents_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_locations.php new file mode 100644 index 000000000000..80403b5b125a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Intents_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/update_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/update_intent.php new file mode 100644 index 000000000000..d854dfbba341 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/update_intent.php @@ -0,0 +1,76 @@ +setDisplayName($intentDisplayName); + $request = (new UpdateIntentRequest()) + ->setIntent($intent); + + // Call the API and handle any network failures. + try { + /** @var Intent $response */ + $response = $intentsClient->updateIntent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $intentDisplayName = '[DISPLAY_NAME]'; + + update_intent_sample($intentDisplayName); +} +// [END dialogflow_v3_generated_Intents_UpdateIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/create_page.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/create_page.php new file mode 100644 index 000000000000..c3c2844aaad0 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/create_page.php @@ -0,0 +1,82 @@ +/locations//agents//flows/`. Please see + * {@see PagesClient::flowName()} for help formatting this field. + * @param string $pageDisplayName The human-readable name of the page, unique within the flow. + */ +function create_page_sample(string $formattedParent, string $pageDisplayName): void +{ + // Create a client. + $pagesClient = new PagesClient(); + + // Prepare the request message. + $page = (new Page()) + ->setDisplayName($pageDisplayName); + $request = (new CreatePageRequest()) + ->setParent($formattedParent) + ->setPage($page); + + // Call the API and handle any network failures. + try { + /** @var Page $response */ + $response = $pagesClient->createPage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PagesClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $pageDisplayName = '[DISPLAY_NAME]'; + + create_page_sample($formattedParent, $pageDisplayName); +} +// [END dialogflow_v3_generated_Pages_CreatePage_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/delete_page.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/delete_page.php new file mode 100644 index 000000000000..1019f7b7689c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/delete_page.php @@ -0,0 +1,75 @@ +/locations//agents//Flows//pages/`. Please see + * {@see PagesClient::pageName()} for help formatting this field. + */ +function delete_page_sample(string $formattedName): void +{ + // Create a client. + $pagesClient = new PagesClient(); + + // Prepare the request message. + $request = (new DeletePageRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $pagesClient->deletePage($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PagesClient::pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); + + delete_page_sample($formattedName); +} +// [END dialogflow_v3_generated_Pages_DeletePage_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_location.php new file mode 100644 index 000000000000..5f048afd84aa --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Pages_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_page.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_page.php new file mode 100644 index 000000000000..dea01097dc18 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_page.php @@ -0,0 +1,73 @@ +/locations//agents//flows//pages/`. Please see + * {@see PagesClient::pageName()} for help formatting this field. + */ +function get_page_sample(string $formattedName): void +{ + // Create a client. + $pagesClient = new PagesClient(); + + // Prepare the request message. + $request = (new GetPageRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Page $response */ + $response = $pagesClient->getPage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PagesClient::pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); + + get_page_sample($formattedName); +} +// [END dialogflow_v3_generated_Pages_GetPage_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_locations.php new file mode 100644 index 000000000000..aca37f26d631 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Pages_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_pages.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_pages.php new file mode 100644 index 000000000000..540cf5b1ac96 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_pages.php @@ -0,0 +1,78 @@ +/locations//agents//flows/`. Please see + * {@see PagesClient::flowName()} for help formatting this field. + */ +function list_pages_sample(string $formattedParent): void +{ + // Create a client. + $pagesClient = new PagesClient(); + + // Prepare the request message. + $request = (new ListPagesRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $pagesClient->listPages($request); + + /** @var Page $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 = PagesClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + + list_pages_sample($formattedParent); +} +// [END dialogflow_v3_generated_Pages_ListPages_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/update_page.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/update_page.php new file mode 100644 index 000000000000..47d7addc03e2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/update_page.php @@ -0,0 +1,76 @@ +setDisplayName($pageDisplayName); + $request = (new UpdatePageRequest()) + ->setPage($page); + + // Call the API and handle any network failures. + try { + /** @var Page $response */ + $response = $pagesClient->updatePage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $pageDisplayName = '[DISPLAY_NAME]'; + + update_page_sample($pageDisplayName); +} +// [END dialogflow_v3_generated_Pages_UpdatePage_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook.php new file mode 100644 index 000000000000..8799bccbe51f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook.php @@ -0,0 +1,85 @@ +/locations//agents/`. Please see + * {@see PlaybooksClient::agentName()} for help formatting this field. + * @param string $playbookDisplayName The human-readable name of the playbook, unique within an agent. + * @param string $playbookGoal High level description of the goal the playbook intend to + * accomplish. A goal should be concise since it's visible to other playbooks + * that may reference this playbook. + */ +function create_playbook_sample( + string $formattedParent, + string $playbookDisplayName, + string $playbookGoal +): void { + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $playbook = (new Playbook()) + ->setDisplayName($playbookDisplayName) + ->setGoal($playbookGoal); + $request = (new CreatePlaybookRequest()) + ->setParent($formattedParent) + ->setPlaybook($playbook); + + // Call the API and handle any network failures. + try { + /** @var Playbook $response */ + $response = $playbooksClient->createPlaybook($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PlaybooksClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $playbookDisplayName = '[DISPLAY_NAME]'; + $playbookGoal = '[GOAL]'; + + create_playbook_sample($formattedParent, $playbookDisplayName, $playbookGoal); +} +// [END dialogflow_v3_generated_Playbooks_CreatePlaybook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook_version.php new file mode 100644 index 000000000000..78d102e1ffb4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook_version.php @@ -0,0 +1,80 @@ +/locations//agents//playbooks/`. Please see + * {@see PlaybooksClient::playbookName()} for help formatting this field. + */ +function create_playbook_version_sample(string $formattedParent): void +{ + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $playbookVersion = new PlaybookVersion(); + $request = (new CreatePlaybookVersionRequest()) + ->setParent($formattedParent) + ->setPlaybookVersion($playbookVersion); + + // Call the API and handle any network failures. + try { + /** @var PlaybookVersion $response */ + $response = $playbooksClient->createPlaybookVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PlaybooksClient::playbookName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]' + ); + + create_playbook_version_sample($formattedParent); +} +// [END dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook.php new file mode 100644 index 000000000000..2ad8a285eefb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook.php @@ -0,0 +1,71 @@ +/locations//agents//playbooks/`. Please see + * {@see PlaybooksClient::playbookName()} for help formatting this field. + */ +function delete_playbook_sample(string $formattedName): void +{ + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $request = (new DeletePlaybookRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $playbooksClient->deletePlaybook($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PlaybooksClient::playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + + delete_playbook_sample($formattedName); +} +// [END dialogflow_v3_generated_Playbooks_DeletePlaybook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook_version.php new file mode 100644 index 000000000000..d8b1184b5426 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook_version.php @@ -0,0 +1,77 @@ +/locations//agents//playbooks//versions/`. Please see + * {@see PlaybooksClient::playbookVersionName()} for help formatting this field. + */ +function delete_playbook_version_sample(string $formattedName): void +{ + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $request = (new DeletePlaybookVersionRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $playbooksClient->deletePlaybookVersion($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PlaybooksClient::playbookVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[VERSION]' + ); + + delete_playbook_version_sample($formattedName); +} +// [END dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/export_playbook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/export_playbook.php new file mode 100644 index 000000000000..638956a77856 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/export_playbook.php @@ -0,0 +1,88 @@ +/locations//agents//playbooks/`. Please see + * {@see PlaybooksClient::playbookName()} for help formatting this field. + */ +function export_playbook_sample(string $formattedName): void +{ + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $request = (new ExportPlaybookRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $playbooksClient->exportPlaybook($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportPlaybookResponse $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 = PlaybooksClient::playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + + export_playbook_sample($formattedName); +} +// [END dialogflow_v3_generated_Playbooks_ExportPlaybook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_location.php new file mode 100644 index 000000000000..dfd820b27039 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Playbooks_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook.php new file mode 100644 index 000000000000..98a4ac716d63 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook.php @@ -0,0 +1,73 @@ +/locations//agents//playbooks/`. Please see + * {@see PlaybooksClient::playbookName()} for help formatting this field. + */ +function get_playbook_sample(string $formattedName): void +{ + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $request = (new GetPlaybookRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Playbook $response */ + $response = $playbooksClient->getPlaybook($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PlaybooksClient::playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + + get_playbook_sample($formattedName); +} +// [END dialogflow_v3_generated_Playbooks_GetPlaybook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook_version.php new file mode 100644 index 000000000000..b695b62feafb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook_version.php @@ -0,0 +1,79 @@ +/locations//agents//playbooks//versions/`. Please see + * {@see PlaybooksClient::playbookVersionName()} for help formatting this field. + */ +function get_playbook_version_sample(string $formattedName): void +{ + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $request = (new GetPlaybookVersionRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PlaybookVersion $response */ + $response = $playbooksClient->getPlaybookVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PlaybooksClient::playbookVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[VERSION]' + ); + + get_playbook_version_sample($formattedName); +} +// [END dialogflow_v3_generated_Playbooks_GetPlaybookVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/import_playbook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/import_playbook.php new file mode 100644 index 000000000000..8e438508acec --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/import_playbook.php @@ -0,0 +1,84 @@ +/locations//agents/`. Please see + * {@see PlaybooksClient::agentName()} for help formatting this field. + */ +function import_playbook_sample(string $formattedParent): void +{ + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $request = (new ImportPlaybookRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $playbooksClient->importPlaybook($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportPlaybookResponse $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 = PlaybooksClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + import_playbook_sample($formattedParent); +} +// [END dialogflow_v3_generated_Playbooks_ImportPlaybook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_locations.php new file mode 100644 index 000000000000..1be70edfefd1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Playbooks_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbook_versions.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbook_versions.php new file mode 100644 index 000000000000..fd661893a50a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbook_versions.php @@ -0,0 +1,83 @@ +/locations//agents//playbooks/`. Please see + * {@see PlaybooksClient::playbookName()} for help formatting this field. + */ +function list_playbook_versions_sample(string $formattedParent): void +{ + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $request = (new ListPlaybookVersionsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $playbooksClient->listPlaybookVersions($request); + + /** @var PlaybookVersion $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 = PlaybooksClient::playbookName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]' + ); + + list_playbook_versions_sample($formattedParent); +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybookVersions_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbooks.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbooks.php new file mode 100644 index 000000000000..c4052fbdd4b0 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbooks.php @@ -0,0 +1,77 @@ +/locations//agents/`. Please see + * {@see PlaybooksClient::agentName()} for help formatting this field. + */ +function list_playbooks_sample(string $formattedParent): void +{ + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $request = (new ListPlaybooksRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $playbooksClient->listPlaybooks($request); + + /** @var Playbook $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 = PlaybooksClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + list_playbooks_sample($formattedParent); +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybooks_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/restore_playbook_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/restore_playbook_version.php new file mode 100644 index 000000000000..76464933bf8e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/restore_playbook_version.php @@ -0,0 +1,80 @@ +/locations//agents//playbooks//versions/`. Please see + * {@see PlaybooksClient::playbookVersionName()} for help formatting this field. + */ +function restore_playbook_version_sample(string $formattedName): void +{ + // Create a client. + $playbooksClient = new PlaybooksClient(); + + // Prepare the request message. + $request = (new RestorePlaybookVersionRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RestorePlaybookVersionResponse $response */ + $response = $playbooksClient->restorePlaybookVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PlaybooksClient::playbookVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[VERSION]' + ); + + restore_playbook_version_sample($formattedName); +} +// [END dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/update_playbook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/update_playbook.php new file mode 100644 index 000000000000..d404fb8608af --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/update_playbook.php @@ -0,0 +1,77 @@ +setDisplayName($playbookDisplayName) + ->setGoal($playbookGoal); + $request = (new UpdatePlaybookRequest()) + ->setPlaybook($playbook); + + // Call the API and handle any network failures. + try { + /** @var Playbook $response */ + $response = $playbooksClient->updatePlaybook($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $playbookDisplayName = '[DISPLAY_NAME]'; + $playbookGoal = '[GOAL]'; + + update_playbook_sample($playbookDisplayName, $playbookGoal); +} +// [END dialogflow_v3_generated_Playbooks_UpdatePlaybook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/create_security_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/create_security_settings.php new file mode 100644 index 000000000000..ae0a1d85db07 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/create_security_settings.php @@ -0,0 +1,81 @@ +/locations/`. Please see + * {@see SecuritySettingsServiceClient::locationName()} for help formatting this field. + * @param string $securitySettingsDisplayName The human-readable name of the security settings, unique within + * the location. + */ +function create_security_settings_sample( + string $formattedParent, + string $securitySettingsDisplayName +): void { + // Create a client. + $securitySettingsServiceClient = new SecuritySettingsServiceClient(); + + // Prepare the request message. + $securitySettings = (new SecuritySettings()) + ->setDisplayName($securitySettingsDisplayName); + $request = (new CreateSecuritySettingsRequest()) + ->setParent($formattedParent) + ->setSecuritySettings($securitySettings); + + // Call the API and handle any network failures. + try { + /** @var SecuritySettings $response */ + $response = $securitySettingsServiceClient->createSecuritySettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecuritySettingsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $securitySettingsDisplayName = '[DISPLAY_NAME]'; + + create_security_settings_sample($formattedParent, $securitySettingsDisplayName); +} +// [END dialogflow_v3_generated_SecuritySettingsService_CreateSecuritySettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/delete_security_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/delete_security_settings.php new file mode 100644 index 000000000000..2c8af1a9da06 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/delete_security_settings.php @@ -0,0 +1,77 @@ +/locations//securitySettings/`. Please see + * {@see SecuritySettingsServiceClient::securitySettingsName()} for help formatting this field. + */ +function delete_security_settings_sample(string $formattedName): void +{ + // Create a client. + $securitySettingsServiceClient = new SecuritySettingsServiceClient(); + + // Prepare the request message. + $request = (new DeleteSecuritySettingsRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $securitySettingsServiceClient->deleteSecuritySettings($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecuritySettingsServiceClient::securitySettingsName( + '[PROJECT]', + '[LOCATION]', + '[SECURITY_SETTINGS]' + ); + + delete_security_settings_sample($formattedName); +} +// [END dialogflow_v3_generated_SecuritySettingsService_DeleteSecuritySettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_location.php new file mode 100644 index 000000000000..5abaeb210a8c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_SecuritySettingsService_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_security_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_security_settings.php new file mode 100644 index 000000000000..891ad5aa88f9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_security_settings.php @@ -0,0 +1,79 @@ +/locations//securitySettings/`. Please see + * {@see SecuritySettingsServiceClient::securitySettingsName()} for help formatting this field. + */ +function get_security_settings_sample(string $formattedName): void +{ + // Create a client. + $securitySettingsServiceClient = new SecuritySettingsServiceClient(); + + // Prepare the request message. + $request = (new GetSecuritySettingsRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SecuritySettings $response */ + $response = $securitySettingsServiceClient->getSecuritySettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecuritySettingsServiceClient::securitySettingsName( + '[PROJECT]', + '[LOCATION]', + '[SECURITY_SETTINGS]' + ); + + get_security_settings_sample($formattedName); +} +// [END dialogflow_v3_generated_SecuritySettingsService_GetSecuritySettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_locations.php new file mode 100644 index 000000000000..49baa373b75c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_SecuritySettingsService_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_security_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_security_settings.php new file mode 100644 index 000000000000..8aa89b032a3f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_security_settings.php @@ -0,0 +1,77 @@ +/locations/`. Please see + * {@see SecuritySettingsServiceClient::locationName()} for help formatting this field. + */ +function list_security_settings_sample(string $formattedParent): void +{ + // Create a client. + $securitySettingsServiceClient = new SecuritySettingsServiceClient(); + + // Prepare the request message. + $request = (new ListSecuritySettingsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $securitySettingsServiceClient->listSecuritySettings($request); + + /** @var SecuritySettings $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 = SecuritySettingsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_security_settings_sample($formattedParent); +} +// [END dialogflow_v3_generated_SecuritySettingsService_ListSecuritySettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/update_security_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/update_security_settings.php new file mode 100644 index 000000000000..dbf1e2303656 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/update_security_settings.php @@ -0,0 +1,77 @@ +setDisplayName($securitySettingsDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateSecuritySettingsRequest()) + ->setSecuritySettings($securitySettings) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var SecuritySettings $response */ + $response = $securitySettingsServiceClient->updateSecuritySettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $securitySettingsDisplayName = '[DISPLAY_NAME]'; + + update_security_settings_sample($securitySettingsDisplayName); +} +// [END dialogflow_v3_generated_SecuritySettingsService_UpdateSecuritySettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/create_session_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/create_session_entity_type.php new file mode 100644 index 000000000000..2dff06924af5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/create_session_entity_type.php @@ -0,0 +1,137 @@ +/locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. Please see + * {@see SessionEntityTypesClient::sessionName()} for help formatting this field. + * @param string $sessionEntityTypeName The unique identifier of the session entity type. + * Format: + * `projects//locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * @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 canonical 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 the request message. + $sessionEntityTypeEntitiesSynonyms = [$sessionEntityTypeEntitiesSynonymsElement,]; + $entity = (new Entity()) + ->setValue($sessionEntityTypeEntitiesValue) + ->setSynonyms($sessionEntityTypeEntitiesSynonyms); + $sessionEntityTypeEntities = [$entity,]; + $sessionEntityType = (new SessionEntityType()) + ->setName($sessionEntityTypeName) + ->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode) + ->setEntities($sessionEntityTypeEntities); + $request = (new CreateSessionEntityTypeRequest()) + ->setParent($formattedParent) + ->setSessionEntityType($sessionEntityType); + + // Call the API and handle any network failures. + try { + /** @var SessionEntityType $response */ + $response = $sessionEntityTypesClient->createSessionEntityType($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SessionEntityTypesClient::sessionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[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_v3_generated_SessionEntityTypes_CreateSessionEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/delete_session_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/delete_session_entity_type.php new file mode 100644 index 000000000000..43921d6abe63 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/delete_session_entity_type.php @@ -0,0 +1,81 @@ +/locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, + * we assume default 'draft' environment. 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(); + + // Prepare the request message. + $request = (new DeleteSessionEntityTypeRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $sessionEntityTypesClient->deleteSessionEntityType($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SessionEntityTypesClient::sessionEntityTypeName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[SESSION]', + '[ENTITY_TYPE]' + ); + + delete_session_entity_type_sample($formattedName); +} +// [END dialogflow_v3_generated_SessionEntityTypes_DeleteSessionEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_location.php new file mode 100644 index 000000000000..bdbf48bbfc64 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_SessionEntityTypes_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_session_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_session_entity_type.php new file mode 100644 index 000000000000..87d74a006482 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_session_entity_type.php @@ -0,0 +1,83 @@ +/locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. 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(); + + // Prepare the request message. + $request = (new GetSessionEntityTypeRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SessionEntityType $response */ + $response = $sessionEntityTypesClient->getSessionEntityType($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SessionEntityTypesClient::sessionEntityTypeName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[SESSION]', + '[ENTITY_TYPE]' + ); + + get_session_entity_type_sample($formattedName); +} +// [END dialogflow_v3_generated_SessionEntityTypes_GetSessionEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_locations.php new file mode 100644 index 000000000000..015952eb0041 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_SessionEntityTypes_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_session_entity_types.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_session_entity_types.php new file mode 100644 index 000000000000..10263350372d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_session_entity_types.php @@ -0,0 +1,87 @@ +/locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. 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(); + + // Prepare the request message. + $request = (new ListSessionEntityTypesRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $sessionEntityTypesClient->listSessionEntityTypes($request); + + /** @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]', + '[LOCATION]', + '[AGENT]', + '[SESSION]' + ); + + list_session_entity_types_sample($formattedParent); +} +// [END dialogflow_v3_generated_SessionEntityTypes_ListSessionEntityTypes_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/update_session_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/update_session_entity_type.php new file mode 100644 index 000000000000..8a1e5fc67ab2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/update_session_entity_type.php @@ -0,0 +1,120 @@ +/locations//agents//sessions//entityTypes/` + * or + * `projects//locations//agents//environments//sessions//entityTypes/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * @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 canonical 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 the request message. + $sessionEntityTypeEntitiesSynonyms = [$sessionEntityTypeEntitiesSynonymsElement,]; + $entity = (new Entity()) + ->setValue($sessionEntityTypeEntitiesValue) + ->setSynonyms($sessionEntityTypeEntitiesSynonyms); + $sessionEntityTypeEntities = [$entity,]; + $sessionEntityType = (new SessionEntityType()) + ->setName($sessionEntityTypeName) + ->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode) + ->setEntities($sessionEntityTypeEntities); + $request = (new UpdateSessionEntityTypeRequest()) + ->setSessionEntityType($sessionEntityType); + + // Call the API and handle any network failures. + try { + /** @var SessionEntityType $response */ + $response = $sessionEntityTypesClient->updateSessionEntityType($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $sessionEntityTypeName = '[NAME]'; + $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; + $sessionEntityTypeEntitiesValue = '[VALUE]'; + $sessionEntityTypeEntitiesSynonymsElement = '[SYNONYMS]'; + + update_session_entity_type_sample( + $sessionEntityTypeName, + $sessionEntityTypeEntityOverrideMode, + $sessionEntityTypeEntitiesValue, + $sessionEntityTypeEntitiesSynonymsElement + ); +} +// [END dialogflow_v3_generated_SessionEntityTypes_UpdateSessionEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/detect_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/detect_intent.php new file mode 100644 index 000000000000..864a08774522 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/detect_intent.php @@ -0,0 +1,103 @@ +/locations//agents//sessions/` or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). Please see + * {@see SessionsClient::sessionName()} for help formatting this field. + * @param string $queryInputLanguageCode The language of the input. See [Language + * Support](https://cloud.google.com/dialogflow/cx/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. + */ +function detect_intent_sample(string $formattedSession, string $queryInputLanguageCode): void +{ + // Create a client. + $sessionsClient = new SessionsClient(); + + // Prepare the request message. + $queryInput = (new QueryInput()) + ->setLanguageCode($queryInputLanguageCode); + $request = (new DetectIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + + // Call the API and handle any network failures. + try { + /** @var DetectIntentResponse $response */ + $response = $sessionsClient->detectIntent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedSession = SessionsClient::sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $queryInputLanguageCode = '[LANGUAGE_CODE]'; + + detect_intent_sample($formattedSession, $queryInputLanguageCode); +} +// [END dialogflow_v3_generated_Sessions_DetectIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/fulfill_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/fulfill_intent.php new file mode 100644 index 000000000000..bbeeec263b85 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/fulfill_intent.php @@ -0,0 +1,63 @@ +fulfillIntent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Sessions_FulfillIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/get_location.php new file mode 100644 index 000000000000..9b2d2236e474 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Sessions_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/list_locations.php new file mode 100644 index 000000000000..73d0e88f3ecc --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Sessions_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/match_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/match_intent.php new file mode 100644 index 000000000000..5f121baf95e6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/match_intent.php @@ -0,0 +1,93 @@ +/locations//agents//sessions/` + * or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). Please see + * {@see SessionsClient::sessionName()} for help formatting this field. + * @param string $queryInputLanguageCode The language of the input. See [Language + * Support](https://cloud.google.com/dialogflow/cx/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. + */ +function match_intent_sample(string $formattedSession, string $queryInputLanguageCode): void +{ + // Create a client. + $sessionsClient = new SessionsClient(); + + // Prepare the request message. + $queryInput = (new QueryInput()) + ->setLanguageCode($queryInputLanguageCode); + $request = (new MatchIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + + // Call the API and handle any network failures. + try { + /** @var MatchIntentResponse $response */ + $response = $sessionsClient->matchIntent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedSession = SessionsClient::sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $queryInputLanguageCode = '[LANGUAGE_CODE]'; + + match_intent_sample($formattedSession, $queryInputLanguageCode); +} +// [END dialogflow_v3_generated_Sessions_MatchIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/server_streaming_detect_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/server_streaming_detect_intent.php new file mode 100644 index 000000000000..2638fadc2597 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/server_streaming_detect_intent.php @@ -0,0 +1,107 @@ +/locations//agents//sessions/` or + * `projects//locations//agents//environments//sessions/`. + * If `Environment ID` is not specified, we assume default 'draft' + * environment. + * It's up to the API caller to choose an appropriate `Session ID`. It can be + * a random number or some type of session identifiers (preferably hashed). + * The length of the `Session ID` must not exceed 36 characters. + * + * For more information, see the [sessions + * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). Please see + * {@see SessionsClient::sessionName()} for help formatting this field. + * @param string $queryInputLanguageCode The language of the input. See [Language + * Support](https://cloud.google.com/dialogflow/cx/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. + */ +function server_streaming_detect_intent_sample( + string $formattedSession, + string $queryInputLanguageCode +): void { + // Create a client. + $sessionsClient = new SessionsClient(); + + // Prepare the request message. + $queryInput = (new QueryInput()) + ->setLanguageCode($queryInputLanguageCode); + $request = (new DetectIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $sessionsClient->serverStreamingDetectIntent($request); + + /** @var DetectIntentResponse $element */ + foreach ($stream->readAll() 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]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $queryInputLanguageCode = '[LANGUAGE_CODE]'; + + server_streaming_detect_intent_sample($formattedSession, $queryInputLanguageCode); +} +// [END dialogflow_v3_generated_Sessions_ServerStreamingDetectIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/streaming_detect_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/streaming_detect_intent.php new file mode 100644 index 000000000000..507229b31143 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/streaming_detect_intent.php @@ -0,0 +1,88 @@ +setLanguageCode($queryInputLanguageCode); + $request = (new StreamingDetectIntentRequest()) + ->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 +{ + $queryInputLanguageCode = '[LANGUAGE_CODE]'; + + streaming_detect_intent_sample($queryInputLanguageCode); +} +// [END dialogflow_v3_generated_Sessions_StreamingDetectIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/submit_answer_feedback.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/submit_answer_feedback.php new file mode 100644 index 000000000000..0be84ae032ea --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/submit_answer_feedback.php @@ -0,0 +1,78 @@ +setSession($formattedSession) + ->setResponseId($responseId) + ->setAnswerFeedback($answerFeedback); + + // Call the API and handle any network failures. + try { + /** @var AnswerFeedback $response */ + $response = $sessionsClient->submitAnswerFeedback($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedSession = SessionsClient::sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $responseId = '[RESPONSE_ID]'; + + submit_answer_feedback_sample($formattedSession, $responseId); +} +// [END dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_delete_test_cases.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_delete_test_cases.php new file mode 100644 index 000000000000..c6d23ce2b95c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_delete_test_cases.php @@ -0,0 +1,83 @@ +/locations//agents/`. Please see + * {@see TestCasesClient::agentName()} for help formatting this field. + * @param string $formattedNamesElement Format of test case names: + * `projects//locations//agents//testCases/`. Please see + * {@see TestCasesClient::testCaseName()} for help formatting this field. + */ +function batch_delete_test_cases_sample( + string $formattedParent, + string $formattedNamesElement +): void { + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $formattedNames = [$formattedNamesElement,]; + $request = (new BatchDeleteTestCasesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + $testCasesClient->batchDeleteTestCases($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $formattedNamesElement = TestCasesClient::testCaseName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[TEST_CASE]' + ); + + batch_delete_test_cases_sample($formattedParent, $formattedNamesElement); +} +// [END dialogflow_v3_generated_TestCases_BatchDeleteTestCases_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_run_test_cases.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_run_test_cases.php new file mode 100644 index 000000000000..a1da36def90c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_run_test_cases.php @@ -0,0 +1,106 @@ +/locations//agents/`. Please see + * {@see TestCasesClient::agentName()} for help formatting this field. + * @param string $formattedTestCasesElement Format: + * `projects//locations//agents//testCases/`. Please see + * {@see TestCasesClient::testCaseName()} for help formatting this field. + */ +function batch_run_test_cases_sample( + string $formattedParent, + string $formattedTestCasesElement +): void { + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $formattedTestCases = [$formattedTestCasesElement,]; + $request = (new BatchRunTestCasesRequest()) + ->setParent($formattedParent) + ->setTestCases($formattedTestCases); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $testCasesClient->batchRunTestCases($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchRunTestCasesResponse $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 = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $formattedTestCasesElement = TestCasesClient::testCaseName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[TEST_CASE]' + ); + + batch_run_test_cases_sample($formattedParent, $formattedTestCasesElement); +} +// [END dialogflow_v3_generated_TestCases_BatchRunTestCases_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/calculate_coverage.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/calculate_coverage.php new file mode 100644 index 000000000000..3f0580d42624 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/calculate_coverage.php @@ -0,0 +1,76 @@ +/locations//agents/`. Please see + * {@see TestCasesClient::agentName()} for help formatting this field. + * @param int $type The type of coverage requested. + */ +function calculate_coverage_sample(string $formattedAgent, int $type): void +{ + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $request = (new CalculateCoverageRequest()) + ->setAgent($formattedAgent) + ->setType($type); + + // Call the API and handle any network failures. + try { + /** @var CalculateCoverageResponse $response */ + $response = $testCasesClient->calculateCoverage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedAgent = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $type = CoverageType::COVERAGE_TYPE_UNSPECIFIED; + + calculate_coverage_sample($formattedAgent, $type); +} +// [END dialogflow_v3_generated_TestCases_CalculateCoverage_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/create_test_case.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/create_test_case.php new file mode 100644 index 000000000000..4492c868b23f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/create_test_case.php @@ -0,0 +1,78 @@ +/locations//agents/`. Please see + * {@see TestCasesClient::agentName()} for help formatting this field. + * @param string $testCaseDisplayName The human-readable name of the test case, unique within the + * agent. Limit of 200 characters. + */ +function create_test_case_sample(string $formattedParent, string $testCaseDisplayName): void +{ + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $testCase = (new TestCase()) + ->setDisplayName($testCaseDisplayName); + $request = (new CreateTestCaseRequest()) + ->setParent($formattedParent) + ->setTestCase($testCase); + + // Call the API and handle any network failures. + try { + /** @var TestCase $response */ + $response = $testCasesClient->createTestCase($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $testCaseDisplayName = '[DISPLAY_NAME]'; + + create_test_case_sample($formattedParent, $testCaseDisplayName); +} +// [END dialogflow_v3_generated_TestCases_CreateTestCase_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/export_test_cases.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/export_test_cases.php new file mode 100644 index 000000000000..dbfdeff71b6f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/export_test_cases.php @@ -0,0 +1,94 @@ +/locations//agents/`. Please see + * {@see TestCasesClient::agentName()} for help formatting this field. + */ +function export_test_cases_sample(string $formattedParent): void +{ + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $request = (new ExportTestCasesRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $testCasesClient->exportTestCases($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportTestCasesResponse $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 = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + export_test_cases_sample($formattedParent); +} +// [END dialogflow_v3_generated_TestCases_ExportTestCases_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_location.php new file mode 100644 index 000000000000..6de856cb0e2d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_TestCases_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case.php new file mode 100644 index 000000000000..f409772d7eee --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case.php @@ -0,0 +1,73 @@ +/locations//agents//testCases/`. Please see + * {@see TestCasesClient::testCaseName()} for help formatting this field. + */ +function get_test_case_sample(string $formattedName): void +{ + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $request = (new GetTestCaseRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TestCase $response */ + $response = $testCasesClient->getTestCase($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TestCasesClient::testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); + + get_test_case_sample($formattedName); +} +// [END dialogflow_v3_generated_TestCases_GetTestCase_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case_result.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case_result.php new file mode 100644 index 000000000000..7e4d070dee44 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case_result.php @@ -0,0 +1,79 @@ +/locations//agents//testCases//results/`. Please see + * {@see TestCasesClient::testCaseResultName()} for help formatting this field. + */ +function get_test_case_result_sample(string $formattedName): void +{ + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $request = (new GetTestCaseResultRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TestCaseResult $response */ + $response = $testCasesClient->getTestCaseResult($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TestCasesClient::testCaseResultName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[TEST_CASE]', + '[RESULT]' + ); + + get_test_case_result_sample($formattedName); +} +// [END dialogflow_v3_generated_TestCases_GetTestCaseResult_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/import_test_cases.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/import_test_cases.php new file mode 100644 index 000000000000..9182939b0756 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/import_test_cases.php @@ -0,0 +1,95 @@ +/locations//agents/`. Please see + * {@see TestCasesClient::agentName()} for help formatting this field. + */ +function import_test_cases_sample(string $formattedParent): void +{ + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $request = (new ImportTestCasesRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $testCasesClient->importTestCases($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportTestCasesResponse $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 = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + import_test_cases_sample($formattedParent); +} +// [END dialogflow_v3_generated_TestCases_ImportTestCases_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_locations.php new file mode 100644 index 000000000000..0e281a5d15bd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_TestCases_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_case_results.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_case_results.php new file mode 100644 index 000000000000..2fa9fa3c3b94 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_case_results.php @@ -0,0 +1,86 @@ +/locations//agents//testCases/`. + * Specify a `-` as a wildcard for TestCase ID to + * list results across multiple test cases. Please see + * {@see TestCasesClient::testCaseName()} for help formatting this field. + */ +function list_test_case_results_sample(string $formattedParent): void +{ + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $request = (new ListTestCaseResultsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $testCasesClient->listTestCaseResults($request); + + /** @var TestCaseResult $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 = TestCasesClient::testCaseName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[TEST_CASE]' + ); + + list_test_case_results_sample($formattedParent); +} +// [END dialogflow_v3_generated_TestCases_ListTestCaseResults_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_cases.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_cases.php new file mode 100644 index 000000000000..3d8702fdf698 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_cases.php @@ -0,0 +1,77 @@ +/locations//agents/`. Please see + * {@see TestCasesClient::agentName()} for help formatting this field. + */ +function list_test_cases_sample(string $formattedParent): void +{ + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $request = (new ListTestCasesRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $testCasesClient->listTestCases($request); + + /** @var TestCase $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 = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + list_test_cases_sample($formattedParent); +} +// [END dialogflow_v3_generated_TestCases_ListTestCases_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/run_test_case.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/run_test_case.php new file mode 100644 index 000000000000..6408e0c300c6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/run_test_case.php @@ -0,0 +1,93 @@ +/locations//agents//testCases/`. Please see + * {@see TestCasesClient::testCaseName()} for help formatting this field. + */ +function run_test_case_sample(string $formattedName): void +{ + // Create a client. + $testCasesClient = new TestCasesClient(); + + // Prepare the request message. + $request = (new RunTestCaseRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $testCasesClient->runTestCase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RunTestCaseResponse $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 = TestCasesClient::testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); + + run_test_case_sample($formattedName); +} +// [END dialogflow_v3_generated_TestCases_RunTestCase_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/update_test_case.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/update_test_case.php new file mode 100644 index 000000000000..b1f2ca91d334 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/update_test_case.php @@ -0,0 +1,76 @@ +setDisplayName($testCaseDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateTestCaseRequest()) + ->setTestCase($testCase) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var TestCase $response */ + $response = $testCasesClient->updateTestCase($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $testCaseDisplayName = '[DISPLAY_NAME]'; + + update_test_case_sample($testCaseDisplayName); +} +// [END dialogflow_v3_generated_TestCases_UpdateTestCase_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool.php new file mode 100644 index 000000000000..e680b6661d19 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool.php @@ -0,0 +1,84 @@ +/locations//agents/`. Please see + * {@see ToolsClient::agentName()} for help formatting this field. + * @param string $toolDisplayName The human-readable name of the Tool, unique within an agent. + * @param string $toolDescription High level description of the Tool and its usage. + */ +function create_tool_sample( + string $formattedParent, + string $toolDisplayName, + string $toolDescription +): void { + // Create a client. + $toolsClient = new ToolsClient(); + + // Prepare the request message. + $tool = (new Tool()) + ->setDisplayName($toolDisplayName) + ->setDescription($toolDescription); + $request = (new CreateToolRequest()) + ->setParent($formattedParent) + ->setTool($tool); + + // Call the API and handle any network failures. + try { + /** @var Tool $response */ + $response = $toolsClient->createTool($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ToolsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $toolDisplayName = '[DISPLAY_NAME]'; + $toolDescription = '[DESCRIPTION]'; + + create_tool_sample($formattedParent, $toolDisplayName, $toolDescription); +} +// [END dialogflow_v3_generated_Tools_CreateTool_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool_version.php new file mode 100644 index 000000000000..d7ead7c57bee --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool_version.php @@ -0,0 +1,97 @@ +/locations//agents//tools/`. Please see + * {@see ToolsClient::toolName()} for help formatting this field. + * @param string $toolVersionDisplayName The display name of the tool version. + * @param string $toolVersionToolDisplayName The human-readable name of the Tool, unique within an agent. + * @param string $toolVersionToolDescription High level description of the Tool and its usage. + */ +function create_tool_version_sample( + string $formattedParent, + string $toolVersionDisplayName, + string $toolVersionToolDisplayName, + string $toolVersionToolDescription +): void { + // Create a client. + $toolsClient = new ToolsClient(); + + // Prepare the request message. + $toolVersionTool = (new Tool()) + ->setDisplayName($toolVersionToolDisplayName) + ->setDescription($toolVersionToolDescription); + $toolVersion = (new ToolVersion()) + ->setDisplayName($toolVersionDisplayName) + ->setTool($toolVersionTool); + $request = (new CreateToolVersionRequest()) + ->setParent($formattedParent) + ->setToolVersion($toolVersion); + + // Call the API and handle any network failures. + try { + /** @var ToolVersion $response */ + $response = $toolsClient->createToolVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ToolsClient::toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + $toolVersionDisplayName = '[DISPLAY_NAME]'; + $toolVersionToolDisplayName = '[DISPLAY_NAME]'; + $toolVersionToolDescription = '[DESCRIPTION]'; + + create_tool_version_sample( + $formattedParent, + $toolVersionDisplayName, + $toolVersionToolDisplayName, + $toolVersionToolDescription + ); +} +// [END dialogflow_v3_generated_Tools_CreateToolVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool.php new file mode 100644 index 000000000000..332844c152f1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool.php @@ -0,0 +1,71 @@ +/locations//agents//tools/`. Please see + * {@see ToolsClient::toolName()} for help formatting this field. + */ +function delete_tool_sample(string $formattedName): void +{ + // Create a client. + $toolsClient = new ToolsClient(); + + // Prepare the request message. + $request = (new DeleteToolRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $toolsClient->deleteTool($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ToolsClient::toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + + delete_tool_sample($formattedName); +} +// [END dialogflow_v3_generated_Tools_DeleteTool_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool_version.php new file mode 100644 index 000000000000..e9042bddbcaf --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool_version.php @@ -0,0 +1,78 @@ +/locations//agents//tools//versions/`. Please see + * {@see ToolsClient::toolVersionName()} for help formatting this field. + */ +function delete_tool_version_sample(string $formattedName): void +{ + // Create a client. + $toolsClient = new ToolsClient(); + + // Prepare the request message. + $request = (new DeleteToolVersionRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $toolsClient->deleteToolVersion($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ToolsClient::toolVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[TOOL]', + '[VERSION]' + ); + + delete_tool_version_sample($formattedName); +} +// [END dialogflow_v3_generated_Tools_DeleteToolVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_location.php new file mode 100644 index 000000000000..e3ca0aa7531b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Tools_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool.php new file mode 100644 index 000000000000..a253133717a1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool.php @@ -0,0 +1,73 @@ +/locations//agents//tools/`. Please see + * {@see ToolsClient::toolName()} for help formatting this field. + */ +function get_tool_sample(string $formattedName): void +{ + // Create a client. + $toolsClient = new ToolsClient(); + + // Prepare the request message. + $request = (new GetToolRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Tool $response */ + $response = $toolsClient->getTool($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ToolsClient::toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + + get_tool_sample($formattedName); +} +// [END dialogflow_v3_generated_Tools_GetTool_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool_version.php new file mode 100644 index 000000000000..8fd611223f9d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool_version.php @@ -0,0 +1,80 @@ +/locations//agents//tools//versions/`. Please see + * {@see ToolsClient::toolVersionName()} for help formatting this field. + */ +function get_tool_version_sample(string $formattedName): void +{ + // Create a client. + $toolsClient = new ToolsClient(); + + // Prepare the request message. + $request = (new GetToolVersionRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ToolVersion $response */ + $response = $toolsClient->getToolVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ToolsClient::toolVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[TOOL]', + '[VERSION]' + ); + + get_tool_version_sample($formattedName); +} +// [END dialogflow_v3_generated_Tools_GetToolVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_locations.php new file mode 100644 index 000000000000..eeffca42a68d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Tools_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tool_versions.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tool_versions.php new file mode 100644 index 000000000000..f742df19b389 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tool_versions.php @@ -0,0 +1,78 @@ +/locations//agents//tools/`. Please see + * {@see ToolsClient::toolName()} for help formatting this field. + */ +function list_tool_versions_sample(string $formattedParent): void +{ + // Create a client. + $toolsClient = new ToolsClient(); + + // Prepare the request message. + $request = (new ListToolVersionsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $toolsClient->listToolVersions($request); + + /** @var ToolVersion $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 = ToolsClient::toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + + list_tool_versions_sample($formattedParent); +} +// [END dialogflow_v3_generated_Tools_ListToolVersions_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tools.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tools.php new file mode 100644 index 000000000000..98d7a5ff723d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tools.php @@ -0,0 +1,78 @@ +/locations//agents/`. Please see + * {@see ToolsClient::agentName()} for help formatting this field. + */ +function list_tools_sample(string $formattedParent): void +{ + // Create a client. + $toolsClient = new ToolsClient(); + + // Prepare the request message. + $request = (new ListToolsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $toolsClient->listTools($request); + + /** @var Tool $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 = ToolsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + list_tools_sample($formattedParent); +} +// [END dialogflow_v3_generated_Tools_ListTools_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/restore_tool_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/restore_tool_version.php new file mode 100644 index 000000000000..8effea3e8cc8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/restore_tool_version.php @@ -0,0 +1,80 @@ +/locations//agents//tools//versions/`. Please see + * {@see ToolsClient::toolVersionName()} for help formatting this field. + */ +function restore_tool_version_sample(string $formattedName): void +{ + // Create a client. + $toolsClient = new ToolsClient(); + + // Prepare the request message. + $request = (new RestoreToolVersionRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RestoreToolVersionResponse $response */ + $response = $toolsClient->restoreToolVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ToolsClient::toolVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[TOOL]', + '[VERSION]' + ); + + restore_tool_version_sample($formattedName); +} +// [END dialogflow_v3_generated_Tools_RestoreToolVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/update_tool.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/update_tool.php new file mode 100644 index 000000000000..a87104c03245 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/update_tool.php @@ -0,0 +1,75 @@ +setDisplayName($toolDisplayName) + ->setDescription($toolDescription); + $request = (new UpdateToolRequest()) + ->setTool($tool); + + // Call the API and handle any network failures. + try { + /** @var Tool $response */ + $response = $toolsClient->updateTool($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $toolDisplayName = '[DISPLAY_NAME]'; + $toolDescription = '[DESCRIPTION]'; + + update_tool_sample($toolDisplayName, $toolDescription); +} +// [END dialogflow_v3_generated_Tools_UpdateTool_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/create_transition_route_group.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/create_transition_route_group.php new file mode 100644 index 000000000000..ced2833b8fcf --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/create_transition_route_group.php @@ -0,0 +1,95 @@ +/locations//agents//flows/` + * or `projects//locations//agents/` + * for agent-level groups. Please see + * {@see TransitionRouteGroupsClient::flowName()} for help formatting this field. + * @param string $transitionRouteGroupDisplayName The human-readable name of the transition route group, unique + * within the flow. The display name can be no longer than 30 characters. + */ +function create_transition_route_group_sample( + string $formattedParent, + string $transitionRouteGroupDisplayName +): void { + // Create a client. + $transitionRouteGroupsClient = new TransitionRouteGroupsClient(); + + // Prepare the request message. + $transitionRouteGroup = (new TransitionRouteGroup()) + ->setDisplayName($transitionRouteGroupDisplayName); + $request = (new CreateTransitionRouteGroupRequest()) + ->setParent($formattedParent) + ->setTransitionRouteGroup($transitionRouteGroup); + + // Call the API and handle any network failures. + try { + /** @var TransitionRouteGroup $response */ + $response = $transitionRouteGroupsClient->createTransitionRouteGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TransitionRouteGroupsClient::flowName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]' + ); + $transitionRouteGroupDisplayName = '[DISPLAY_NAME]'; + + create_transition_route_group_sample($formattedParent, $transitionRouteGroupDisplayName); +} +// [END dialogflow_v3_generated_TransitionRouteGroups_CreateTransitionRouteGroup_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/delete_transition_route_group.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/delete_transition_route_group.php new file mode 100644 index 000000000000..2f2a87252147 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/delete_transition_route_group.php @@ -0,0 +1,85 @@ +/locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. Please see + * {@see TransitionRouteGroupsClient::transitionRouteGroupName()} for help formatting this field. + */ +function delete_transition_route_group_sample(string $formattedName): void +{ + // Create a client. + $transitionRouteGroupsClient = new TransitionRouteGroupsClient(); + + // Prepare the request message. + $request = (new DeleteTransitionRouteGroupRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $transitionRouteGroupsClient->deleteTransitionRouteGroup($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TransitionRouteGroupsClient::transitionRouteGroupName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]', + '[TRANSITION_ROUTE_GROUP]' + ); + + delete_transition_route_group_sample($formattedName); +} +// [END dialogflow_v3_generated_TransitionRouteGroups_DeleteTransitionRouteGroup_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_location.php new file mode 100644 index 000000000000..bc1d7de3a28e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_TransitionRouteGroups_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_transition_route_group.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_transition_route_group.php new file mode 100644 index 000000000000..6a7011a8d2b4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_transition_route_group.php @@ -0,0 +1,83 @@ +/locations//agents//flows//transitionRouteGroups/` + * or + * `projects//locations//agents//transitionRouteGroups/`. Please see + * {@see TransitionRouteGroupsClient::transitionRouteGroupName()} for help formatting this field. + */ +function get_transition_route_group_sample(string $formattedName): void +{ + // Create a client. + $transitionRouteGroupsClient = new TransitionRouteGroupsClient(); + + // Prepare the request message. + $request = (new GetTransitionRouteGroupRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TransitionRouteGroup $response */ + $response = $transitionRouteGroupsClient->getTransitionRouteGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TransitionRouteGroupsClient::transitionRouteGroupName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]', + '[TRANSITION_ROUTE_GROUP]' + ); + + get_transition_route_group_sample($formattedName); +} +// [END dialogflow_v3_generated_TransitionRouteGroups_GetTransitionRouteGroup_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_locations.php new file mode 100644 index 000000000000..5b788eabe87c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_TransitionRouteGroups_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_transition_route_groups.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_transition_route_groups.php new file mode 100644 index 000000000000..801bb9ca10e7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_transition_route_groups.php @@ -0,0 +1,84 @@ +/locations//agents//flows/` + * or `projects//locations//agents/. Please see + * {@see TransitionRouteGroupsClient::flowName()} for help formatting this field. + */ +function list_transition_route_groups_sample(string $formattedParent): void +{ + // Create a client. + $transitionRouteGroupsClient = new TransitionRouteGroupsClient(); + + // Prepare the request message. + $request = (new ListTransitionRouteGroupsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $transitionRouteGroupsClient->listTransitionRouteGroups($request); + + /** @var TransitionRouteGroup $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 = TransitionRouteGroupsClient::flowName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]' + ); + + list_transition_route_groups_sample($formattedParent); +} +// [END dialogflow_v3_generated_TransitionRouteGroups_ListTransitionRouteGroups_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/update_transition_route_group.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/update_transition_route_group.php new file mode 100644 index 000000000000..94e65cd77e20 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/update_transition_route_group.php @@ -0,0 +1,78 @@ +setDisplayName($transitionRouteGroupDisplayName); + $request = (new UpdateTransitionRouteGroupRequest()) + ->setTransitionRouteGroup($transitionRouteGroup); + + // Call the API and handle any network failures. + try { + /** @var TransitionRouteGroup $response */ + $response = $transitionRouteGroupsClient->updateTransitionRouteGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $transitionRouteGroupDisplayName = '[DISPLAY_NAME]'; + + update_transition_route_group_sample($transitionRouteGroupDisplayName); +} +// [END dialogflow_v3_generated_TransitionRouteGroups_UpdateTransitionRouteGroup_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/compare_versions.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/compare_versions.php new file mode 100644 index 000000000000..3dd1d372f0a1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/compare_versions.php @@ -0,0 +1,96 @@ +/locations//agents//flows//versions/`. Please see + * {@see VersionsClient::versionName()} for help formatting this field. + * @param string $formattedTargetVersion Name of the target flow version to compare with the + * base version. Use version ID `0` to indicate the draft version of the + * specified flow. Format: + * `projects//locations//agents//flows//versions/`. Please see + * {@see VersionsClient::versionName()} for help formatting this field. + */ +function compare_versions_sample( + string $formattedBaseVersion, + string $formattedTargetVersion +): void { + // Create a client. + $versionsClient = new VersionsClient(); + + // Prepare the request message. + $request = (new CompareVersionsRequest()) + ->setBaseVersion($formattedBaseVersion) + ->setTargetVersion($formattedTargetVersion); + + // Call the API and handle any network failures. + try { + /** @var CompareVersionsResponse $response */ + $response = $versionsClient->compareVersions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedBaseVersion = VersionsClient::versionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]', + '[VERSION]' + ); + $formattedTargetVersion = VersionsClient::versionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]', + '[VERSION]' + ); + + compare_versions_sample($formattedBaseVersion, $formattedTargetVersion); +} +// [END dialogflow_v3_generated_Versions_CompareVersions_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/create_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/create_version.php new file mode 100644 index 000000000000..51b454061e38 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/create_version.php @@ -0,0 +1,99 @@ +/locations//agents//flows/`. Please see + * {@see VersionsClient::flowName()} for help formatting this field. + * @param string $versionDisplayName The human-readable name of the version. Limit of 64 characters. + */ +function create_version_sample(string $formattedParent, string $versionDisplayName): void +{ + // Create a client. + $versionsClient = new VersionsClient(); + + // Prepare the request message. + $version = (new Version()) + ->setDisplayName($versionDisplayName); + $request = (new CreateVersionRequest()) + ->setParent($formattedParent) + ->setVersion($version); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $versionsClient->createVersion($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Version $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 = VersionsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $versionDisplayName = '[DISPLAY_NAME]'; + + create_version_sample($formattedParent, $versionDisplayName); +} +// [END dialogflow_v3_generated_Versions_CreateVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/delete_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/delete_version.php new file mode 100644 index 000000000000..cb8ae4e329e3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/delete_version.php @@ -0,0 +1,77 @@ +/locations//agents//flows//versions/`. Please see + * {@see VersionsClient::versionName()} for help formatting this field. + */ +function delete_version_sample(string $formattedName): void +{ + // Create a client. + $versionsClient = new VersionsClient(); + + // Prepare the request message. + $request = (new DeleteVersionRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $versionsClient->deleteVersion($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VersionsClient::versionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]', + '[VERSION]' + ); + + delete_version_sample($formattedName); +} +// [END dialogflow_v3_generated_Versions_DeleteVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_location.php new file mode 100644 index 000000000000..1c7fc2bc1f36 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Versions_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_version.php new file mode 100644 index 000000000000..2cbd2398bb94 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_version.php @@ -0,0 +1,79 @@ +/locations//agents//flows//versions/`. Please see + * {@see VersionsClient::versionName()} for help formatting this field. + */ +function get_version_sample(string $formattedName): void +{ + // Create a client. + $versionsClient = new VersionsClient(); + + // Prepare the request message. + $request = (new GetVersionRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Version $response */ + $response = $versionsClient->getVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VersionsClient::versionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]', + '[VERSION]' + ); + + get_version_sample($formattedName); +} +// [END dialogflow_v3_generated_Versions_GetVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_locations.php new file mode 100644 index 000000000000..27db37ece659 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Versions_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_versions.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_versions.php new file mode 100644 index 000000000000..aef92559f089 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_versions.php @@ -0,0 +1,79 @@ +/locations//agents//flows/`. Please see + * {@see VersionsClient::flowName()} for help formatting this field. + */ +function list_versions_sample(string $formattedParent): void +{ + // Create a client. + $versionsClient = new VersionsClient(); + + // Prepare the request message. + $request = (new ListVersionsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $versionsClient->listVersions($request); + + /** @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::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + + list_versions_sample($formattedParent); +} +// [END dialogflow_v3_generated_Versions_ListVersions_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/load_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/load_version.php new file mode 100644 index 000000000000..17e7107b4e03 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/load_version.php @@ -0,0 +1,97 @@ +/locations//agents//flows//versions/`. Please see + * {@see VersionsClient::versionName()} for help formatting this field. + */ +function load_version_sample(string $formattedName): void +{ + // Create a client. + $versionsClient = new VersionsClient(); + + // Prepare the request message. + $request = (new LoadVersionRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $versionsClient->loadVersion($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VersionsClient::versionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[FLOW]', + '[VERSION]' + ); + + load_version_sample($formattedName); +} +// [END dialogflow_v3_generated_Versions_LoadVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/update_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/update_version.php new file mode 100644 index 000000000000..1157e689d14e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/update_version.php @@ -0,0 +1,75 @@ +setDisplayName($versionDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateVersionRequest()) + ->setVersion($version) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Version $response */ + $response = $versionsClient->updateVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $versionDisplayName = '[DISPLAY_NAME]'; + + update_version_sample($versionDisplayName); +} +// [END dialogflow_v3_generated_Versions_UpdateVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/create_webhook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/create_webhook.php new file mode 100644 index 000000000000..d856896aff0a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/create_webhook.php @@ -0,0 +1,77 @@ +/locations//agents/`. Please see + * {@see WebhooksClient::agentName()} for help formatting this field. + * @param string $webhookDisplayName The human-readable name of the webhook, unique within the agent. + */ +function create_webhook_sample(string $formattedParent, string $webhookDisplayName): void +{ + // Create a client. + $webhooksClient = new WebhooksClient(); + + // Prepare the request message. + $webhook = (new Webhook()) + ->setDisplayName($webhookDisplayName); + $request = (new CreateWebhookRequest()) + ->setParent($formattedParent) + ->setWebhook($webhook); + + // Call the API and handle any network failures. + try { + /** @var Webhook $response */ + $response = $webhooksClient->createWebhook($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WebhooksClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $webhookDisplayName = '[DISPLAY_NAME]'; + + create_webhook_sample($formattedParent, $webhookDisplayName); +} +// [END dialogflow_v3_generated_Webhooks_CreateWebhook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/delete_webhook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/delete_webhook.php new file mode 100644 index 000000000000..aff3b1c075b5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/delete_webhook.php @@ -0,0 +1,71 @@ +/locations//agents//webhooks/`. Please see + * {@see WebhooksClient::webhookName()} for help formatting this field. + */ +function delete_webhook_sample(string $formattedName): void +{ + // Create a client. + $webhooksClient = new WebhooksClient(); + + // Prepare the request message. + $request = (new DeleteWebhookRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + $webhooksClient->deleteWebhook($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WebhooksClient::webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); + + delete_webhook_sample($formattedName); +} +// [END dialogflow_v3_generated_Webhooks_DeleteWebhook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_location.php new file mode 100644 index 000000000000..9c6859fe6bf4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dialogflow_v3_generated_Webhooks_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_webhook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_webhook.php new file mode 100644 index 000000000000..972d5e8b8265 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_webhook.php @@ -0,0 +1,73 @@ +/locations//agents//webhooks/`. Please see + * {@see WebhooksClient::webhookName()} for help formatting this field. + */ +function get_webhook_sample(string $formattedName): void +{ + // Create a client. + $webhooksClient = new WebhooksClient(); + + // Prepare the request message. + $request = (new GetWebhookRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Webhook $response */ + $response = $webhooksClient->getWebhook($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WebhooksClient::webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); + + get_webhook_sample($formattedName); +} +// [END dialogflow_v3_generated_Webhooks_GetWebhook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_locations.php new file mode 100644 index 000000000000..c9ff21adc3b9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @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_v3_generated_Webhooks_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_webhooks.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_webhooks.php new file mode 100644 index 000000000000..86889427ea93 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_webhooks.php @@ -0,0 +1,77 @@ +/locations//agents/`. Please see + * {@see WebhooksClient::agentName()} for help formatting this field. + */ +function list_webhooks_sample(string $formattedParent): void +{ + // Create a client. + $webhooksClient = new WebhooksClient(); + + // Prepare the request message. + $request = (new ListWebhooksRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $webhooksClient->listWebhooks($request); + + /** @var Webhook $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 = WebhooksClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + + list_webhooks_sample($formattedParent); +} +// [END dialogflow_v3_generated_Webhooks_ListWebhooks_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/update_webhook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/update_webhook.php new file mode 100644 index 000000000000..16a2231f545e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/update_webhook.php @@ -0,0 +1,72 @@ +setDisplayName($webhookDisplayName); + $request = (new UpdateWebhookRequest()) + ->setWebhook($webhook); + + // Call the API and handle any network failures. + try { + /** @var Webhook $response */ + $response = $webhooksClient->updateWebhook($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $webhookDisplayName = '[DISPLAY_NAME]'; + + update_webhook_sample($webhookDisplayName); +} +// [END dialogflow_v3_generated_Webhooks_UpdateWebhook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/AgentsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/AgentsClient.php new file mode 100644 index 000000000000..57e722eb0490 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/AgentsClient.php @@ -0,0 +1,850 @@ + createAgentAsync(CreateAgentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAgentAsync(DeleteAgentRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportAgentAsync(ExportAgentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAgentAsync(GetAgentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAgentValidationResultAsync(GetAgentValidationResultRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGenerativeSettingsAsync(GetGenerativeSettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAgentsAsync(ListAgentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreAgentAsync(RestoreAgentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAgentAsync(UpdateAgentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGenerativeSettingsAsync(UpdateGenerativeSettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface validateAgentAsync(ValidateAgentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class AgentsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Agents'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 $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', + ], + ], + ]; + } + + /** + * 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 = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * agent_generative_settings resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent_generative_settings resource. + */ + public static function agentGenerativeSettingsName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agentGenerativeSettings')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * agent_validation_result resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent_validation_result resource. + */ + public static function agentValidationResultName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agentValidationResult')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a environment + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * + * @return string The formatted environment resource. + */ + public static function environmentName(string $project, string $location, string $agent, string $environment): string + { + return self::getPathTemplate('environment')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a flow + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * + * @return string The formatted flow resource. + */ + public static function flowName(string $project, string $location, string $agent, string $flow): string + { + return self::getPathTemplate('flow')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * security_settings resource. + * + * @param string $project + * @param string $location + * @param string $securitySettings + * + * @return string The formatted security_settings resource. + */ + public static function securitySettingsName(string $project, string $location, string $securitySettings): string + { + return self::getPathTemplate('securitySettings')->render([ + 'project' => $project, + 'location' => $location, + 'security_settings' => $securitySettings, + ]); + } + + /** + * 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}/locations/{location}/agents/{agent} + * - agentGenerativeSettings: projects/{project}/locations/{location}/agents/{agent}/generativeSettings + * - agentValidationResult: projects/{project}/locations/{location}/agents/{agent}/validationResult + * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} + * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} + * - location: projects/{project}/locations/{location} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * - securitySettings: projects/{project}/locations/{location}/securitySettings/{security_settings} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\AgentsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new AgentsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an agent in the specified location. + * + * Note: You should always train flows prior to sending them queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see AgentsClient::createAgentAsync()} . + * + * @example samples/V3/AgentsClient/create_agent.php + * + * @param CreateAgentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Agent + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAgent(CreateAgentRequest $request, array $callOptions = []): Agent + { + return $this->startApiCall('CreateAgent', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified agent. + * + * The async variant is {@see AgentsClient::deleteAgentAsync()} . + * + * @example samples/V3/AgentsClient/delete_agent.php + * + * @param DeleteAgentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAgent(DeleteAgentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAgent', $request, $callOptions)->wait(); + } + + /** + * Exports the specified agent to a binary file. + * + * 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`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: + * [ExportAgentResponse][google.cloud.dialogflow.cx.v3.ExportAgentResponse] + * + * The async variant is {@see AgentsClient::exportAgentAsync()} . + * + * @example samples/V3/AgentsClient/export_agent.php + * + * @param ExportAgentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportAgent(ExportAgentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportAgent', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified agent. + * + * The async variant is {@see AgentsClient::getAgentAsync()} . + * + * @example samples/V3/AgentsClient/get_agent.php + * + * @param GetAgentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Agent + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAgent(GetAgentRequest $request, array $callOptions = []): Agent + { + return $this->startApiCall('GetAgent', $request, $callOptions)->wait(); + } + + /** + * Gets the latest agent validation result. Agent validation is performed + * when ValidateAgent is called. + * + * The async variant is {@see AgentsClient::getAgentValidationResultAsync()} . + * + * @example samples/V3/AgentsClient/get_agent_validation_result.php + * + * @param GetAgentValidationResultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AgentValidationResult + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAgentValidationResult(GetAgentValidationResultRequest $request, array $callOptions = []): AgentValidationResult + { + return $this->startApiCall('GetAgentValidationResult', $request, $callOptions)->wait(); + } + + /** + * Gets the generative settings for the agent. + * + * The async variant is {@see AgentsClient::getGenerativeSettingsAsync()} . + * + * @example samples/V3/AgentsClient/get_generative_settings.php + * + * @param GetGenerativeSettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerativeSettings + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGenerativeSettings(GetGenerativeSettingsRequest $request, array $callOptions = []): GenerativeSettings + { + return $this->startApiCall('GetGenerativeSettings', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all agents in the specified location. + * + * The async variant is {@see AgentsClient::listAgentsAsync()} . + * + * @example samples/V3/AgentsClient/list_agents.php + * + * @param ListAgentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAgents(ListAgentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAgents', $request, $callOptions); + } + + /** + * Restores the specified agent from a binary file. + * + * Replaces the current agent with a new one. Note that all existing resources + * in agent (e.g. intents, entity types, flows) will be removed. + * + * 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`: 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 flows prior to sending them queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see AgentsClient::restoreAgentAsync()} . + * + * @example samples/V3/AgentsClient/restore_agent.php + * + * @param RestoreAgentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function restoreAgent(RestoreAgentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RestoreAgent', $request, $callOptions)->wait(); + } + + /** + * Updates the specified agent. + * + * Note: You should always train flows prior to sending them queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see AgentsClient::updateAgentAsync()} . + * + * @example samples/V3/AgentsClient/update_agent.php + * + * @param UpdateAgentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Agent + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAgent(UpdateAgentRequest $request, array $callOptions = []): Agent + { + return $this->startApiCall('UpdateAgent', $request, $callOptions)->wait(); + } + + /** + * Updates the generative settings for the agent. + * + * The async variant is {@see AgentsClient::updateGenerativeSettingsAsync()} . + * + * @example samples/V3/AgentsClient/update_generative_settings.php + * + * @param UpdateGenerativeSettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerativeSettings + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGenerativeSettings(UpdateGenerativeSettingsRequest $request, array $callOptions = []): GenerativeSettings + { + return $this->startApiCall('UpdateGenerativeSettings', $request, $callOptions)->wait(); + } + + /** + * Validates the specified agent and creates or updates validation results. + * The agent in draft version is validated. Please call this API after the + * training is completed to get the complete validation results. + * + * The async variant is {@see AgentsClient::validateAgentAsync()} . + * + * @example samples/V3/AgentsClient/validate_agent.php + * + * @param ValidateAgentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AgentValidationResult + * + * @throws ApiException Thrown if the API call fails. + */ + public function validateAgent(ValidateAgentRequest $request, array $callOptions = []): AgentValidationResult + { + return $this->startApiCall('ValidateAgent', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AgentsClient::getLocationAsync()} . + * + * @example samples/V3/AgentsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see AgentsClient::listLocationsAsync()} . + * + * @example samples/V3/AgentsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ChangelogsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ChangelogsClient.php new file mode 100644 index 000000000000..8851ca167ed1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ChangelogsClient.php @@ -0,0 +1,364 @@ + getChangelogAsync(GetChangelogRequest $request, array $optionalArgs = []) + * @method PromiseInterface listChangelogsAsync(ListChangelogsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class ChangelogsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Changelogs'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/changelogs_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/changelogs_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/changelogs_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/changelogs_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a changelog + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $changelog + * + * @return string The formatted changelog resource. + */ + public static function changelogName(string $project, string $location, string $agent, string $changelog): string + { + return self::getPathTemplate('changelog')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'changelog' => $changelog, + ]); + } + + /** + * 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}/locations/{location}/agents/{agent} + * - changelog: projects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\ChangelogsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ChangelogsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Retrieves the specified Changelog. + * + * The async variant is {@see ChangelogsClient::getChangelogAsync()} . + * + * @example samples/V3/ChangelogsClient/get_changelog.php + * + * @param GetChangelogRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Changelog + * + * @throws ApiException Thrown if the API call fails. + */ + public function getChangelog(GetChangelogRequest $request, array $callOptions = []): Changelog + { + return $this->startApiCall('GetChangelog', $request, $callOptions)->wait(); + } + + /** + * Returns the list of Changelogs. + * + * The async variant is {@see ChangelogsClient::listChangelogsAsync()} . + * + * @example samples/V3/ChangelogsClient/list_changelogs.php + * + * @param ListChangelogsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listChangelogs(ListChangelogsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListChangelogs', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ChangelogsClient::getLocationAsync()} . + * + * @example samples/V3/ChangelogsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ChangelogsClient::listLocationsAsync()} . + * + * @example samples/V3/ChangelogsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/DeploymentsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/DeploymentsClient.php new file mode 100644 index 000000000000..547b69a14b49 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/DeploymentsClient.php @@ -0,0 +1,370 @@ + getDeploymentAsync(GetDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDeploymentsAsync(ListDeploymentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class DeploymentsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Deployments'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/deployments_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/deployments_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/deployments_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/deployments_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a deployment + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * @param string $deployment + * + * @return string The formatted deployment resource. + */ + public static function deploymentName(string $project, string $location, string $agent, string $environment, string $deployment): string + { + return self::getPathTemplate('deployment')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + 'deployment' => $deployment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a environment + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * + * @return string The formatted environment resource. + */ + public static function environmentName(string $project, string $location, string $agent, string $environment): string + { + return self::getPathTemplate('environment')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - deployment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment} + * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\DeploymentsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DeploymentsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Retrieves the specified + * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. + * + * The async variant is {@see DeploymentsClient::getDeploymentAsync()} . + * + * @example samples/V3/DeploymentsClient/get_deployment.php + * + * @param GetDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Deployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDeployment(GetDeploymentRequest $request, array $callOptions = []): Deployment + { + return $this->startApiCall('GetDeployment', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all deployments in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * The async variant is {@see DeploymentsClient::listDeploymentsAsync()} . + * + * @example samples/V3/DeploymentsClient/list_deployments.php + * + * @param ListDeploymentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDeployments(ListDeploymentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDeployments', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DeploymentsClient::getLocationAsync()} . + * + * @example samples/V3/DeploymentsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see DeploymentsClient::listLocationsAsync()} . + * + * @example samples/V3/DeploymentsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EntityTypesClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EntityTypesClient.php new file mode 100644 index 000000000000..8bed1f22958e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EntityTypesClient.php @@ -0,0 +1,570 @@ + createEntityTypeAsync(CreateEntityTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteEntityTypeAsync(DeleteEntityTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportEntityTypesAsync(ExportEntityTypesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEntityTypeAsync(GetEntityTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface importEntityTypesAsync(ImportEntityTypesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEntityTypesAsync(ListEntityTypesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateEntityTypeAsync(UpdateEntityTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class EntityTypesClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.EntityTypes'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 $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', + ], + ], + ]; + } + + /** + * 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 = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a entity_type + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $entityType + * + * @return string The formatted entity_type resource. + */ + public static function entityTypeName(string $project, string $location, string $agent, string $entityType): string + { + return self::getPathTemplate('entityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + '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}/locations/{location}/agents/{agent} + * - entityType: projects/{project}/locations/{location}/agents/{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(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\EntityTypesClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new EntityTypesClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an entity type in the specified agent. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see EntityTypesClient::createEntityTypeAsync()} . + * + * @example samples/V3/EntityTypesClient/create_entity_type.php + * + * @param CreateEntityTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EntityType + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEntityType(CreateEntityTypeRequest $request, array $callOptions = []): EntityType + { + return $this->startApiCall('CreateEntityType', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified entity type. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see EntityTypesClient::deleteEntityTypeAsync()} . + * + * @example samples/V3/EntityTypesClient/delete_entity_type.php + * + * @param DeleteEntityTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteEntityType(DeleteEntityTypeRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteEntityType', $request, $callOptions)->wait(); + } + + /** + * Exports the selected entity types. + * + * The async variant is {@see EntityTypesClient::exportEntityTypesAsync()} . + * + * @example samples/V3/EntityTypesClient/export_entity_types.php + * + * @param ExportEntityTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportEntityTypes(ExportEntityTypesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportEntityTypes', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified entity type. + * + * The async variant is {@see EntityTypesClient::getEntityTypeAsync()} . + * + * @example samples/V3/EntityTypesClient/get_entity_type.php + * + * @param GetEntityTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EntityType + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEntityType(GetEntityTypeRequest $request, array $callOptions = []): EntityType + { + return $this->startApiCall('GetEntityType', $request, $callOptions)->wait(); + } + + /** + * Imports the specified entitytypes into the agent. + * + * The async variant is {@see EntityTypesClient::importEntityTypesAsync()} . + * + * @example samples/V3/EntityTypesClient/import_entity_types.php + * + * @param ImportEntityTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importEntityTypes(ImportEntityTypesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportEntityTypes', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all entity types in the specified agent. + * + * The async variant is {@see EntityTypesClient::listEntityTypesAsync()} . + * + * @example samples/V3/EntityTypesClient/list_entity_types.php + * + * @param ListEntityTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEntityTypes(ListEntityTypesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEntityTypes', $request, $callOptions); + } + + /** + * Updates the specified entity type. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see EntityTypesClient::updateEntityTypeAsync()} . + * + * @example samples/V3/EntityTypesClient/update_entity_type.php + * + * @param UpdateEntityTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EntityType + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEntityType(UpdateEntityTypeRequest $request, array $callOptions = []): EntityType + { + return $this->startApiCall('UpdateEntityType', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see EntityTypesClient::getLocationAsync()} . + * + * @example samples/V3/EntityTypesClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see EntityTypesClient::listLocationsAsync()} . + * + * @example samples/V3/EntityTypesClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EnvironmentsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EnvironmentsClient.php new file mode 100644 index 000000000000..3cc3463f11af --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EnvironmentsClient.php @@ -0,0 +1,772 @@ + createEnvironmentAsync(CreateEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteEnvironmentAsync(DeleteEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deployFlowAsync(DeployFlowRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEnvironmentAsync(GetEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listContinuousTestResultsAsync(ListContinuousTestResultsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEnvironmentsAsync(ListEnvironmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface lookupEnvironmentHistoryAsync(LookupEnvironmentHistoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface runContinuousTestAsync(RunContinuousTestRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateEnvironmentAsync(UpdateEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class EnvironmentsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Environments'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 $operationsClient; + + 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', + ], + ], + ]; + } + + /** + * 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 = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a environment + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * + * @return string The formatted environment resource. + */ + public static function environmentName(string $project, string $location, string $agent, string $environment): string + { + return self::getPathTemplate('environment')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a service + * resource. + * + * @param string $project + * @param string $location + * @param string $namespace + * @param string $service + * + * @return string The formatted service resource. + */ + public static function serviceName(string $project, string $location, string $namespace, string $service): string + { + return self::getPathTemplate('service')->render([ + 'project' => $project, + 'location' => $location, + 'namespace' => $namespace, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a test_case + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $testCase + * + * @return string The formatted test_case resource. + */ + public static function testCaseName(string $project, string $location, string $agent, string $testCase): string + { + return self::getPathTemplate('testCase')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'test_case' => $testCase, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a version + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $version + * + * @return string The formatted version resource. + */ + public static function versionName(string $project, string $location, string $agent, string $flow, string $version): string + { + return self::getPathTemplate('version')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a webhook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $webhook + * + * @return string The formatted webhook resource. + */ + public static function webhookName(string $project, string $location, string $agent, string $webhook): string + { + return self::getPathTemplate('webhook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'webhook' => $webhook, + ]); + } + + /** + * 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}/locations/{location}/agents/{agent} + * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} + * - testCase: projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case} + * - version: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version} + * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\EnvironmentsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new EnvironmentsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the + * specified [Agent][google.cloud.dialogflow.cx.v3.Agent]. + * + * 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`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3.Environment] + * + * The async variant is {@see EnvironmentsClient::createEnvironmentAsync()} . + * + * @example samples/V3/EnvironmentsClient/create_environment.php + * + * @param CreateEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEnvironment(CreateEnvironmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateEnvironment', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * The async variant is {@see EnvironmentsClient::deleteEnvironmentAsync()} . + * + * @example samples/V3/EnvironmentsClient/delete_environment.php + * + * @param DeleteEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteEnvironment(DeleteEnvironmentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteEnvironment', $request, $callOptions)->wait(); + } + + /** + * Deploys a flow to the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * 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`: + * [DeployFlowMetadata][google.cloud.dialogflow.cx.v3.DeployFlowMetadata] + * - `response`: + * [DeployFlowResponse][google.cloud.dialogflow.cx.v3.DeployFlowResponse] + * + * The async variant is {@see EnvironmentsClient::deployFlowAsync()} . + * + * @example samples/V3/EnvironmentsClient/deploy_flow.php + * + * @param DeployFlowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deployFlow(DeployFlowRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeployFlow', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * The async variant is {@see EnvironmentsClient::getEnvironmentAsync()} . + * + * @example samples/V3/EnvironmentsClient/get_environment.php + * + * @param GetEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Environment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEnvironment(GetEnvironmentRequest $request, array $callOptions = []): Environment + { + return $this->startApiCall('GetEnvironment', $request, $callOptions)->wait(); + } + + /** + * Fetches a list of continuous test results for a given environment. + * + * The async variant is {@see EnvironmentsClient::listContinuousTestResultsAsync()} + * . + * + * @example samples/V3/EnvironmentsClient/list_continuous_test_results.php + * + * @param ListContinuousTestResultsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listContinuousTestResults(ListContinuousTestResultsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListContinuousTestResults', $request, $callOptions); + } + + /** + * Returns the list of all environments in the specified + * [Agent][google.cloud.dialogflow.cx.v3.Agent]. + * + * The async variant is {@see EnvironmentsClient::listEnvironmentsAsync()} . + * + * @example samples/V3/EnvironmentsClient/list_environments.php + * + * @param ListEnvironmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEnvironments(ListEnvironmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEnvironments', $request, $callOptions); + } + + /** + * Looks up the history of the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * The async variant is {@see EnvironmentsClient::lookupEnvironmentHistoryAsync()} + * . + * + * @example samples/V3/EnvironmentsClient/lookup_environment_history.php + * + * @param LookupEnvironmentHistoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function lookupEnvironmentHistory(LookupEnvironmentHistoryRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('LookupEnvironmentHistory', $request, $callOptions); + } + + /** + * Kicks off a continuous test under the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * 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`: + * [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata] + * - `response`: + * [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse] + * + * The async variant is {@see EnvironmentsClient::runContinuousTestAsync()} . + * + * @example samples/V3/EnvironmentsClient/run_continuous_test.php + * + * @param RunContinuousTestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runContinuousTest(RunContinuousTestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RunContinuousTest', $request, $callOptions)->wait(); + } + + /** + * Updates the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * 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`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3.Environment] + * + * The async variant is {@see EnvironmentsClient::updateEnvironmentAsync()} . + * + * @example samples/V3/EnvironmentsClient/update_environment.php + * + * @param UpdateEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEnvironment(UpdateEnvironmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateEnvironment', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see EnvironmentsClient::getLocationAsync()} . + * + * @example samples/V3/EnvironmentsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see EnvironmentsClient::listLocationsAsync()} . + * + * @example samples/V3/EnvironmentsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExamplesClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExamplesClient.php new file mode 100644 index 000000000000..76b8dd343d84 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExamplesClient.php @@ -0,0 +1,494 @@ + createExampleAsync(CreateExampleRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteExampleAsync(DeleteExampleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getExampleAsync(GetExampleRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExamplesAsync(ListExamplesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateExampleAsync(UpdateExampleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class ExamplesClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Examples'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/examples_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/examples_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/examples_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/examples_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a example + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * @param string $example + * + * @return string The formatted example resource. + */ + public static function exampleName(string $project, string $location, string $agent, string $playbook, string $example): string + { + return self::getPathTemplate('example')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + 'example' => $example, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a flow + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * + * @return string The formatted flow resource. + */ + public static function flowName(string $project, string $location, string $agent, string $flow): string + { + return self::getPathTemplate('flow')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - example: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example} + * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\ExamplesClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ExamplesClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an example in the specified playbook. + * + * The async variant is {@see ExamplesClient::createExampleAsync()} . + * + * @example samples/V3/ExamplesClient/create_example.php + * + * @param CreateExampleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Example + * + * @throws ApiException Thrown if the API call fails. + */ + public function createExample(CreateExampleRequest $request, array $callOptions = []): Example + { + return $this->startApiCall('CreateExample', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified example. + * + * The async variant is {@see ExamplesClient::deleteExampleAsync()} . + * + * @example samples/V3/ExamplesClient/delete_example.php + * + * @param DeleteExampleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteExample(DeleteExampleRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteExample', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified example. + * + * The async variant is {@see ExamplesClient::getExampleAsync()} . + * + * @example samples/V3/ExamplesClient/get_example.php + * + * @param GetExampleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Example + * + * @throws ApiException Thrown if the API call fails. + */ + public function getExample(GetExampleRequest $request, array $callOptions = []): Example + { + return $this->startApiCall('GetExample', $request, $callOptions)->wait(); + } + + /** + * Returns a list of examples in the specified playbook. + * + * The async variant is {@see ExamplesClient::listExamplesAsync()} . + * + * @example samples/V3/ExamplesClient/list_examples.php + * + * @param ListExamplesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listExamples(ListExamplesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListExamples', $request, $callOptions); + } + + /** + * Update the specified example. + * + * The async variant is {@see ExamplesClient::updateExampleAsync()} . + * + * @example samples/V3/ExamplesClient/update_example.php + * + * @param UpdateExampleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Example + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateExample(UpdateExampleRequest $request, array $callOptions = []): Example + { + return $this->startApiCall('UpdateExample', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ExamplesClient::getLocationAsync()} . + * + * @example samples/V3/ExamplesClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ExamplesClient::listLocationsAsync()} . + * + * @example samples/V3/ExamplesClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExperimentsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExperimentsClient.php new file mode 100644 index 000000000000..455b611da8e1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExperimentsClient.php @@ -0,0 +1,538 @@ + createExperimentAsync(CreateExperimentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteExperimentAsync(DeleteExperimentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getExperimentAsync(GetExperimentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExperimentsAsync(ListExperimentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface startExperimentAsync(StartExperimentRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopExperimentAsync(StopExperimentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateExperimentAsync(UpdateExperimentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class ExperimentsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Experiments'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/experiments_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/experiments_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/experiments_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/experiments_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a environment + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * + * @return string The formatted environment resource. + */ + public static function environmentName(string $project, string $location, string $agent, string $environment): string + { + return self::getPathTemplate('environment')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a experiment + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * @param string $experiment + * + * @return string The formatted experiment resource. + */ + public static function experimentName(string $project, string $location, string $agent, string $environment, string $experiment): string + { + return self::getPathTemplate('experiment')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + 'experiment' => $experiment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a version + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $version + * + * @return string The formatted version resource. + */ + public static function versionName(string $project, string $location, string $agent, string $flow, string $version): string + { + return self::getPathTemplate('version')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + '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 + * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} + * - experiment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment} + * - version: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/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(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\ExperimentsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ExperimentsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the + * specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * The async variant is {@see ExperimentsClient::createExperimentAsync()} . + * + * @example samples/V3/ExperimentsClient/create_experiment.php + * + * @param CreateExperimentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Experiment + * + * @throws ApiException Thrown if the API call fails. + */ + public function createExperiment(CreateExperimentRequest $request, array $callOptions = []): Experiment + { + return $this->startApiCall('CreateExperiment', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified + * [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * The async variant is {@see ExperimentsClient::deleteExperimentAsync()} . + * + * @example samples/V3/ExperimentsClient/delete_experiment.php + * + * @param DeleteExperimentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteExperiment(DeleteExperimentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteExperiment', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified + * [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * The async variant is {@see ExperimentsClient::getExperimentAsync()} . + * + * @example samples/V3/ExperimentsClient/get_experiment.php + * + * @param GetExperimentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Experiment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getExperiment(GetExperimentRequest $request, array $callOptions = []): Experiment + { + return $this->startApiCall('GetExperiment', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all experiments in the specified + * [Environment][google.cloud.dialogflow.cx.v3.Environment]. + * + * The async variant is {@see ExperimentsClient::listExperimentsAsync()} . + * + * @example samples/V3/ExperimentsClient/list_experiments.php + * + * @param ListExperimentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listExperiments(ListExperimentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListExperiments', $request, $callOptions); + } + + /** + * Starts the specified + * [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only + * changes the state of experiment from PENDING to RUNNING. + * + * The async variant is {@see ExperimentsClient::startExperimentAsync()} . + * + * @example samples/V3/ExperimentsClient/start_experiment.php + * + * @param StartExperimentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Experiment + * + * @throws ApiException Thrown if the API call fails. + */ + public function startExperiment(StartExperimentRequest $request, array $callOptions = []): Experiment + { + return $this->startApiCall('StartExperiment', $request, $callOptions)->wait(); + } + + /** + * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * This rpc only changes the state of experiment from RUNNING to DONE. + * + * The async variant is {@see ExperimentsClient::stopExperimentAsync()} . + * + * @example samples/V3/ExperimentsClient/stop_experiment.php + * + * @param StopExperimentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Experiment + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopExperiment(StopExperimentRequest $request, array $callOptions = []): Experiment + { + return $this->startApiCall('StopExperiment', $request, $callOptions)->wait(); + } + + /** + * Updates the specified + * [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + * + * The async variant is {@see ExperimentsClient::updateExperimentAsync()} . + * + * @example samples/V3/ExperimentsClient/update_experiment.php + * + * @param UpdateExperimentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Experiment + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateExperiment(UpdateExperimentRequest $request, array $callOptions = []): Experiment + { + return $this->startApiCall('UpdateExperiment', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ExperimentsClient::getLocationAsync()} . + * + * @example samples/V3/ExperimentsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ExperimentsClient::listLocationsAsync()} . + * + * @example samples/V3/ExperimentsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/FlowsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/FlowsClient.php new file mode 100644 index 000000000000..2a330ed2d8f5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/FlowsClient.php @@ -0,0 +1,920 @@ + createFlowAsync(CreateFlowRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFlowAsync(DeleteFlowRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportFlowAsync(ExportFlowRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFlowAsync(GetFlowRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFlowValidationResultAsync(GetFlowValidationResultRequest $request, array $optionalArgs = []) + * @method PromiseInterface importFlowAsync(ImportFlowRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFlowsAsync(ListFlowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface trainFlowAsync(TrainFlowRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateFlowAsync(UpdateFlowRequest $request, array $optionalArgs = []) + * @method PromiseInterface validateFlowAsync(ValidateFlowRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class FlowsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Flows'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/flows_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/flows_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/flows_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/flows_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a flow + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * + * @return string The formatted flow resource. + */ + public static function flowName(string $project, string $location, string $agent, string $flow): string + { + return self::getPathTemplate('flow')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * flow_validation_result resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * + * @return string The formatted flow_validation_result resource. + */ + public static function flowValidationResultName(string $project, string $location, string $agent, string $flow): string + { + return self::getPathTemplate('flowValidationResult')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a generator + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $generator + * + * @return string The formatted generator resource. + */ + public static function generatorName(string $project, string $location, string $agent, string $generator): string + { + return self::getPathTemplate('generator')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'generator' => $generator, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a intent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $intent + * + * @return string The formatted intent resource. + */ + public static function intentName(string $project, string $location, string $agent, string $intent): string + { + return self::getPathTemplate('intent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'intent' => $intent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a page + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $page + * + * @return string The formatted page resource. + */ + public static function pageName(string $project, string $location, string $agent, string $flow, string $page): string + { + return self::getPathTemplate('page')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'page' => $page, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_flow_transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $transitionRouteGroup + * + * @return string The formatted project_location_agent_flow_transition_route_group resource. + */ + public static function projectLocationAgentFlowTransitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string + { + return self::getPathTemplate('projectLocationAgentFlowTransitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $transitionRouteGroup + * + * @return string The formatted project_location_agent_transition_route_group resource. + */ + public static function projectLocationAgentTransitionRouteGroupName(string $project, string $location, string $agent, string $transitionRouteGroup): string + { + return self::getPathTemplate('projectLocationAgentTransitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $transitionRouteGroup + * + * @return string The formatted transition_route_group resource. + */ + public static function transitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string + { + return self::getPathTemplate('transitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a webhook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $webhook + * + * @return string The formatted webhook resource. + */ + public static function webhookName(string $project, string $location, string $agent, string $webhook): string + { + return self::getPathTemplate('webhook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'webhook' => $webhook, + ]); + } + + /** + * 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}/locations/{location}/agents/{agent} + * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} + * - flowValidationResult: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult + * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} + * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} + * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} + * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} + * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} + * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} + * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\FlowsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new FlowsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a flow in the specified agent. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see FlowsClient::createFlowAsync()} . + * + * @example samples/V3/FlowsClient/create_flow.php + * + * @param CreateFlowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Flow + * + * @throws ApiException Thrown if the API call fails. + */ + public function createFlow(CreateFlowRequest $request, array $callOptions = []): Flow + { + return $this->startApiCall('CreateFlow', $request, $callOptions)->wait(); + } + + /** + * Deletes a specified flow. + * + * The async variant is {@see FlowsClient::deleteFlowAsync()} . + * + * @example samples/V3/FlowsClient/delete_flow.php + * + * @param DeleteFlowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteFlow(DeleteFlowRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteFlow', $request, $callOptions)->wait(); + } + + /** + * Exports the specified flow to a binary file. + * + * 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`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: + * [ExportFlowResponse][google.cloud.dialogflow.cx.v3.ExportFlowResponse] + * + * Note that resources (e.g. intents, entities, webhooks) that the flow + * references will also be exported. + * + * The async variant is {@see FlowsClient::exportFlowAsync()} . + * + * @example samples/V3/FlowsClient/export_flow.php + * + * @param ExportFlowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportFlow(ExportFlowRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportFlow', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified flow. + * + * The async variant is {@see FlowsClient::getFlowAsync()} . + * + * @example samples/V3/FlowsClient/get_flow.php + * + * @param GetFlowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Flow + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFlow(GetFlowRequest $request, array $callOptions = []): Flow + { + return $this->startApiCall('GetFlow', $request, $callOptions)->wait(); + } + + /** + * Gets the latest flow validation result. Flow validation is performed + * when ValidateFlow is called. + * + * The async variant is {@see FlowsClient::getFlowValidationResultAsync()} . + * + * @example samples/V3/FlowsClient/get_flow_validation_result.php + * + * @param GetFlowValidationResultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FlowValidationResult + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFlowValidationResult(GetFlowValidationResultRequest $request, array $callOptions = []): FlowValidationResult + { + return $this->startApiCall('GetFlowValidationResult', $request, $callOptions)->wait(); + } + + /** + * Imports the specified flow to the specified agent from a binary file. + * + * 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`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: + * [ImportFlowResponse][google.cloud.dialogflow.cx.v3.ImportFlowResponse] + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see FlowsClient::importFlowAsync()} . + * + * @example samples/V3/FlowsClient/import_flow.php + * + * @param ImportFlowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importFlow(ImportFlowRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportFlow', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all flows in the specified agent. + * + * The async variant is {@see FlowsClient::listFlowsAsync()} . + * + * @example samples/V3/FlowsClient/list_flows.php + * + * @param ListFlowsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listFlows(ListFlowsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFlows', $request, $callOptions); + } + + /** + * Trains the specified flow. Note that only the flow in 'draft' environment + * is trained. + * + * 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`: 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 a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see FlowsClient::trainFlowAsync()} . + * + * @example samples/V3/FlowsClient/train_flow.php + * + * @param TrainFlowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function trainFlow(TrainFlowRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('TrainFlow', $request, $callOptions)->wait(); + } + + /** + * Updates the specified flow. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see FlowsClient::updateFlowAsync()} . + * + * @example samples/V3/FlowsClient/update_flow.php + * + * @param UpdateFlowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Flow + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateFlow(UpdateFlowRequest $request, array $callOptions = []): Flow + { + return $this->startApiCall('UpdateFlow', $request, $callOptions)->wait(); + } + + /** + * Validates the specified flow and creates or updates validation results. + * Please call this API after the training is completed to get the complete + * validation results. + * + * The async variant is {@see FlowsClient::validateFlowAsync()} . + * + * @example samples/V3/FlowsClient/validate_flow.php + * + * @param ValidateFlowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FlowValidationResult + * + * @throws ApiException Thrown if the API call fails. + */ + public function validateFlow(ValidateFlowRequest $request, array $callOptions = []): FlowValidationResult + { + return $this->startApiCall('ValidateFlow', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see FlowsClient::getLocationAsync()} . + * + * @example samples/V3/FlowsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see FlowsClient::listLocationsAsync()} . + * + * @example samples/V3/FlowsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/GeneratorsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/GeneratorsClient.php new file mode 100644 index 000000000000..f833a67188dd --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/GeneratorsClient.php @@ -0,0 +1,446 @@ + createGeneratorAsync(CreateGeneratorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGeneratorAsync(DeleteGeneratorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGeneratorAsync(GetGeneratorRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGeneratorsAsync(ListGeneratorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGeneratorAsync(UpdateGeneratorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class GeneratorsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Generators'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/generators_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/generators_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/generators_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/generators_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a generator + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $generator + * + * @return string The formatted generator resource. + */ + public static function generatorName(string $project, string $location, string $agent, string $generator): string + { + return self::getPathTemplate('generator')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'generator' => $generator, + ]); + } + + /** + * 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}/locations/{location}/agents/{agent} + * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\GeneratorsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new GeneratorsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a generator in the specified agent. + * + * The async variant is {@see GeneratorsClient::createGeneratorAsync()} . + * + * @example samples/V3/GeneratorsClient/create_generator.php + * + * @param CreateGeneratorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Generator + * + * @throws ApiException Thrown if the API call fails. + */ + public function createGenerator(CreateGeneratorRequest $request, array $callOptions = []): Generator + { + return $this->startApiCall('CreateGenerator', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified generators. + * + * The async variant is {@see GeneratorsClient::deleteGeneratorAsync()} . + * + * @example samples/V3/GeneratorsClient/delete_generator.php + * + * @param DeleteGeneratorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteGenerator(DeleteGeneratorRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteGenerator', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified generator. + * + * The async variant is {@see GeneratorsClient::getGeneratorAsync()} . + * + * @example samples/V3/GeneratorsClient/get_generator.php + * + * @param GetGeneratorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Generator + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGenerator(GetGeneratorRequest $request, array $callOptions = []): Generator + { + return $this->startApiCall('GetGenerator', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all generators in the specified agent. + * + * The async variant is {@see GeneratorsClient::listGeneratorsAsync()} . + * + * @example samples/V3/GeneratorsClient/list_generators.php + * + * @param ListGeneratorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listGenerators(ListGeneratorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGenerators', $request, $callOptions); + } + + /** + * Update the specified generator. + * + * The async variant is {@see GeneratorsClient::updateGeneratorAsync()} . + * + * @example samples/V3/GeneratorsClient/update_generator.php + * + * @param UpdateGeneratorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Generator + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGenerator(UpdateGeneratorRequest $request, array $callOptions = []): Generator + { + return $this->startApiCall('UpdateGenerator', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see GeneratorsClient::getLocationAsync()} . + * + * @example samples/V3/GeneratorsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see GeneratorsClient::listLocationsAsync()} . + * + * @example samples/V3/GeneratorsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/IntentsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/IntentsClient.php new file mode 100644 index 000000000000..f56cce28a966 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/IntentsClient.php @@ -0,0 +1,612 @@ + createIntentAsync(CreateIntentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteIntentAsync(DeleteIntentRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportIntentsAsync(ExportIntentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIntentAsync(GetIntentRequest $request, array $optionalArgs = []) + * @method PromiseInterface importIntentsAsync(ImportIntentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listIntentsAsync(ListIntentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateIntentAsync(UpdateIntentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class IntentsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Intents'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 $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', + ], + ], + ]; + } + + /** + * 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 = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a entity_type + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $entityType + * + * @return string The formatted entity_type resource. + */ + public static function entityTypeName(string $project, string $location, string $agent, string $entityType): string + { + return self::getPathTemplate('entityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a intent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $intent + * + * @return string The formatted intent resource. + */ + public static function intentName(string $project, string $location, string $agent, string $intent): string + { + return self::getPathTemplate('intent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + '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}/locations/{location}/agents/{agent} + * - entityType: projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type} + * - intent: projects/{project}/locations/{location}/agents/{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(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\IntentsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new IntentsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an intent in the specified agent. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see IntentsClient::createIntentAsync()} . + * + * @example samples/V3/IntentsClient/create_intent.php + * + * @param CreateIntentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Intent + * + * @throws ApiException Thrown if the API call fails. + */ + public function createIntent(CreateIntentRequest $request, array $callOptions = []): Intent + { + return $this->startApiCall('CreateIntent', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified intent. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see IntentsClient::deleteIntentAsync()} . + * + * @example samples/V3/IntentsClient/delete_intent.php + * + * @param DeleteIntentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteIntent(DeleteIntentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteIntent', $request, $callOptions)->wait(); + } + + /** + * Exports the selected intents. + * + * 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`: + * [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3.ExportIntentsMetadata] + * - `response`: + * [ExportIntentsResponse][google.cloud.dialogflow.cx.v3.ExportIntentsResponse] + * + * The async variant is {@see IntentsClient::exportIntentsAsync()} . + * + * @example samples/V3/IntentsClient/export_intents.php + * + * @param ExportIntentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportIntents(ExportIntentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportIntents', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified intent. + * + * The async variant is {@see IntentsClient::getIntentAsync()} . + * + * @example samples/V3/IntentsClient/get_intent.php + * + * @param GetIntentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Intent + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIntent(GetIntentRequest $request, array $callOptions = []): Intent + { + return $this->startApiCall('GetIntent', $request, $callOptions)->wait(); + } + + /** + * Imports the specified intents into the agent. + * + * 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`: + * [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3.ImportIntentsMetadata] + * - `response`: + * [ImportIntentsResponse][google.cloud.dialogflow.cx.v3.ImportIntentsResponse] + * + * The async variant is {@see IntentsClient::importIntentsAsync()} . + * + * @example samples/V3/IntentsClient/import_intents.php + * + * @param ImportIntentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importIntents(ImportIntentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportIntents', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all intents in the specified agent. + * + * The async variant is {@see IntentsClient::listIntentsAsync()} . + * + * @example samples/V3/IntentsClient/list_intents.php + * + * @param ListIntentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listIntents(ListIntentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListIntents', $request, $callOptions); + } + + /** + * Updates the specified intent. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see IntentsClient::updateIntentAsync()} . + * + * @example samples/V3/IntentsClient/update_intent.php + * + * @param UpdateIntentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Intent + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateIntent(UpdateIntentRequest $request, array $callOptions = []): Intent + { + return $this->startApiCall('UpdateIntent', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see IntentsClient::getLocationAsync()} . + * + * @example samples/V3/IntentsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see IntentsClient::listLocationsAsync()} . + * + * @example samples/V3/IntentsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PagesClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PagesClient.php new file mode 100644 index 000000000000..0296fab824e2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PagesClient.php @@ -0,0 +1,664 @@ + createPageAsync(CreatePageRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePageAsync(DeletePageRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPageAsync(GetPageRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPagesAsync(ListPagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePageAsync(UpdatePageRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class PagesClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Pages'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/pages_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/pages_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/pages_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/pages_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a entity_type + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $entityType + * + * @return string The formatted entity_type resource. + */ + public static function entityTypeName(string $project, string $location, string $agent, string $entityType): string + { + return self::getPathTemplate('entityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a flow + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * + * @return string The formatted flow resource. + */ + public static function flowName(string $project, string $location, string $agent, string $flow): string + { + return self::getPathTemplate('flow')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a generator + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $generator + * + * @return string The formatted generator resource. + */ + public static function generatorName(string $project, string $location, string $agent, string $generator): string + { + return self::getPathTemplate('generator')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'generator' => $generator, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a intent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $intent + * + * @return string The formatted intent resource. + */ + public static function intentName(string $project, string $location, string $agent, string $intent): string + { + return self::getPathTemplate('intent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'intent' => $intent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a page + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $page + * + * @return string The formatted page resource. + */ + public static function pageName(string $project, string $location, string $agent, string $flow, string $page): string + { + return self::getPathTemplate('page')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'page' => $page, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_flow_transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $transitionRouteGroup + * + * @return string The formatted project_location_agent_flow_transition_route_group resource. + */ + public static function projectLocationAgentFlowTransitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string + { + return self::getPathTemplate('projectLocationAgentFlowTransitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $transitionRouteGroup + * + * @return string The formatted project_location_agent_transition_route_group resource. + */ + public static function projectLocationAgentTransitionRouteGroupName(string $project, string $location, string $agent, string $transitionRouteGroup): string + { + return self::getPathTemplate('projectLocationAgentTransitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $transitionRouteGroup + * + * @return string The formatted transition_route_group resource. + */ + public static function transitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string + { + return self::getPathTemplate('transitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a webhook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $webhook + * + * @return string The formatted webhook resource. + */ + public static function webhookName(string $project, string $location, string $agent, string $webhook): string + { + return self::getPathTemplate('webhook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'webhook' => $webhook, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - entityType: projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type} + * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} + * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} + * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} + * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} + * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} + * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} + * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} + * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\PagesClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new PagesClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a page in the specified flow. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see PagesClient::createPageAsync()} . + * + * @example samples/V3/PagesClient/create_page.php + * + * @param CreatePageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Page + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPage(CreatePageRequest $request, array $callOptions = []): Page + { + return $this->startApiCall('CreatePage', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified page. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see PagesClient::deletePageAsync()} . + * + * @example samples/V3/PagesClient/delete_page.php + * + * @param DeletePageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePage(DeletePageRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeletePage', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified page. + * + * The async variant is {@see PagesClient::getPageAsync()} . + * + * @example samples/V3/PagesClient/get_page.php + * + * @param GetPageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Page + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPage(GetPageRequest $request, array $callOptions = []): Page + { + return $this->startApiCall('GetPage', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all pages in the specified flow. + * + * The async variant is {@see PagesClient::listPagesAsync()} . + * + * @example samples/V3/PagesClient/list_pages.php + * + * @param ListPagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPages(ListPagesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPages', $request, $callOptions); + } + + /** + * Updates the specified page. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is {@see PagesClient::updatePageAsync()} . + * + * @example samples/V3/PagesClient/update_page.php + * + * @param UpdatePageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Page + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePage(UpdatePageRequest $request, array $callOptions = []): Page + { + return $this->startApiCall('UpdatePage', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see PagesClient::getLocationAsync()} . + * + * @example samples/V3/PagesClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see PagesClient::listLocationsAsync()} . + * + * @example samples/V3/PagesClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PlaybooksClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PlaybooksClient.php new file mode 100644 index 000000000000..77f5b59d4249 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PlaybooksClient.php @@ -0,0 +1,838 @@ + createPlaybookAsync(CreatePlaybookRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPlaybookVersionAsync(CreatePlaybookVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePlaybookAsync(DeletePlaybookRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePlaybookVersionAsync(DeletePlaybookVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportPlaybookAsync(ExportPlaybookRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPlaybookAsync(GetPlaybookRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPlaybookVersionAsync(GetPlaybookVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface importPlaybookAsync(ImportPlaybookRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPlaybookVersionsAsync(ListPlaybookVersionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPlaybooksAsync(ListPlaybooksRequest $request, array $optionalArgs = []) + * @method PromiseInterface restorePlaybookVersionAsync(RestorePlaybookVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePlaybookAsync(UpdatePlaybookRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class PlaybooksClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Playbooks'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/playbooks_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/playbooks_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/playbooks_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/playbooks_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a example + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * @param string $example + * + * @return string The formatted example resource. + */ + public static function exampleName(string $project, string $location, string $agent, string $playbook, string $example): string + { + return self::getPathTemplate('example')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + 'example' => $example, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a flow + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * + * @return string The formatted flow resource. + */ + public static function flowName(string $project, string $location, string $agent, string $flow): string + { + return self::getPathTemplate('flow')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a generator + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $generator + * + * @return string The formatted generator resource. + */ + public static function generatorName(string $project, string $location, string $agent, string $generator): string + { + return self::getPathTemplate('generator')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'generator' => $generator, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * playbook_version resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * @param string $version + * + * @return string The formatted playbook_version resource. + */ + public static function playbookVersionName(string $project, string $location, string $agent, string $playbook, string $version): string + { + return self::getPathTemplate('playbookVersion')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a webhook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $webhook + * + * @return string The formatted webhook resource. + */ + public static function webhookName(string $project, string $location, string $agent, string $webhook): string + { + return self::getPathTemplate('webhook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'webhook' => $webhook, + ]); + } + + /** + * 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}/locations/{location}/agents/{agent} + * - example: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example} + * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} + * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} + * - playbookVersion: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} + * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\PlaybooksClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new PlaybooksClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a playbook in a specified agent. + * + * The async variant is {@see PlaybooksClient::createPlaybookAsync()} . + * + * @example samples/V3/PlaybooksClient/create_playbook.php + * + * @param CreatePlaybookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Playbook + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPlaybook(CreatePlaybookRequest $request, array $callOptions = []): Playbook + { + return $this->startApiCall('CreatePlaybook', $request, $callOptions)->wait(); + } + + /** + * Creates a version for the specified Playbook. + * + * The async variant is {@see PlaybooksClient::createPlaybookVersionAsync()} . + * + * @example samples/V3/PlaybooksClient/create_playbook_version.php + * + * @param CreatePlaybookVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PlaybookVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPlaybookVersion(CreatePlaybookVersionRequest $request, array $callOptions = []): PlaybookVersion + { + return $this->startApiCall('CreatePlaybookVersion', $request, $callOptions)->wait(); + } + + /** + * Deletes a specified playbook. + * + * The async variant is {@see PlaybooksClient::deletePlaybookAsync()} . + * + * @example samples/V3/PlaybooksClient/delete_playbook.php + * + * @param DeletePlaybookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePlaybook(DeletePlaybookRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeletePlaybook', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified version of the Playbook. + * + * The async variant is {@see PlaybooksClient::deletePlaybookVersionAsync()} . + * + * @example samples/V3/PlaybooksClient/delete_playbook_version.php + * + * @param DeletePlaybookVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePlaybookVersion(DeletePlaybookVersionRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeletePlaybookVersion', $request, $callOptions)->wait(); + } + + /** + * Exports the specified playbook to a binary file. + * + * Note that resources (e.g. examples, tools) that the playbook + * references will also be exported. + * + * The async variant is {@see PlaybooksClient::exportPlaybookAsync()} . + * + * @example samples/V3/PlaybooksClient/export_playbook.php + * + * @param ExportPlaybookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportPlaybook(ExportPlaybookRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportPlaybook', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified Playbook. + * + * The async variant is {@see PlaybooksClient::getPlaybookAsync()} . + * + * @example samples/V3/PlaybooksClient/get_playbook.php + * + * @param GetPlaybookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Playbook + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPlaybook(GetPlaybookRequest $request, array $callOptions = []): Playbook + { + return $this->startApiCall('GetPlaybook', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified version of the Playbook. + * + * The async variant is {@see PlaybooksClient::getPlaybookVersionAsync()} . + * + * @example samples/V3/PlaybooksClient/get_playbook_version.php + * + * @param GetPlaybookVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PlaybookVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPlaybookVersion(GetPlaybookVersionRequest $request, array $callOptions = []): PlaybookVersion + { + return $this->startApiCall('GetPlaybookVersion', $request, $callOptions)->wait(); + } + + /** + * Imports the specified playbook to the specified agent from a binary file. + * + * The async variant is {@see PlaybooksClient::importPlaybookAsync()} . + * + * @example samples/V3/PlaybooksClient/import_playbook.php + * + * @param ImportPlaybookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importPlaybook(ImportPlaybookRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportPlaybook', $request, $callOptions)->wait(); + } + + /** + * Lists versions for the specified Playbook. + * + * The async variant is {@see PlaybooksClient::listPlaybookVersionsAsync()} . + * + * @example samples/V3/PlaybooksClient/list_playbook_versions.php + * + * @param ListPlaybookVersionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPlaybookVersions(ListPlaybookVersionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPlaybookVersions', $request, $callOptions); + } + + /** + * Returns a list of playbooks in the specified agent. + * + * The async variant is {@see PlaybooksClient::listPlaybooksAsync()} . + * + * @example samples/V3/PlaybooksClient/list_playbooks.php + * + * @param ListPlaybooksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPlaybooks(ListPlaybooksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPlaybooks', $request, $callOptions); + } + + /** + * Retrieves the specified version of the Playbook and stores it as the + * current playbook draft, returning the playbook with resources updated. + * + * The async variant is {@see PlaybooksClient::restorePlaybookVersionAsync()} . + * + * @example samples/V3/PlaybooksClient/restore_playbook_version.php + * + * @param RestorePlaybookVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RestorePlaybookVersionResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function restorePlaybookVersion(RestorePlaybookVersionRequest $request, array $callOptions = []): RestorePlaybookVersionResponse + { + return $this->startApiCall('RestorePlaybookVersion', $request, $callOptions)->wait(); + } + + /** + * Updates the specified Playbook. + * + * The async variant is {@see PlaybooksClient::updatePlaybookAsync()} . + * + * @example samples/V3/PlaybooksClient/update_playbook.php + * + * @param UpdatePlaybookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Playbook + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePlaybook(UpdatePlaybookRequest $request, array $callOptions = []): Playbook + { + return $this->startApiCall('UpdatePlaybook', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see PlaybooksClient::getLocationAsync()} . + * + * @example samples/V3/PlaybooksClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see PlaybooksClient::listLocationsAsync()} . + * + * @example samples/V3/PlaybooksClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SecuritySettingsServiceClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SecuritySettingsServiceClient.php new file mode 100644 index 000000000000..4af557707106 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SecuritySettingsServiceClient.php @@ -0,0 +1,572 @@ + createSecuritySettingsAsync(CreateSecuritySettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSecuritySettingsAsync(DeleteSecuritySettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSecuritySettingsAsync(GetSecuritySettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSecuritySettingsAsync(ListSecuritySettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSecuritySettingsAsync(UpdateSecuritySettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class SecuritySettingsServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.SecuritySettingsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/security_settings_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/security_settings_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/security_settings_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/security_settings_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * deidentify_template resource. + * + * @param string $organization + * @param string $location + * @param string $deidentifyTemplate + * + * @return string The formatted deidentify_template resource. + */ + public static function deidentifyTemplateName(string $organization, string $location, string $deidentifyTemplate): string + { + return self::getPathTemplate('deidentifyTemplate')->render([ + 'organization' => $organization, + 'location' => $location, + 'deidentify_template' => $deidentifyTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * inspect_template resource. + * + * @param string $organization + * @param string $location + * @param string $inspectTemplate + * + * @return string The formatted inspect_template resource. + */ + public static function inspectTemplateName(string $organization, string $location, string $inspectTemplate): string + { + return self::getPathTemplate('inspectTemplate')->render([ + 'organization' => $organization, + 'location' => $location, + 'inspect_template' => $inspectTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_deidentify_template resource. + * + * @param string $organization + * @param string $location + * @param string $deidentifyTemplate + * + * @return string The formatted organization_location_deidentify_template resource. + */ + public static function organizationLocationDeidentifyTemplateName(string $organization, string $location, string $deidentifyTemplate): string + { + return self::getPathTemplate('organizationLocationDeidentifyTemplate')->render([ + 'organization' => $organization, + 'location' => $location, + 'deidentify_template' => $deidentifyTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_inspect_template resource. + * + * @param string $organization + * @param string $location + * @param string $inspectTemplate + * + * @return string The formatted organization_location_inspect_template resource. + */ + public static function organizationLocationInspectTemplateName(string $organization, string $location, string $inspectTemplate): string + { + return self::getPathTemplate('organizationLocationInspectTemplate')->render([ + 'organization' => $organization, + 'location' => $location, + 'inspect_template' => $inspectTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_deidentify_template resource. + * + * @param string $project + * @param string $location + * @param string $deidentifyTemplate + * + * @return string The formatted project_location_deidentify_template resource. + */ + public static function projectLocationDeidentifyTemplateName(string $project, string $location, string $deidentifyTemplate): string + { + return self::getPathTemplate('projectLocationDeidentifyTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'deidentify_template' => $deidentifyTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_inspect_template resource. + * + * @param string $project + * @param string $location + * @param string $inspectTemplate + * + * @return string The formatted project_location_inspect_template resource. + */ + public static function projectLocationInspectTemplateName(string $project, string $location, string $inspectTemplate): string + { + return self::getPathTemplate('projectLocationInspectTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'inspect_template' => $inspectTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * security_settings resource. + * + * @param string $project + * @param string $location + * @param string $securitySettings + * + * @return string The formatted security_settings resource. + */ + public static function securitySettingsName(string $project, string $location, string $securitySettings): string + { + return self::getPathTemplate('securitySettings')->render([ + 'project' => $project, + 'location' => $location, + 'security_settings' => $securitySettings, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - deidentifyTemplate: organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template} + * - inspectTemplate: organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template} + * - location: projects/{project}/locations/{location} + * - organizationLocationDeidentifyTemplate: organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template} + * - organizationLocationInspectTemplate: organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template} + * - projectLocationDeidentifyTemplate: projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template} + * - projectLocationInspectTemplate: projects/{project}/locations/{location}/inspectTemplates/{inspect_template} + * - securitySettings: projects/{project}/locations/{location}/securitySettings/{security_settings} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\SecuritySettingsServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SecuritySettingsServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Create security settings in the specified location. + * + * The async variant is + * {@see SecuritySettingsServiceClient::createSecuritySettingsAsync()} . + * + * @example samples/V3/SecuritySettingsServiceClient/create_security_settings.php + * + * @param CreateSecuritySettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SecuritySettings + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSecuritySettings(CreateSecuritySettingsRequest $request, array $callOptions = []): SecuritySettings + { + return $this->startApiCall('CreateSecuritySettings', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. + * + * The async variant is + * {@see SecuritySettingsServiceClient::deleteSecuritySettingsAsync()} . + * + * @example samples/V3/SecuritySettingsServiceClient/delete_security_settings.php + * + * @param DeleteSecuritySettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSecuritySettings(DeleteSecuritySettingsRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSecuritySettings', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. The + * returned settings may be stale by up to 1 minute. + * + * The async variant is + * {@see SecuritySettingsServiceClient::getSecuritySettingsAsync()} . + * + * @example samples/V3/SecuritySettingsServiceClient/get_security_settings.php + * + * @param GetSecuritySettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SecuritySettings + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSecuritySettings(GetSecuritySettingsRequest $request, array $callOptions = []): SecuritySettings + { + return $this->startApiCall('GetSecuritySettings', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all security settings in the specified location. + * + * The async variant is + * {@see SecuritySettingsServiceClient::listSecuritySettingsAsync()} . + * + * @example samples/V3/SecuritySettingsServiceClient/list_security_settings.php + * + * @param ListSecuritySettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSecuritySettings(ListSecuritySettingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSecuritySettings', $request, $callOptions); + } + + /** + * Updates the specified + * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. + * + * The async variant is + * {@see SecuritySettingsServiceClient::updateSecuritySettingsAsync()} . + * + * @example samples/V3/SecuritySettingsServiceClient/update_security_settings.php + * + * @param UpdateSecuritySettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SecuritySettings + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSecuritySettings(UpdateSecuritySettingsRequest $request, array $callOptions = []): SecuritySettings + { + return $this->startApiCall('UpdateSecuritySettings', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see SecuritySettingsServiceClient::getLocationAsync()} . + * + * @example samples/V3/SecuritySettingsServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see SecuritySettingsServiceClient::listLocationsAsync()} + * . + * + * @example samples/V3/SecuritySettingsServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionEntityTypesClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionEntityTypesClient.php new file mode 100644 index 000000000000..096686c892f3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionEntityTypesClient.php @@ -0,0 +1,552 @@ + createSessionEntityTypeAsync(CreateSessionEntityTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSessionEntityTypeAsync(DeleteSessionEntityTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSessionEntityTypeAsync(GetSessionEntityTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSessionEntityTypesAsync(ListSessionEntityTypesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSessionEntityTypeAsync(UpdateSessionEntityTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class SessionEntityTypesClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.SessionEntityTypes'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 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', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_environment_session resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * @param string $session + * + * @return string The formatted project_location_agent_environment_session resource. + */ + public static function projectLocationAgentEnvironmentSessionName(string $project, string $location, string $agent, string $environment, string $session): string + { + return self::getPathTemplate('projectLocationAgentEnvironmentSession')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_environment_session_entity_type resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * @param string $session + * @param string $entityType + * + * @return string The formatted project_location_agent_environment_session_entity_type resource. + */ + public static function projectLocationAgentEnvironmentSessionEntityTypeName(string $project, string $location, string $agent, string $environment, string $session, string $entityType): string + { + return self::getPathTemplate('projectLocationAgentEnvironmentSessionEntityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + 'session' => $session, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_session resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $session + * + * @return string The formatted project_location_agent_session resource. + */ + public static function projectLocationAgentSessionName(string $project, string $location, string $agent, string $session): string + { + return self::getPathTemplate('projectLocationAgentSession')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_session_entity_type resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $session + * @param string $entityType + * + * @return string The formatted project_location_agent_session_entity_type resource. + */ + public static function projectLocationAgentSessionEntityTypeName(string $project, string $location, string $agent, string $session, string $entityType): string + { + return self::getPathTemplate('projectLocationAgentSessionEntityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'session' => $session, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a session + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $session + * + * @return string The formatted session resource. + */ + public static function sessionName(string $project, string $location, string $agent, string $session): string + { + return self::getPathTemplate('session')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * session_entity_type resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $session + * @param string $entityType + * + * @return string The formatted session_entity_type resource. + */ + public static function sessionEntityTypeName(string $project, string $location, string $agent, string $session, string $entityType): string + { + return self::getPathTemplate('sessionEntityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + '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 + * - projectLocationAgentEnvironmentSession: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session} + * - projectLocationAgentEnvironmentSessionEntityType: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type} + * - projectLocationAgentSession: projects/{project}/locations/{location}/agents/{agent}/sessions/{session} + * - projectLocationAgentSessionEntityType: projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type} + * - session: projects/{project}/locations/{location}/agents/{agent}/sessions/{session} + * - sessionEntityType: projects/{project}/locations/{location}/agents/{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(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\SessionEntityTypesClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SessionEntityTypesClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a session entity type. + * + * The async variant is + * {@see SessionEntityTypesClient::createSessionEntityTypeAsync()} . + * + * @example samples/V3/SessionEntityTypesClient/create_session_entity_type.php + * + * @param CreateSessionEntityTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SessionEntityType + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSessionEntityType(CreateSessionEntityTypeRequest $request, array $callOptions = []): SessionEntityType + { + return $this->startApiCall('CreateSessionEntityType', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified session entity type. + * + * The async variant is + * {@see SessionEntityTypesClient::deleteSessionEntityTypeAsync()} . + * + * @example samples/V3/SessionEntityTypesClient/delete_session_entity_type.php + * + * @param DeleteSessionEntityTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSessionEntityType(DeleteSessionEntityTypeRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSessionEntityType', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified session entity type. + * + * The async variant is + * {@see SessionEntityTypesClient::getSessionEntityTypeAsync()} . + * + * @example samples/V3/SessionEntityTypesClient/get_session_entity_type.php + * + * @param GetSessionEntityTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SessionEntityType + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSessionEntityType(GetSessionEntityTypeRequest $request, array $callOptions = []): SessionEntityType + { + return $this->startApiCall('GetSessionEntityType', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all session entity types in the specified session. + * + * The async variant is + * {@see SessionEntityTypesClient::listSessionEntityTypesAsync()} . + * + * @example samples/V3/SessionEntityTypesClient/list_session_entity_types.php + * + * @param ListSessionEntityTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSessionEntityTypes(ListSessionEntityTypesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSessionEntityTypes', $request, $callOptions); + } + + /** + * Updates the specified session entity type. + * + * The async variant is + * {@see SessionEntityTypesClient::updateSessionEntityTypeAsync()} . + * + * @example samples/V3/SessionEntityTypesClient/update_session_entity_type.php + * + * @param UpdateSessionEntityTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SessionEntityType + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSessionEntityType(UpdateSessionEntityTypeRequest $request, array $callOptions = []): SessionEntityType + { + return $this->startApiCall('UpdateSessionEntityType', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see SessionEntityTypesClient::getLocationAsync()} . + * + * @example samples/V3/SessionEntityTypesClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see SessionEntityTypesClient::listLocationsAsync()} . + * + * @example samples/V3/SessionEntityTypesClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionsClient.php new file mode 100644 index 000000000000..7becb36bc0f9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionsClient.php @@ -0,0 +1,814 @@ + detectIntentAsync(DetectIntentRequest $request, array $optionalArgs = []) + * @method PromiseInterface fulfillIntentAsync(FulfillIntentRequest $request, array $optionalArgs = []) + * @method PromiseInterface matchIntentAsync(MatchIntentRequest $request, array $optionalArgs = []) + * @method PromiseInterface submitAnswerFeedbackAsync(SubmitAnswerFeedbackRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class SessionsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Sessions'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 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', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a data_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted data_store resource. + */ + public static function dataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('dataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a entity_type + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $entityType + * + * @return string The formatted entity_type resource. + */ + public static function entityTypeName(string $project, string $location, string $agent, string $entityType): string + { + return self::getPathTemplate('entityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a intent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $intent + * + * @return string The formatted intent resource. + */ + public static function intentName(string $project, string $location, string $agent, string $intent): string + { + return self::getPathTemplate('intent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'intent' => $intent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a page + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $page + * + * @return string The formatted page resource. + */ + public static function pageName(string $project, string $location, string $agent, string $flow, string $page): string + { + return self::getPathTemplate('page')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'page' => $page, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_environment_session resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * @param string $session + * + * @return string The formatted project_location_agent_environment_session resource. + */ + public static function projectLocationAgentEnvironmentSessionName(string $project, string $location, string $agent, string $environment, string $session): string + { + return self::getPathTemplate('projectLocationAgentEnvironmentSession')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_environment_session_entity_type resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * @param string $session + * @param string $entityType + * + * @return string The formatted project_location_agent_environment_session_entity_type resource. + */ + public static function projectLocationAgentEnvironmentSessionEntityTypeName(string $project, string $location, string $agent, string $environment, string $session, string $entityType): string + { + return self::getPathTemplate('projectLocationAgentEnvironmentSessionEntityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + 'session' => $session, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_session resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $session + * + * @return string The formatted project_location_agent_session resource. + */ + public static function projectLocationAgentSessionName(string $project, string $location, string $agent, string $session): string + { + return self::getPathTemplate('projectLocationAgentSession')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_session_entity_type resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $session + * @param string $entityType + * + * @return string The formatted project_location_agent_session_entity_type resource. + */ + public static function projectLocationAgentSessionEntityTypeName(string $project, string $location, string $agent, string $session, string $entityType): string + { + return self::getPathTemplate('projectLocationAgentSessionEntityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'session' => $session, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * + * @return string The formatted project_location_collection_data_store resource. + */ + public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string + { + return self::getPathTemplate('projectLocationCollectionDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted project_location_data_store resource. + */ + public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('projectLocationDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a session + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $session + * + * @return string The formatted session resource. + */ + public static function sessionName(string $project, string $location, string $agent, string $session): string + { + return self::getPathTemplate('session')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * session_entity_type resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $session + * @param string $entityType + * + * @return string The formatted session_entity_type resource. + */ + public static function sessionEntityTypeName(string $project, string $location, string $agent, string $session, string $entityType): string + { + return self::getPathTemplate('sessionEntityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'session' => $session, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a version + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $version + * + * @return string The formatted version resource. + */ + public static function versionName(string $project, string $location, string $agent, string $flow, string $version): string + { + return self::getPathTemplate('version')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + '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}/locations/{location}/agents/{agent} + * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - entityType: projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type} + * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} + * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} + * - projectLocationAgentEnvironmentSession: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session} + * - projectLocationAgentEnvironmentSessionEntityType: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type} + * - projectLocationAgentSession: projects/{project}/locations/{location}/agents/{agent}/sessions/{session} + * - projectLocationAgentSessionEntityType: projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type} + * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} + * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - session: projects/{project}/locations/{location}/agents/{agent}/sessions/{session} + * - sessionEntityType: projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} + * - version: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/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(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\SessionsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SessionsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Processes a natural language query and returns structured, actionable data + * as a result. This method is not idempotent, because it may cause session + * entity types to be updated, which in turn might affect results of future + * queries. + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * + * The async variant is {@see SessionsClient::detectIntentAsync()} . + * + * @example samples/V3/SessionsClient/detect_intent.php + * + * @param DetectIntentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DetectIntentResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function detectIntent(DetectIntentRequest $request, array $callOptions = []): DetectIntentResponse + { + return $this->startApiCall('DetectIntent', $request, $callOptions)->wait(); + } + + /** + * Fulfills a matched intent returned by + * [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent]. Must be + * called after + * [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent], with + * input from + * [MatchIntentResponse][google.cloud.dialogflow.cx.v3.MatchIntentResponse]. + * Otherwise, the behavior is undefined. + * + * The async variant is {@see SessionsClient::fulfillIntentAsync()} . + * + * @example samples/V3/SessionsClient/fulfill_intent.php + * + * @param FulfillIntentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FulfillIntentResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fulfillIntent(FulfillIntentRequest $request, array $callOptions = []): FulfillIntentResponse + { + return $this->startApiCall('FulfillIntent', $request, $callOptions)->wait(); + } + + /** + * Returns preliminary intent match results, doesn't change the session + * status. + * + * The async variant is {@see SessionsClient::matchIntentAsync()} . + * + * @example samples/V3/SessionsClient/match_intent.php + * + * @param MatchIntentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MatchIntentResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function matchIntent(MatchIntentRequest $request, array $callOptions = []): MatchIntentResponse + { + return $this->startApiCall('MatchIntent', $request, $callOptions)->wait(); + } + + /** + * Processes a natural language query and returns structured, actionable data + * as a result through server-side streaming. Server-side streaming allows + * Dialogflow to send [partial + * responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) + * earlier in a single request. + * + * @example samples/V3/SessionsClient/server_streaming_detect_intent.php + * + * @param DetectIntentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function serverStreamingDetectIntent(DetectIntentRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('ServerStreamingDetectIntent', $request, $callOptions); + } + + /** + * 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). + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * + * @example samples/V3/SessionsClient/streaming_detect_intent.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function streamingDetectIntent(array $callOptions = []): BidiStream + { + return $this->startApiCall('StreamingDetectIntent', null, $callOptions); + } + + /** + * Updates the feedback received from the user for a single turn of the bot + * response. + * + * The async variant is {@see SessionsClient::submitAnswerFeedbackAsync()} . + * + * @example samples/V3/SessionsClient/submit_answer_feedback.php + * + * @param SubmitAnswerFeedbackRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AnswerFeedback + * + * @throws ApiException Thrown if the API call fails. + */ + public function submitAnswerFeedback(SubmitAnswerFeedbackRequest $request, array $callOptions = []): AnswerFeedback + { + return $this->startApiCall('SubmitAnswerFeedback', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see SessionsClient::getLocationAsync()} . + * + * @example samples/V3/SessionsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see SessionsClient::listLocationsAsync()} . + * + * @example samples/V3/SessionsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TestCasesClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TestCasesClient.php new file mode 100644 index 000000000000..04a7add718aa --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TestCasesClient.php @@ -0,0 +1,1041 @@ + batchDeleteTestCasesAsync(BatchDeleteTestCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchRunTestCasesAsync(BatchRunTestCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface calculateCoverageAsync(CalculateCoverageRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTestCaseAsync(CreateTestCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportTestCasesAsync(ExportTestCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTestCaseAsync(GetTestCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTestCaseResultAsync(GetTestCaseResultRequest $request, array $optionalArgs = []) + * @method PromiseInterface importTestCasesAsync(ImportTestCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTestCaseResultsAsync(ListTestCaseResultsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTestCasesAsync(ListTestCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface runTestCaseAsync(RunTestCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTestCaseAsync(UpdateTestCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class TestCasesClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.TestCases'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/test_cases_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/test_cases_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/test_cases_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/test_cases_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a entity_type + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $entityType + * + * @return string The formatted entity_type resource. + */ + public static function entityTypeName(string $project, string $location, string $agent, string $entityType): string + { + return self::getPathTemplate('entityType')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'entity_type' => $entityType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a environment + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $environment + * + * @return string The formatted environment resource. + */ + public static function environmentName(string $project, string $location, string $agent, string $environment): string + { + return self::getPathTemplate('environment')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a flow + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * + * @return string The formatted flow resource. + */ + public static function flowName(string $project, string $location, string $agent, string $flow): string + { + return self::getPathTemplate('flow')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a generator + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $generator + * + * @return string The formatted generator resource. + */ + public static function generatorName(string $project, string $location, string $agent, string $generator): string + { + return self::getPathTemplate('generator')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'generator' => $generator, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a intent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $intent + * + * @return string The formatted intent resource. + */ + public static function intentName(string $project, string $location, string $agent, string $intent): string + { + return self::getPathTemplate('intent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'intent' => $intent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a page + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $page + * + * @return string The formatted page resource. + */ + public static function pageName(string $project, string $location, string $agent, string $flow, string $page): string + { + return self::getPathTemplate('page')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'page' => $page, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_flow_transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $transitionRouteGroup + * + * @return string The formatted project_location_agent_flow_transition_route_group resource. + */ + public static function projectLocationAgentFlowTransitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string + { + return self::getPathTemplate('projectLocationAgentFlowTransitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $transitionRouteGroup + * + * @return string The formatted project_location_agent_transition_route_group resource. + */ + public static function projectLocationAgentTransitionRouteGroupName(string $project, string $location, string $agent, string $transitionRouteGroup): string + { + return self::getPathTemplate('projectLocationAgentTransitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a test_case + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $testCase + * + * @return string The formatted test_case resource. + */ + public static function testCaseName(string $project, string $location, string $agent, string $testCase): string + { + return self::getPathTemplate('testCase')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'test_case' => $testCase, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * test_case_result resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $testCase + * @param string $result + * + * @return string The formatted test_case_result resource. + */ + public static function testCaseResultName(string $project, string $location, string $agent, string $testCase, string $result): string + { + return self::getPathTemplate('testCaseResult')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'test_case' => $testCase, + 'result' => $result, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $transitionRouteGroup + * + * @return string The formatted transition_route_group resource. + */ + public static function transitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string + { + return self::getPathTemplate('transitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a webhook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $webhook + * + * @return string The formatted webhook resource. + */ + public static function webhookName(string $project, string $location, string $agent, string $webhook): string + { + return self::getPathTemplate('webhook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'webhook' => $webhook, + ]); + } + + /** + * 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}/locations/{location}/agents/{agent} + * - entityType: projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type} + * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} + * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} + * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} + * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} + * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} + * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} + * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} + * - testCase: projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case} + * - testCaseResult: projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} + * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} + * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\TestCasesClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new TestCasesClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Batch deletes test cases. + * + * The async variant is {@see TestCasesClient::batchDeleteTestCasesAsync()} . + * + * @example samples/V3/TestCasesClient/batch_delete_test_cases.php + * + * @param BatchDeleteTestCasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDeleteTestCases(BatchDeleteTestCasesRequest $request, array $callOptions = []): void + { + $this->startApiCall('BatchDeleteTestCases', $request, $callOptions)->wait(); + } + + /** + * Kicks off a batch run of test cases. + * + * 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`: + * [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata] + * - `response`: + * [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse] + * + * The async variant is {@see TestCasesClient::batchRunTestCasesAsync()} . + * + * @example samples/V3/TestCasesClient/batch_run_test_cases.php + * + * @param BatchRunTestCasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchRunTestCases(BatchRunTestCasesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchRunTestCases', $request, $callOptions)->wait(); + } + + /** + * Calculates the test coverage for an agent. + * + * The async variant is {@see TestCasesClient::calculateCoverageAsync()} . + * + * @example samples/V3/TestCasesClient/calculate_coverage.php + * + * @param CalculateCoverageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CalculateCoverageResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function calculateCoverage(CalculateCoverageRequest $request, array $callOptions = []): CalculateCoverageResponse + { + return $this->startApiCall('CalculateCoverage', $request, $callOptions)->wait(); + } + + /** + * Creates a test case for the given agent. + * + * The async variant is {@see TestCasesClient::createTestCaseAsync()} . + * + * @example samples/V3/TestCasesClient/create_test_case.php + * + * @param CreateTestCaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTestCase(CreateTestCaseRequest $request, array $callOptions = []): TestCase + { + return $this->startApiCall('CreateTestCase', $request, $callOptions)->wait(); + } + + /** + * Exports the test cases under the agent to a Cloud Storage bucket or a local + * file. Filter can be applied to export a subset of test cases. + * + * 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`: + * [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata] + * - `response`: + * [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse] + * + * The async variant is {@see TestCasesClient::exportTestCasesAsync()} . + * + * @example samples/V3/TestCasesClient/export_test_cases.php + * + * @param ExportTestCasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportTestCases(ExportTestCasesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportTestCases', $request, $callOptions)->wait(); + } + + /** + * Gets a test case. + * + * The async variant is {@see TestCasesClient::getTestCaseAsync()} . + * + * @example samples/V3/TestCasesClient/get_test_case.php + * + * @param GetTestCaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTestCase(GetTestCaseRequest $request, array $callOptions = []): TestCase + { + return $this->startApiCall('GetTestCase', $request, $callOptions)->wait(); + } + + /** + * Gets a test case result. + * + * The async variant is {@see TestCasesClient::getTestCaseResultAsync()} . + * + * @example samples/V3/TestCasesClient/get_test_case_result.php + * + * @param GetTestCaseResultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestCaseResult + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTestCaseResult(GetTestCaseResultRequest $request, array $callOptions = []): TestCaseResult + { + return $this->startApiCall('GetTestCaseResult', $request, $callOptions)->wait(); + } + + /** + * Imports the test cases from a Cloud Storage bucket or a local file. It + * always creates new test cases and won't overwrite any existing ones. The + * provided ID in the imported test case is neglected. + * + * 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`: + * [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata] + * - `response`: + * [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse] + * + * The async variant is {@see TestCasesClient::importTestCasesAsync()} . + * + * @example samples/V3/TestCasesClient/import_test_cases.php + * + * @param ImportTestCasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importTestCases(ImportTestCasesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportTestCases', $request, $callOptions)->wait(); + } + + /** + * Fetches the list of run results for the given test case. A maximum of 100 + * results are kept for each test case. + * + * The async variant is {@see TestCasesClient::listTestCaseResultsAsync()} . + * + * @example samples/V3/TestCasesClient/list_test_case_results.php + * + * @param ListTestCaseResultsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTestCaseResults(ListTestCaseResultsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTestCaseResults', $request, $callOptions); + } + + /** + * Fetches a list of test cases for a given agent. + * + * The async variant is {@see TestCasesClient::listTestCasesAsync()} . + * + * @example samples/V3/TestCasesClient/list_test_cases.php + * + * @param ListTestCasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTestCases(ListTestCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTestCases', $request, $callOptions); + } + + /** + * Kicks off a test case run. + * + * 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`: + * [RunTestCaseMetadata][google.cloud.dialogflow.cx.v3.RunTestCaseMetadata] + * - `response`: + * [RunTestCaseResponse][google.cloud.dialogflow.cx.v3.RunTestCaseResponse] + * + * The async variant is {@see TestCasesClient::runTestCaseAsync()} . + * + * @example samples/V3/TestCasesClient/run_test_case.php + * + * @param RunTestCaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runTestCase(RunTestCaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RunTestCase', $request, $callOptions)->wait(); + } + + /** + * Updates the specified test case. + * + * The async variant is {@see TestCasesClient::updateTestCaseAsync()} . + * + * @example samples/V3/TestCasesClient/update_test_case.php + * + * @param UpdateTestCaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTestCase(UpdateTestCaseRequest $request, array $callOptions = []): TestCase + { + return $this->startApiCall('UpdateTestCase', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see TestCasesClient::getLocationAsync()} . + * + * @example samples/V3/TestCasesClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see TestCasesClient::listLocationsAsync()} . + * + * @example samples/V3/TestCasesClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ToolsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ToolsClient.php new file mode 100644 index 000000000000..838b519e52f1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ToolsClient.php @@ -0,0 +1,658 @@ + createToolAsync(CreateToolRequest $request, array $optionalArgs = []) + * @method PromiseInterface createToolVersionAsync(CreateToolVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteToolAsync(DeleteToolRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteToolVersionAsync(DeleteToolVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getToolAsync(GetToolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getToolVersionAsync(GetToolVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listToolVersionsAsync(ListToolVersionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listToolsAsync(ListToolsRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreToolVersionAsync(RestoreToolVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateToolAsync(UpdateToolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class ToolsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Tools'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/tools_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/tools_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/tools_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/tools_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a service + * resource. + * + * @param string $project + * @param string $location + * @param string $namespace + * @param string $service + * + * @return string The formatted service resource. + */ + public static function serviceName(string $project, string $location, string $namespace, string $service): string + { + return self::getPathTemplate('service')->render([ + 'project' => $project, + 'location' => $location, + 'namespace' => $namespace, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tool_version + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * @param string $version + * + * @return string The formatted tool_version resource. + */ + public static function toolVersionName(string $project, string $location, string $agent, string $tool, string $version): string + { + return self::getPathTemplate('toolVersion')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + '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}/locations/{location}/agents/{agent} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} + * - toolVersion: projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/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(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\ToolsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ToolsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified + * agent. + * + * The async variant is {@see ToolsClient::createToolAsync()} . + * + * @example samples/V3/ToolsClient/create_tool.php + * + * @param CreateToolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tool + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTool(CreateToolRequest $request, array $callOptions = []): Tool + { + return $this->startApiCall('CreateTool', $request, $callOptions)->wait(); + } + + /** + * Creates a version for the specified + * [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + * The async variant is {@see ToolsClient::createToolVersionAsync()} . + * + * @example samples/V3/ToolsClient/create_tool_version.php + * + * @param CreateToolVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ToolVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function createToolVersion(CreateToolVersionRequest $request, array $callOptions = []): ToolVersion + { + return $this->startApiCall('CreateToolVersion', $request, $callOptions)->wait(); + } + + /** + * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + * The async variant is {@see ToolsClient::deleteToolAsync()} . + * + * @example samples/V3/ToolsClient/delete_tool.php + * + * @param DeleteToolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTool(DeleteToolRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTool', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified version of the + * [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + * The async variant is {@see ToolsClient::deleteToolVersionAsync()} . + * + * @example samples/V3/ToolsClient/delete_tool_version.php + * + * @param DeleteToolVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteToolVersion(DeleteToolVersionRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteToolVersion', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + * The async variant is {@see ToolsClient::getToolAsync()} . + * + * @example samples/V3/ToolsClient/get_tool.php + * + * @param GetToolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tool + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTool(GetToolRequest $request, array $callOptions = []): Tool + { + return $this->startApiCall('GetTool', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified version of the + * [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + * The async variant is {@see ToolsClient::getToolVersionAsync()} . + * + * @example samples/V3/ToolsClient/get_tool_version.php + * + * @param GetToolVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ToolVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function getToolVersion(GetToolVersionRequest $request, array $callOptions = []): ToolVersion + { + return $this->startApiCall('GetToolVersion', $request, $callOptions)->wait(); + } + + /** + * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + * The async variant is {@see ToolsClient::listToolVersionsAsync()} . + * + * @example samples/V3/ToolsClient/list_tool_versions.php + * + * @param ListToolVersionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listToolVersions(ListToolVersionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListToolVersions', $request, $callOptions); + } + + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the + * specified agent. + * + * The async variant is {@see ToolsClient::listToolsAsync()} . + * + * @example samples/V3/ToolsClient/list_tools.php + * + * @param ListToolsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTools(ListToolsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTools', $request, $callOptions); + } + + /** + * Retrieves the specified version of the Tool and stores it as the + * current tool draft, returning the tool with resources updated. + * + * The async variant is {@see ToolsClient::restoreToolVersionAsync()} . + * + * @example samples/V3/ToolsClient/restore_tool_version.php + * + * @param RestoreToolVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RestoreToolVersionResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function restoreToolVersion(RestoreToolVersionRequest $request, array $callOptions = []): RestoreToolVersionResponse + { + return $this->startApiCall('RestoreToolVersion', $request, $callOptions)->wait(); + } + + /** + * Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + * The async variant is {@see ToolsClient::updateToolAsync()} . + * + * @example samples/V3/ToolsClient/update_tool.php + * + * @param UpdateToolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tool + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTool(UpdateToolRequest $request, array $callOptions = []): Tool + { + return $this->startApiCall('UpdateTool', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ToolsClient::getLocationAsync()} . + * + * @example samples/V3/ToolsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ToolsClient::listLocationsAsync()} . + * + * @example samples/V3/ToolsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TransitionRouteGroupsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TransitionRouteGroupsClient.php new file mode 100644 index 000000000000..cabb0527c30b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TransitionRouteGroupsClient.php @@ -0,0 +1,651 @@ + createTransitionRouteGroupAsync(CreateTransitionRouteGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTransitionRouteGroupAsync(DeleteTransitionRouteGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTransitionRouteGroupAsync(GetTransitionRouteGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTransitionRouteGroupsAsync(ListTransitionRouteGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTransitionRouteGroupAsync(UpdateTransitionRouteGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class TransitionRouteGroupsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.TransitionRouteGroups'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/transition_route_groups_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/transition_route_groups_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/transition_route_groups_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/transition_route_groups_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a flow + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * + * @return string The formatted flow resource. + */ + public static function flowName(string $project, string $location, string $agent, string $flow): string + { + return self::getPathTemplate('flow')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a generator + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $generator + * + * @return string The formatted generator resource. + */ + public static function generatorName(string $project, string $location, string $agent, string $generator): string + { + return self::getPathTemplate('generator')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'generator' => $generator, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a intent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $intent + * + * @return string The formatted intent resource. + */ + public static function intentName(string $project, string $location, string $agent, string $intent): string + { + return self::getPathTemplate('intent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'intent' => $intent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a page + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $page + * + * @return string The formatted page resource. + */ + public static function pageName(string $project, string $location, string $agent, string $flow, string $page): string + { + return self::getPathTemplate('page')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'page' => $page, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_flow_transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $transitionRouteGroup + * + * @return string The formatted project_location_agent_flow_transition_route_group resource. + */ + public static function projectLocationAgentFlowTransitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string + { + return self::getPathTemplate('projectLocationAgentFlowTransitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_agent_transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $transitionRouteGroup + * + * @return string The formatted project_location_agent_transition_route_group resource. + */ + public static function projectLocationAgentTransitionRouteGroupName(string $project, string $location, string $agent, string $transitionRouteGroup): string + { + return self::getPathTemplate('projectLocationAgentTransitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * transition_route_group resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $transitionRouteGroup + * + * @return string The formatted transition_route_group resource. + */ + public static function transitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string + { + return self::getPathTemplate('transitionRouteGroup')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + 'transition_route_group' => $transitionRouteGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a webhook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $webhook + * + * @return string The formatted webhook resource. + */ + public static function webhookName(string $project, string $location, string $agent, string $webhook): string + { + return self::getPathTemplate('webhook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'webhook' => $webhook, + ]); + } + + /** + * 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}/locations/{location}/agents/{agent} + * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} + * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} + * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} + * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} + * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} + * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} + * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} + * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new TransitionRouteGroupsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] + * in the specified flow. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is + * {@see TransitionRouteGroupsClient::createTransitionRouteGroupAsync()} . + * + * @example samples/V3/TransitionRouteGroupsClient/create_transition_route_group.php + * + * @param CreateTransitionRouteGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TransitionRouteGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTransitionRouteGroup(CreateTransitionRouteGroupRequest $request, array $callOptions = []): TransitionRouteGroup + { + return $this->startApiCall('CreateTransitionRouteGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is + * {@see TransitionRouteGroupsClient::deleteTransitionRouteGroupAsync()} . + * + * @example samples/V3/TransitionRouteGroupsClient/delete_transition_route_group.php + * + * @param DeleteTransitionRouteGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTransitionRouteGroup(DeleteTransitionRouteGroupRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTransitionRouteGroup', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * + * The async variant is + * {@see TransitionRouteGroupsClient::getTransitionRouteGroupAsync()} . + * + * @example samples/V3/TransitionRouteGroupsClient/get_transition_route_group.php + * + * @param GetTransitionRouteGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TransitionRouteGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTransitionRouteGroup(GetTransitionRouteGroupRequest $request, array $callOptions = []): TransitionRouteGroup + { + return $this->startApiCall('GetTransitionRouteGroup', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all transition route groups in the specified flow. + * + * The async variant is + * {@see TransitionRouteGroupsClient::listTransitionRouteGroupsAsync()} . + * + * @example samples/V3/TransitionRouteGroupsClient/list_transition_route_groups.php + * + * @param ListTransitionRouteGroupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTransitionRouteGroups(ListTransitionRouteGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTransitionRouteGroups', $request, $callOptions); + } + + /** + * Updates the specified + * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. + * + * Note: You should always train a flow prior to sending it queries. See the + * [training + * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + * + * The async variant is + * {@see TransitionRouteGroupsClient::updateTransitionRouteGroupAsync()} . + * + * @example samples/V3/TransitionRouteGroupsClient/update_transition_route_group.php + * + * @param UpdateTransitionRouteGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TransitionRouteGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTransitionRouteGroup(UpdateTransitionRouteGroupRequest $request, array $callOptions = []): TransitionRouteGroup + { + return $this->startApiCall('UpdateTransitionRouteGroup', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see TransitionRouteGroupsClient::getLocationAsync()} . + * + * @example samples/V3/TransitionRouteGroupsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see TransitionRouteGroupsClient::listLocationsAsync()} . + * + * @example samples/V3/TransitionRouteGroupsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/VersionsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/VersionsClient.php new file mode 100644 index 000000000000..3116ae9414ba --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/VersionsClient.php @@ -0,0 +1,582 @@ + compareVersionsAsync(CompareVersionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVersionAsync(CreateVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteVersionAsync(DeleteVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVersionAsync(GetVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVersionsAsync(ListVersionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface loadVersionAsync(LoadVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateVersionAsync(UpdateVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class VersionsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Versions'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 $operationsClient; + + 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', + ], + ], + ]; + } + + /** + * 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 = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a flow + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * + * @return string The formatted flow resource. + */ + public static function flowName(string $project, string $location, string $agent, string $flow): string + { + return self::getPathTemplate('flow')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a version + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $flow + * @param string $version + * + * @return string The formatted version resource. + */ + public static function versionName(string $project, string $location, string $agent, string $flow, string $version): string + { + return self::getPathTemplate('version')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'flow' => $flow, + '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 + * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} + * - version: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/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(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\VersionsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new VersionsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Compares the specified base version with target version. + * + * The async variant is {@see VersionsClient::compareVersionsAsync()} . + * + * @example samples/V3/VersionsClient/compare_versions.php + * + * @param CompareVersionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CompareVersionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function compareVersions(CompareVersionsRequest $request, array $callOptions = []): CompareVersionsResponse + { + return $this->startApiCall('CompareVersions', $request, $callOptions)->wait(); + } + + /** + * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified + * [Flow][google.cloud.dialogflow.cx.v3.Flow]. + * + * 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`: + * [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version] + * + * The async variant is {@see VersionsClient::createVersionAsync()} . + * + * @example samples/V3/VersionsClient/create_version.php + * + * @param CreateVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createVersion(CreateVersionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateVersion', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified [Version][google.cloud.dialogflow.cx.v3.Version]. + * + * The async variant is {@see VersionsClient::deleteVersionAsync()} . + * + * @example samples/V3/VersionsClient/delete_version.php + * + * @param DeleteVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteVersion(DeleteVersionRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteVersion', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified [Version][google.cloud.dialogflow.cx.v3.Version]. + * + * The async variant is {@see VersionsClient::getVersionAsync()} . + * + * @example samples/V3/VersionsClient/get_version.php + * + * @param GetVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Version + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVersion(GetVersionRequest $request, array $callOptions = []): Version + { + return $this->startApiCall('GetVersion', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all versions in the specified + * [Flow][google.cloud.dialogflow.cx.v3.Flow]. + * + * The async variant is {@see VersionsClient::listVersionsAsync()} . + * + * @example samples/V3/VersionsClient/list_versions.php + * + * @param ListVersionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listVersions(ListVersionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVersions', $request, $callOptions); + } + + /** + * Loads resources in the specified version to the draft flow. + * + * 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`: 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 async variant is {@see VersionsClient::loadVersionAsync()} . + * + * @example samples/V3/VersionsClient/load_version.php + * + * @param LoadVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function loadVersion(LoadVersionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('LoadVersion', $request, $callOptions)->wait(); + } + + /** + * Updates the specified [Version][google.cloud.dialogflow.cx.v3.Version]. + * + * The async variant is {@see VersionsClient::updateVersionAsync()} . + * + * @example samples/V3/VersionsClient/update_version.php + * + * @param UpdateVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Version + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateVersion(UpdateVersionRequest $request, array $callOptions = []): Version + { + return $this->startApiCall('UpdateVersion', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see VersionsClient::getLocationAsync()} . + * + * @example samples/V3/VersionsClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see VersionsClient::listLocationsAsync()} . + * + * @example samples/V3/VersionsClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/WebhooksClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/WebhooksClient.php new file mode 100644 index 000000000000..f60e858b1ca3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/WebhooksClient.php @@ -0,0 +1,488 @@ + createWebhookAsync(CreateWebhookRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteWebhookAsync(DeleteWebhookRequest $request, array $optionalArgs = []) + * @method PromiseInterface getWebhookAsync(GetWebhookRequest $request, array $optionalArgs = []) + * @method PromiseInterface listWebhooksAsync(ListWebhooksRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateWebhookAsync(UpdateWebhookRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class WebhooksClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Webhooks'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private 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 function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/webhooks_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/webhooks_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/webhooks_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/webhooks_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a agent + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * + * @return string The formatted agent resource. + */ + public static function agentName(string $project, string $location, string $agent): string + { + return self::getPathTemplate('agent')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a service + * resource. + * + * @param string $project + * @param string $location + * @param string $namespace + * @param string $service + * + * @return string The formatted service resource. + */ + public static function serviceName(string $project, string $location, string $namespace, string $service): string + { + return self::getPathTemplate('service')->render([ + 'project' => $project, + 'location' => $location, + 'namespace' => $namespace, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a webhook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $webhook + * + * @return string The formatted webhook resource. + */ + public static function webhookName(string $project, string $location, string $agent, string $webhook): string + { + return self::getPathTemplate('webhook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'webhook' => $webhook, + ]); + } + + /** + * 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}/locations/{location}/agents/{agent} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} + * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Dialogflow\Cx\V3\WebhooksClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new WebhooksClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a webhook in the specified agent. + * + * The async variant is {@see WebhooksClient::createWebhookAsync()} . + * + * @example samples/V3/WebhooksClient/create_webhook.php + * + * @param CreateWebhookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Webhook + * + * @throws ApiException Thrown if the API call fails. + */ + public function createWebhook(CreateWebhookRequest $request, array $callOptions = []): Webhook + { + return $this->startApiCall('CreateWebhook', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified webhook. + * + * The async variant is {@see WebhooksClient::deleteWebhookAsync()} . + * + * @example samples/V3/WebhooksClient/delete_webhook.php + * + * @param DeleteWebhookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteWebhook(DeleteWebhookRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteWebhook', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified webhook. + * + * The async variant is {@see WebhooksClient::getWebhookAsync()} . + * + * @example samples/V3/WebhooksClient/get_webhook.php + * + * @param GetWebhookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Webhook + * + * @throws ApiException Thrown if the API call fails. + */ + public function getWebhook(GetWebhookRequest $request, array $callOptions = []): Webhook + { + return $this->startApiCall('GetWebhook', $request, $callOptions)->wait(); + } + + /** + * Returns the list of all webhooks in the specified agent. + * + * The async variant is {@see WebhooksClient::listWebhooksAsync()} . + * + * @example samples/V3/WebhooksClient/list_webhooks.php + * + * @param ListWebhooksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listWebhooks(ListWebhooksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListWebhooks', $request, $callOptions); + } + + /** + * Updates the specified webhook. + * + * The async variant is {@see WebhooksClient::updateWebhookAsync()} . + * + * @example samples/V3/WebhooksClient/update_webhook.php + * + * @param UpdateWebhookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Webhook + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateWebhook(UpdateWebhookRequest $request, array $callOptions = []): Webhook + { + return $this->startApiCall('UpdateWebhook', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see WebhooksClient::getLocationAsync()} . + * + * @example samples/V3/WebhooksClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see WebhooksClient::listLocationsAsync()} . + * + * @example samples/V3/WebhooksClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/gapic_metadata.json b/owl-bot-staging/DialogflowCx/v3/src/V3/gapic_metadata.json new file mode 100644 index 000000000000..dcab1052a7c5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/gapic_metadata.json @@ -0,0 +1,1074 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.dialogflow.cx.v3", + "libraryPackage": "Google\\Cloud\\Dialogflow\\Cx\\V3", + "services": { + "Pages": { + "clients": { + "grpc": { + "libraryClient": "PagesGapicClient", + "rpcs": { + "CreatePage": { + "methods": [ + "createPage" + ] + }, + "DeletePage": { + "methods": [ + "deletePage" + ] + }, + "GetPage": { + "methods": [ + "getPage" + ] + }, + "ListPages": { + "methods": [ + "listPages" + ] + }, + "UpdatePage": { + "methods": [ + "updatePage" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Flows": { + "clients": { + "grpc": { + "libraryClient": "FlowsGapicClient", + "rpcs": { + "CreateFlow": { + "methods": [ + "createFlow" + ] + }, + "DeleteFlow": { + "methods": [ + "deleteFlow" + ] + }, + "ExportFlow": { + "methods": [ + "exportFlow" + ] + }, + "GetFlow": { + "methods": [ + "getFlow" + ] + }, + "GetFlowValidationResult": { + "methods": [ + "getFlowValidationResult" + ] + }, + "ImportFlow": { + "methods": [ + "importFlow" + ] + }, + "ListFlows": { + "methods": [ + "listFlows" + ] + }, + "TrainFlow": { + "methods": [ + "trainFlow" + ] + }, + "UpdateFlow": { + "methods": [ + "updateFlow" + ] + }, + "ValidateFlow": { + "methods": [ + "validateFlow" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Agents": { + "clients": { + "grpc": { + "libraryClient": "AgentsGapicClient", + "rpcs": { + "CreateAgent": { + "methods": [ + "createAgent" + ] + }, + "DeleteAgent": { + "methods": [ + "deleteAgent" + ] + }, + "ExportAgent": { + "methods": [ + "exportAgent" + ] + }, + "GetAgent": { + "methods": [ + "getAgent" + ] + }, + "GetAgentValidationResult": { + "methods": [ + "getAgentValidationResult" + ] + }, + "GetGenerativeSettings": { + "methods": [ + "getGenerativeSettings" + ] + }, + "ListAgents": { + "methods": [ + "listAgents" + ] + }, + "RestoreAgent": { + "methods": [ + "restoreAgent" + ] + }, + "UpdateAgent": { + "methods": [ + "updateAgent" + ] + }, + "UpdateGenerativeSettings": { + "methods": [ + "updateGenerativeSettings" + ] + }, + "ValidateAgent": { + "methods": [ + "validateAgent" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Changelogs": { + "clients": { + "grpc": { + "libraryClient": "ChangelogsGapicClient", + "rpcs": { + "GetChangelog": { + "methods": [ + "getChangelog" + ] + }, + "ListChangelogs": { + "methods": [ + "listChangelogs" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Deployments": { + "clients": { + "grpc": { + "libraryClient": "DeploymentsGapicClient", + "rpcs": { + "GetDeployment": { + "methods": [ + "getDeployment" + ] + }, + "ListDeployments": { + "methods": [ + "listDeployments" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "EntityTypes": { + "clients": { + "grpc": { + "libraryClient": "EntityTypesGapicClient", + "rpcs": { + "CreateEntityType": { + "methods": [ + "createEntityType" + ] + }, + "DeleteEntityType": { + "methods": [ + "deleteEntityType" + ] + }, + "ExportEntityTypes": { + "methods": [ + "exportEntityTypes" + ] + }, + "GetEntityType": { + "methods": [ + "getEntityType" + ] + }, + "ImportEntityTypes": { + "methods": [ + "importEntityTypes" + ] + }, + "ListEntityTypes": { + "methods": [ + "listEntityTypes" + ] + }, + "UpdateEntityType": { + "methods": [ + "updateEntityType" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Intents": { + "clients": { + "grpc": { + "libraryClient": "IntentsGapicClient", + "rpcs": { + "CreateIntent": { + "methods": [ + "createIntent" + ] + }, + "DeleteIntent": { + "methods": [ + "deleteIntent" + ] + }, + "ExportIntents": { + "methods": [ + "exportIntents" + ] + }, + "GetIntent": { + "methods": [ + "getIntent" + ] + }, + "ImportIntents": { + "methods": [ + "importIntents" + ] + }, + "ListIntents": { + "methods": [ + "listIntents" + ] + }, + "UpdateIntent": { + "methods": [ + "updateIntent" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "SessionEntityTypes": { + "clients": { + "grpc": { + "libraryClient": "SessionEntityTypesGapicClient", + "rpcs": { + "CreateSessionEntityType": { + "methods": [ + "createSessionEntityType" + ] + }, + "DeleteSessionEntityType": { + "methods": [ + "deleteSessionEntityType" + ] + }, + "GetSessionEntityType": { + "methods": [ + "getSessionEntityType" + ] + }, + "ListSessionEntityTypes": { + "methods": [ + "listSessionEntityTypes" + ] + }, + "UpdateSessionEntityType": { + "methods": [ + "updateSessionEntityType" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Sessions": { + "clients": { + "grpc": { + "libraryClient": "SessionsGapicClient", + "rpcs": { + "DetectIntent": { + "methods": [ + "detectIntent" + ] + }, + "FulfillIntent": { + "methods": [ + "fulfillIntent" + ] + }, + "MatchIntent": { + "methods": [ + "matchIntent" + ] + }, + "ServerStreamingDetectIntent": { + "methods": [ + "serverStreamingDetectIntent" + ] + }, + "StreamingDetectIntent": { + "methods": [ + "streamingDetectIntent" + ] + }, + "SubmitAnswerFeedback": { + "methods": [ + "submitAnswerFeedback" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "TransitionRouteGroups": { + "clients": { + "grpc": { + "libraryClient": "TransitionRouteGroupsGapicClient", + "rpcs": { + "CreateTransitionRouteGroup": { + "methods": [ + "createTransitionRouteGroup" + ] + }, + "DeleteTransitionRouteGroup": { + "methods": [ + "deleteTransitionRouteGroup" + ] + }, + "GetTransitionRouteGroup": { + "methods": [ + "getTransitionRouteGroup" + ] + }, + "ListTransitionRouteGroups": { + "methods": [ + "listTransitionRouteGroups" + ] + }, + "UpdateTransitionRouteGroup": { + "methods": [ + "updateTransitionRouteGroup" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "TestCases": { + "clients": { + "grpc": { + "libraryClient": "TestCasesGapicClient", + "rpcs": { + "BatchDeleteTestCases": { + "methods": [ + "batchDeleteTestCases" + ] + }, + "BatchRunTestCases": { + "methods": [ + "batchRunTestCases" + ] + }, + "CalculateCoverage": { + "methods": [ + "calculateCoverage" + ] + }, + "CreateTestCase": { + "methods": [ + "createTestCase" + ] + }, + "ExportTestCases": { + "methods": [ + "exportTestCases" + ] + }, + "GetTestCase": { + "methods": [ + "getTestCase" + ] + }, + "GetTestCaseResult": { + "methods": [ + "getTestCaseResult" + ] + }, + "ImportTestCases": { + "methods": [ + "importTestCases" + ] + }, + "ListTestCaseResults": { + "methods": [ + "listTestCaseResults" + ] + }, + "ListTestCases": { + "methods": [ + "listTestCases" + ] + }, + "RunTestCase": { + "methods": [ + "runTestCase" + ] + }, + "UpdateTestCase": { + "methods": [ + "updateTestCase" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Webhooks": { + "clients": { + "grpc": { + "libraryClient": "WebhooksGapicClient", + "rpcs": { + "CreateWebhook": { + "methods": [ + "createWebhook" + ] + }, + "DeleteWebhook": { + "methods": [ + "deleteWebhook" + ] + }, + "GetWebhook": { + "methods": [ + "getWebhook" + ] + }, + "ListWebhooks": { + "methods": [ + "listWebhooks" + ] + }, + "UpdateWebhook": { + "methods": [ + "updateWebhook" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Environments": { + "clients": { + "grpc": { + "libraryClient": "EnvironmentsGapicClient", + "rpcs": { + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "DeployFlow": { + "methods": [ + "deployFlow" + ] + }, + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "ListContinuousTestResults": { + "methods": [ + "listContinuousTestResults" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments" + ] + }, + "LookupEnvironmentHistory": { + "methods": [ + "lookupEnvironmentHistory" + ] + }, + "RunContinuousTest": { + "methods": [ + "runContinuousTest" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Examples": { + "clients": { + "grpc": { + "libraryClient": "ExamplesGapicClient", + "rpcs": { + "CreateExample": { + "methods": [ + "createExample" + ] + }, + "DeleteExample": { + "methods": [ + "deleteExample" + ] + }, + "GetExample": { + "methods": [ + "getExample" + ] + }, + "ListExamples": { + "methods": [ + "listExamples" + ] + }, + "UpdateExample": { + "methods": [ + "updateExample" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Experiments": { + "clients": { + "grpc": { + "libraryClient": "ExperimentsGapicClient", + "rpcs": { + "CreateExperiment": { + "methods": [ + "createExperiment" + ] + }, + "DeleteExperiment": { + "methods": [ + "deleteExperiment" + ] + }, + "GetExperiment": { + "methods": [ + "getExperiment" + ] + }, + "ListExperiments": { + "methods": [ + "listExperiments" + ] + }, + "StartExperiment": { + "methods": [ + "startExperiment" + ] + }, + "StopExperiment": { + "methods": [ + "stopExperiment" + ] + }, + "UpdateExperiment": { + "methods": [ + "updateExperiment" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Generators": { + "clients": { + "grpc": { + "libraryClient": "GeneratorsGapicClient", + "rpcs": { + "CreateGenerator": { + "methods": [ + "createGenerator" + ] + }, + "DeleteGenerator": { + "methods": [ + "deleteGenerator" + ] + }, + "GetGenerator": { + "methods": [ + "getGenerator" + ] + }, + "ListGenerators": { + "methods": [ + "listGenerators" + ] + }, + "UpdateGenerator": { + "methods": [ + "updateGenerator" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Playbooks": { + "clients": { + "grpc": { + "libraryClient": "PlaybooksGapicClient", + "rpcs": { + "CreatePlaybook": { + "methods": [ + "createPlaybook" + ] + }, + "CreatePlaybookVersion": { + "methods": [ + "createPlaybookVersion" + ] + }, + "DeletePlaybook": { + "methods": [ + "deletePlaybook" + ] + }, + "DeletePlaybookVersion": { + "methods": [ + "deletePlaybookVersion" + ] + }, + "ExportPlaybook": { + "methods": [ + "exportPlaybook" + ] + }, + "GetPlaybook": { + "methods": [ + "getPlaybook" + ] + }, + "GetPlaybookVersion": { + "methods": [ + "getPlaybookVersion" + ] + }, + "ImportPlaybook": { + "methods": [ + "importPlaybook" + ] + }, + "ListPlaybookVersions": { + "methods": [ + "listPlaybookVersions" + ] + }, + "ListPlaybooks": { + "methods": [ + "listPlaybooks" + ] + }, + "RestorePlaybookVersion": { + "methods": [ + "restorePlaybookVersion" + ] + }, + "UpdatePlaybook": { + "methods": [ + "updatePlaybook" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "SecuritySettingsService": { + "clients": { + "grpc": { + "libraryClient": "SecuritySettingsServiceGapicClient", + "rpcs": { + "CreateSecuritySettings": { + "methods": [ + "createSecuritySettings" + ] + }, + "DeleteSecuritySettings": { + "methods": [ + "deleteSecuritySettings" + ] + }, + "GetSecuritySettings": { + "methods": [ + "getSecuritySettings" + ] + }, + "ListSecuritySettings": { + "methods": [ + "listSecuritySettings" + ] + }, + "UpdateSecuritySettings": { + "methods": [ + "updateSecuritySettings" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Tools": { + "clients": { + "grpc": { + "libraryClient": "ToolsGapicClient", + "rpcs": { + "CreateTool": { + "methods": [ + "createTool" + ] + }, + "CreateToolVersion": { + "methods": [ + "createToolVersion" + ] + }, + "DeleteTool": { + "methods": [ + "deleteTool" + ] + }, + "DeleteToolVersion": { + "methods": [ + "deleteToolVersion" + ] + }, + "GetTool": { + "methods": [ + "getTool" + ] + }, + "GetToolVersion": { + "methods": [ + "getToolVersion" + ] + }, + "ListToolVersions": { + "methods": [ + "listToolVersions" + ] + }, + "ListTools": { + "methods": [ + "listTools" + ] + }, + "RestoreToolVersion": { + "methods": [ + "restoreToolVersion" + ] + }, + "UpdateTool": { + "methods": [ + "updateTool" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Versions": { + "clients": { + "grpc": { + "libraryClient": "VersionsGapicClient", + "rpcs": { + "CompareVersions": { + "methods": [ + "compareVersions" + ] + }, + "CreateVersion": { + "methods": [ + "createVersion" + ] + }, + "DeleteVersion": { + "methods": [ + "deleteVersion" + ] + }, + "GetVersion": { + "methods": [ + "getVersion" + ] + }, + "ListVersions": { + "methods": [ + "listVersions" + ] + }, + "LoadVersion": { + "methods": [ + "loadVersion" + ] + }, + "UpdateVersion": { + "methods": [ + "updateVersion" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_client_config.json new file mode 100644 index 000000000000..6e6a2706469a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_client_config.json @@ -0,0 +1,111 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Agents": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_2_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 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000 + } + }, + "methods": { + "CreateAgent": { + "timeout_millis": 180000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "DeleteAgent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ExportAgent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAgent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAgentValidationResult": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetGenerativeSettings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAgents": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RestoreAgent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAgent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateGenerativeSettings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ValidateAgent": { + "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/DialogflowCx/v3/src/V3/resources/agents_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_descriptor_config.php new file mode 100644 index 000000000000..f9a2a58b4427 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_descriptor_config.php @@ -0,0 +1,229 @@ + [ + 'google.cloud.dialogflow.cx.v3.Agents' => [ + 'ExportAgent' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportAgentResponse', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RestoreAgent' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateAgent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Agent', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAgent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAgent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Agent', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAgentValidationResult' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\AgentValidationResult', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGenerativeSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAgents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAgents', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListAgentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAgent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Agent', + 'headerParams' => [ + [ + 'keyName' => 'agent.name', + 'fieldAccessors' => [ + 'getAgent', + 'getName', + ], + ], + ], + ], + 'UpdateGenerativeSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings', + 'headerParams' => [ + [ + 'keyName' => 'generative_settings.name', + 'fieldAccessors' => [ + 'getGenerativeSettings', + 'getName', + ], + ], + ], + ], + 'ValidateAgent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\AgentValidationResult', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'agentGenerativeSettings' => 'projects/{project}/locations/{location}/agents/{agent}/generativeSettings', + 'agentValidationResult' => 'projects/{project}/locations/{location}/agents/{agent}/validationResult', + 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', + 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', + 'location' => 'projects/{project}/locations/{location}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', + 'securitySettings' => 'projects/{project}/locations/{location}/securitySettings/{security_settings}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_rest_client_config.php new file mode 100644 index 000000000000..4a43a9e8dccf --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_rest_client_config.php @@ -0,0 +1,238 @@ + [ + 'google.cloud.dialogflow.cx.v3.Agents' => [ + 'CreateAgent' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/agents', + 'body' => 'agent', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAgent' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportAgent' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*}:export', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAgent' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAgentValidationResult' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/validationResult}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGenerativeSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/generativeSettings}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'language_code', + ], + ], + 'ListAgents' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/agents', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RestoreAgent' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*}:restore', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAgent' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{agent.name=projects/*/locations/*/agents/*}', + 'body' => 'agent', + 'placeholders' => [ + 'agent.name' => [ + 'getters' => [ + 'getAgent', + 'getName', + ], + ], + ], + ], + 'UpdateGenerativeSettings' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{generative_settings.name=projects/*/locations/*/agents/*/generativeSettings}', + 'body' => 'generative_settings', + 'placeholders' => [ + 'generative_settings.name' => [ + 'getters' => [ + 'getGenerativeSettings', + 'getName', + ], + ], + ], + ], + 'ValidateAgent' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*}:validate', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_client_config.json new file mode 100644 index 000000000000..461d673ac3fb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_client_config.json @@ -0,0 +1,54 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Changelogs": { + "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": { + "GetChangelog": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListChangelogs": { + "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/DialogflowCx/v3/src/V3/resources/changelogs_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_descriptor_config.php new file mode 100644 index 000000000000..a76e1a3f3888 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_descriptor_config.php @@ -0,0 +1,98 @@ + [ + 'google.cloud.dialogflow.cx.v3.Changelogs' => [ + 'GetChangelog' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Changelog', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListChangelogs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getChangelogs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListChangelogsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'changelog' => 'projects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_rest_client_config.php new file mode 100644 index 000000000000..713e19c44001 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_rest_client_config.php @@ -0,0 +1,128 @@ + [ + 'google.cloud.dialogflow.cx.v3.Changelogs' => [ + 'GetChangelog' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/changelogs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListChangelogs' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/changelogs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_client_config.json new file mode 100644 index 000000000000..26672cbce877 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_client_config.json @@ -0,0 +1,54 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Deployments": { + "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": { + "GetDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDeployments": { + "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/DialogflowCx/v3/src/V3/resources/deployments_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_descriptor_config.php new file mode 100644 index 000000000000..a6a3e82b62a1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_descriptor_config.php @@ -0,0 +1,98 @@ + [ + 'google.cloud.dialogflow.cx.v3.Deployments' => [ + 'GetDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListDeploymentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'deployment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment}', + 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_rest_client_config.php new file mode 100644 index 000000000000..2eb404c8038e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_rest_client_config.php @@ -0,0 +1,128 @@ + [ + 'google.cloud.dialogflow.cx.v3.Deployments' => [ + 'GetDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/deployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*}/deployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_client_config.json new file mode 100644 index 000000000000..711216d4ef7a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.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": { + "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" + }, + "ExportEntityTypes": { + "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" + }, + "ImportEntityTypes": { + "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/DialogflowCx/v3/src/V3/resources/entity_types_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_descriptor_config.php new file mode 100644 index 000000000000..70f052906d18 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_descriptor_config.php @@ -0,0 +1,173 @@ + [ + 'google.cloud.dialogflow.cx.v3.EntityTypes' => [ + 'ExportEntityTypes' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportEntityTypesResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportEntityTypesMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ImportEntityTypes' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateEntityType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\EntityType', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEntityType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEntityType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\EntityType', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListEntityTypes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEntityTypes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListEntityTypesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEntityType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\EntityType', + 'headerParams' => [ + [ + 'keyName' => 'entity_type.name', + 'fieldAccessors' => [ + 'getEntityType', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_rest_client_config.php new file mode 100644 index 000000000000..df623476b216 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_rest_client_config.php @@ -0,0 +1,188 @@ + [ + 'google.cloud.dialogflow.cx.v3.EntityTypes' => [ + 'CreateEntityType' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/entityTypes', + 'body' => 'entity_type', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEntityType' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/entityTypes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportEntityTypes' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/entityTypes:export', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetEntityType' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/entityTypes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportEntityTypes' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/entityTypes:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEntityTypes' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/entityTypes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEntityType' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{entity_type.name=projects/*/locations/*/agents/*/entityTypes/*}', + 'body' => 'entity_type', + 'placeholders' => [ + 'entity_type.name' => [ + 'getters' => [ + 'getEntityType', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_client_config.json new file mode 100644 index 000000000000..796e276121f4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_client_config.json @@ -0,0 +1,89 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.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" + }, + "DeployFlow": { + "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" + }, + "ListContinuousTestResults": { + "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" + }, + "LookupEnvironmentHistory": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RunContinuousTest": { + "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/DialogflowCx/v3/src/V3/resources/environments_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_descriptor_config.php new file mode 100644 index 000000000000..730f7fadca1e --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_descriptor_config.php @@ -0,0 +1,232 @@ + [ + 'google.cloud.dialogflow.cx.v3.Environments' => [ + 'CreateEnvironment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\Environment', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeployFlow' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\DeployFlowResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\DeployFlowMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'environment', + 'fieldAccessors' => [ + 'getEnvironment', + ], + ], + ], + ], + 'RunContinuousTest' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\RunContinuousTestResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\RunContinuousTestMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'environment', + 'fieldAccessors' => [ + 'getEnvironment', + ], + ], + ], + ], + 'UpdateEnvironment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\Environment', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'environment.name', + 'fieldAccessors' => [ + 'getEnvironment', + 'getName', + ], + ], + ], + ], + 'DeleteEnvironment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEnvironment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Environment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListContinuousTestResults' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getContinuousTestResults', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListContinuousTestResultsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEnvironments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEnvironments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListEnvironmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'LookupEnvironmentHistory' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEnvironments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\LookupEnvironmentHistoryResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', + 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', + 'testCase' => 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}', + 'version' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}', + 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_rest_client_config.php new file mode 100644 index 000000000000..65241b2cfc5f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_rest_client_config.php @@ -0,0 +1,213 @@ + [ + 'google.cloud.dialogflow.cx.v3.Environments' => [ + 'CreateEnvironment' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/environments', + 'body' => 'environment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEnvironment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeployFlow' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{environment=projects/*/locations/*/agents/*/environments/*}:deployFlow', + 'body' => '*', + 'placeholders' => [ + 'environment' => [ + 'getters' => [ + 'getEnvironment', + ], + ], + ], + ], + 'GetEnvironment' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListContinuousTestResults' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*}/continuousTestResults', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEnvironments' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/environments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'LookupEnvironmentHistory' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*}:lookupEnvironmentHistory', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RunContinuousTest' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{environment=projects/*/locations/*/agents/*/environments/*}:runContinuousTest', + 'body' => '*', + 'placeholders' => [ + 'environment' => [ + 'getters' => [ + 'getEnvironment', + ], + ], + ], + ], + 'UpdateEnvironment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{environment.name=projects/*/locations/*/agents/*/environments/*}', + 'body' => 'environment', + 'placeholders' => [ + 'environment.name' => [ + 'getters' => [ + 'getEnvironment', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_client_config.json new file mode 100644 index 000000000000..9713062df156 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Examples": { + "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": { + "CreateExample": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteExample": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetExample": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListExamples": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateExample": { + "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/DialogflowCx/v3/src/V3/resources/examples_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_descriptor_config.php new file mode 100644 index 000000000000..e2b7a18f3df4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_descriptor_config.php @@ -0,0 +1,137 @@ + [ + 'google.cloud.dialogflow.cx.v3.Examples' => [ + 'CreateExample' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Example', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteExample' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetExample' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Example', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListExamples' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExamples', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListExamplesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateExample' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Example', + 'headerParams' => [ + [ + 'keyName' => 'example.name', + 'fieldAccessors' => [ + 'getExample', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'example' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}', + 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_rest_client_config.php new file mode 100644 index 000000000000..7c218b650388 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_rest_client_config.php @@ -0,0 +1,164 @@ + [ + 'google.cloud.dialogflow.cx.v3.Examples' => [ + 'CreateExample' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples', + 'body' => 'example', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteExample' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetExample' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListExamples' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateExample' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{example.name=projects/*/locations/*/agents/*/playbooks/*/examples/*}', + 'body' => 'example', + 'placeholders' => [ + 'example.name' => [ + 'getters' => [ + 'getExample', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_client_config.json new file mode 100644 index 000000000000..56432396eb7d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Experiments": { + "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": { + "CreateExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListExperiments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "StartExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "StopExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateExperiment": { + "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/DialogflowCx/v3/src/V3/resources/experiments_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_descriptor_config.php new file mode 100644 index 000000000000..94efc825aae1 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_descriptor_config.php @@ -0,0 +1,160 @@ + [ + 'google.cloud.dialogflow.cx.v3.Experiments' => [ + 'CreateExperiment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Experiment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteExperiment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetExperiment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Experiment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListExperiments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExperiments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListExperimentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'StartExperiment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Experiment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopExperiment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Experiment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateExperiment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Experiment', + 'headerParams' => [ + [ + 'keyName' => 'experiment.name', + 'fieldAccessors' => [ + 'getExperiment', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', + 'experiment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}', + 'version' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_rest_client_config.php new file mode 100644 index 000000000000..37ac7502949a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_rest_client_config.php @@ -0,0 +1,191 @@ + [ + 'google.cloud.dialogflow.cx.v3.Experiments' => [ + 'CreateExperiment' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments', + 'body' => 'experiment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteExperiment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetExperiment' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListExperiments' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'StartExperiment' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopExperiment' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateExperiment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}', + 'body' => 'experiment', + 'placeholders' => [ + 'experiment.name' => [ + 'getters' => [ + 'getExperiment', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_client_config.json new file mode 100644 index 000000000000..34414d0ba155 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Flows": { + "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": { + "CreateFlow": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteFlow": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ExportFlow": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetFlow": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetFlowValidationResult": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportFlow": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListFlows": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TrainFlow": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateFlow": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ValidateFlow": { + "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/DialogflowCx/v3/src/V3/resources/flows_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_descriptor_config.php new file mode 100644 index 000000000000..c9b4589806f8 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_descriptor_config.php @@ -0,0 +1,226 @@ + [ + 'google.cloud.dialogflow.cx.v3.Flows' => [ + 'ExportFlow' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportFlowResponse', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportFlow' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportFlowResponse', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'TrainFlow' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateFlow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Flow', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteFlow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetFlow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Flow', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetFlowValidationResult' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\FlowValidationResult', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListFlows' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFlows', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListFlowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateFlow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Flow', + 'headerParams' => [ + [ + 'keyName' => 'flow.name', + 'fieldAccessors' => [ + 'getFlow', + 'getName', + ], + ], + ], + ], + 'ValidateFlow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\FlowValidationResult', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', + 'flowValidationResult' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult', + 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', + 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', + 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', + 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', + 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', + 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', + 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_rest_client_config.php new file mode 100644 index 000000000000..5953d8fa7125 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_rest_client_config.php @@ -0,0 +1,223 @@ + [ + 'google.cloud.dialogflow.cx.v3.Flows' => [ + 'CreateFlow' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/flows', + 'body' => 'flow', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteFlow' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportFlow' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*}:export', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetFlow' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetFlowValidationResult' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/validationResult}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportFlow' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/flows:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFlows' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/flows', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'TrainFlow' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*}:train', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateFlow' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{flow.name=projects/*/locations/*/agents/*/flows/*}', + 'body' => 'flow', + 'placeholders' => [ + 'flow.name' => [ + 'getters' => [ + 'getFlow', + 'getName', + ], + ], + ], + ], + 'ValidateFlow' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*}:validate', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_client_config.json new file mode 100644 index 000000000000..905579ccb0b3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Generators": { + "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": { + "CreateGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGenerators": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateGenerator": { + "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/DialogflowCx/v3/src/V3/resources/generators_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_descriptor_config.php new file mode 100644 index 000000000000..accf414bf235 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_descriptor_config.php @@ -0,0 +1,135 @@ + [ + 'google.cloud.dialogflow.cx.v3.Generators' => [ + 'CreateGenerator' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Generator', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteGenerator' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGenerator' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Generator', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListGenerators' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGenerators', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListGeneratorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateGenerator' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Generator', + 'headerParams' => [ + [ + 'keyName' => 'generator.name', + 'fieldAccessors' => [ + 'getGenerator', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_rest_client_config.php new file mode 100644 index 000000000000..2b401a303f35 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_rest_client_config.php @@ -0,0 +1,164 @@ + [ + 'google.cloud.dialogflow.cx.v3.Generators' => [ + 'CreateGenerator' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/generators', + 'body' => 'generator', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteGenerator' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/generators/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGenerator' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/generators/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListGenerators' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/generators', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateGenerator' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{generator.name=projects/*/locations/*/agents/*/generators/*}', + 'body' => 'generator', + 'placeholders' => [ + 'generator.name' => [ + 'getters' => [ + 'getGenerator', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_client_config.json new file mode 100644 index 000000000000..f13061abec95 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.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": { + "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" + }, + "ExportIntents": { + "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" + }, + "ImportIntents": { + "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/DialogflowCx/v3/src/V3/resources/intents_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_descriptor_config.php new file mode 100644 index 000000000000..e411e5240835 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_descriptor_config.php @@ -0,0 +1,174 @@ + [ + 'google.cloud.dialogflow.cx.v3.Intents' => [ + 'ExportIntents' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportIntentsResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportIntentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ImportIntents' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportIntentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIntent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Intent', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteIntent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIntent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Intent', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListIntents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIntents', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListIntentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateIntent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Intent', + 'headerParams' => [ + [ + 'keyName' => 'intent.name', + 'fieldAccessors' => [ + 'getIntent', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', + 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_rest_client_config.php new file mode 100644 index 000000000000..a930c4204d51 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_rest_client_config.php @@ -0,0 +1,188 @@ + [ + 'google.cloud.dialogflow.cx.v3.Intents' => [ + 'CreateIntent' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/intents', + 'body' => 'intent', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteIntent' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/intents/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportIntents' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/intents:export', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetIntent' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/intents/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportIntents' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/intents:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIntents' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/intents', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateIntent' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{intent.name=projects/*/locations/*/agents/*/intents/*}', + 'body' => 'intent', + 'placeholders' => [ + 'intent.name' => [ + 'getters' => [ + 'getIntent', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_client_config.json new file mode 100644 index 000000000000..101abc3bad3d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Pages": { + "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": { + "CreatePage": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeletePage": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPage": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPages": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdatePage": { + "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/DialogflowCx/v3/src/V3/resources/pages_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_descriptor_config.php new file mode 100644 index 000000000000..cf6f2bb8781b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_descriptor_config.php @@ -0,0 +1,144 @@ + [ + 'google.cloud.dialogflow.cx.v3.Pages' => [ + 'CreatePage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Page', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Page', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListPages' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPages', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListPagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdatePage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Page', + 'headerParams' => [ + [ + 'keyName' => 'page.name', + 'fieldAccessors' => [ + 'getPage', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', + 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', + 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', + 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', + 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', + 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', + 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', + 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', + 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_rest_client_config.php new file mode 100644 index 000000000000..89d37f9728c2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_rest_client_config.php @@ -0,0 +1,164 @@ + [ + 'google.cloud.dialogflow.cx.v3.Pages' => [ + 'CreatePage' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/pages', + 'body' => 'page', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePage' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/pages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPage' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/pages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListPages' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/pages', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdatePage' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{page.name=projects/*/locations/*/agents/*/flows/*/pages/*}', + 'body' => 'page', + 'placeholders' => [ + 'page.name' => [ + 'getters' => [ + 'getPage', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_client_config.json new file mode 100644 index 000000000000..7ff03da48168 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_client_config.json @@ -0,0 +1,104 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Playbooks": { + "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": { + "CreatePlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreatePlaybookVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeletePlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeletePlaybookVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ExportPlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPlaybookVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportPlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPlaybookVersions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPlaybooks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RestorePlaybookVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdatePlaybook": { + "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/DialogflowCx/v3/src/V3/resources/playbooks_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_descriptor_config.php new file mode 100644 index 000000000000..53299fed9f5d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_descriptor_config.php @@ -0,0 +1,247 @@ + [ + 'google.cloud.dialogflow.cx.v3.Playbooks' => [ + 'ExportPlaybook' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportPlaybookResponse', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportPlaybook' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportPlaybookResponse', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePlaybook' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Playbook', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePlaybookVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\PlaybookVersion', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePlaybook' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeletePlaybookVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPlaybook' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Playbook', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPlaybookVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\PlaybookVersion', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListPlaybookVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPlaybookVersions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListPlaybookVersionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPlaybooks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPlaybooks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListPlaybooksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RestorePlaybookVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\RestorePlaybookVersionResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdatePlaybook' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Playbook', + 'headerParams' => [ + [ + 'keyName' => 'playbook.name', + 'fieldAccessors' => [ + 'getPlaybook', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'example' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}', + 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', + 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', + 'playbookVersion' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', + 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_rest_client_config.php new file mode 100644 index 000000000000..6fe36a1ac3eb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_rest_client_config.php @@ -0,0 +1,245 @@ + [ + 'google.cloud.dialogflow.cx.v3.Playbooks' => [ + 'CreatePlaybook' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/playbooks', + 'body' => 'playbook', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePlaybookVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions', + 'body' => 'playbook_version', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePlaybook' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/playbooks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeletePlaybookVersion' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportPlaybook' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/playbooks/*}:export', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPlaybook' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/playbooks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPlaybookVersion' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportPlaybook' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/playbooks:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPlaybookVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPlaybooks' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/playbooks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RestorePlaybookVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}:restore', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdatePlaybook' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{playbook.name=projects/*/locations/*/agents/*/playbooks/*}', + 'body' => 'playbook', + 'placeholders' => [ + 'playbook.name' => [ + 'getters' => [ + 'getPlaybook', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_client_config.json new file mode 100644 index 000000000000..d7a9b0cad5fa --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.SecuritySettingsService": { + "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": { + "CreateSecuritySettings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteSecuritySettings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSecuritySettings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSecuritySettings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSecuritySettings": { + "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/DialogflowCx/v3/src/V3/resources/security_settings_service_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_descriptor_config.php new file mode 100644 index 000000000000..a318f3dc00b7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_descriptor_config.php @@ -0,0 +1,141 @@ + [ + 'google.cloud.dialogflow.cx.v3.SecuritySettingsService' => [ + 'CreateSecuritySettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SecuritySettings', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSecuritySettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSecuritySettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SecuritySettings', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSecuritySettings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSecuritySettings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListSecuritySettingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSecuritySettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SecuritySettings', + 'headerParams' => [ + [ + 'keyName' => 'security_settings.name', + 'fieldAccessors' => [ + 'getSecuritySettings', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'deidentifyTemplate' => 'organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}', + 'inspectTemplate' => 'organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}', + 'location' => 'projects/{project}/locations/{location}', + 'organizationLocationDeidentifyTemplate' => 'organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}', + 'organizationLocationInspectTemplate' => 'organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}', + 'projectLocationDeidentifyTemplate' => 'projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}', + 'projectLocationInspectTemplate' => 'projects/{project}/locations/{location}/inspectTemplates/{inspect_template}', + 'securitySettings' => 'projects/{project}/locations/{location}/securitySettings/{security_settings}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_rest_client_config.php new file mode 100644 index 000000000000..76ff1c530191 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_rest_client_config.php @@ -0,0 +1,167 @@ + [ + 'google.cloud.dialogflow.cx.v3.SecuritySettingsService' => [ + 'CreateSecuritySettings' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/securitySettings', + 'body' => 'security_settings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSecuritySettings' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/securitySettings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSecuritySettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/securitySettings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSecuritySettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/securitySettings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSecuritySettings' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}', + 'body' => 'security_settings', + 'placeholders' => [ + 'security_settings.name' => [ + 'getters' => [ + 'getSecuritySettings', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_client_config.json new file mode 100644 index 000000000000..b113f5c237cb --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.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/DialogflowCx/v3/src/V3/resources/session_entity_types_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_descriptor_config.php new file mode 100644 index 000000000000..a3c5818d2005 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_descriptor_config.php @@ -0,0 +1,139 @@ + [ + 'google.cloud.dialogflow.cx.v3.SessionEntityTypes' => [ + 'CreateSessionEntityType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SessionEntityType', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSessionEntityType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSessionEntityType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SessionEntityType', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSessionEntityTypes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSessionEntityTypes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListSessionEntityTypesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSessionEntityType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SessionEntityType', + 'headerParams' => [ + [ + 'keyName' => 'session_entity_type.name', + 'fieldAccessors' => [ + 'getSessionEntityType', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'projectLocationAgentEnvironmentSession' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}', + 'projectLocationAgentEnvironmentSessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}', + 'projectLocationAgentSession' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}', + 'projectLocationAgentSessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}', + 'session' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}', + 'sessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_rest_client_config.php new file mode 100644 index 000000000000..ff4d1a89b087 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_rest_client_config.php @@ -0,0 +1,196 @@ + [ + 'google.cloud.dialogflow.cx.v3.SessionEntityTypes' => [ + 'CreateSessionEntityType' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/sessions/*}/entityTypes', + 'body' => 'session_entity_type', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*/sessions/*}/entityTypes', + 'body' => 'session_entity_type', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSessionEntityType' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSessionEntityType' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSessionEntityTypes' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/sessions/*}/entityTypes', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*/sessions/*}/entityTypes', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSessionEntityType' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{session_entity_type.name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}', + 'body' => 'session_entity_type', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{session_entity_type.name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}', + 'body' => 'session_entity_type', + ], + ], + 'placeholders' => [ + 'session_entity_type.name' => [ + 'getters' => [ + 'getSessionEntityType', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_client_config.json new file mode 100644 index 000000000000..367966f3b8d0 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_client_config.json @@ -0,0 +1,92 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Sessions": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_3_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_3_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_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "FulfillIntent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "MatchIntent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ServerStreamingDetectIntent": { + "timeout_millis": 220000 + }, + "StreamingDetectIntent": { + "timeout_millis": 220000 + }, + "SubmitAnswerFeedback": { + "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/DialogflowCx/v3/src/V3/resources/sessions_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_descriptor_config.php new file mode 100644 index 000000000000..b97fa6bde0f7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_descriptor_config.php @@ -0,0 +1,151 @@ + [ + 'google.cloud.dialogflow.cx.v3.Sessions' => [ + 'DetectIntent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse', + 'headerParams' => [ + [ + 'keyName' => 'session', + 'fieldAccessors' => [ + 'getSession', + ], + ], + ], + ], + 'FulfillIntent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\FulfillIntentResponse', + 'headerParams' => [ + [ + 'keyName' => 'match_intent_request.session', + 'fieldAccessors' => [ + 'getMatchIntentRequest', + 'getSession', + ], + ], + ], + ], + 'MatchIntent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\MatchIntentResponse', + 'headerParams' => [ + [ + 'keyName' => 'session', + 'fieldAccessors' => [ + 'getSession', + ], + ], + ], + ], + 'ServerStreamingDetectIntent' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse', + 'headerParams' => [ + [ + 'keyName' => 'session', + 'fieldAccessors' => [ + 'getSession', + ], + ], + ], + ], + 'StreamingDetectIntent' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\StreamingDetectIntentResponse', + ], + 'SubmitAnswerFeedback' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback', + 'headerParams' => [ + [ + 'keyName' => 'session', + 'fieldAccessors' => [ + 'getSession', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', + 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', + 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', + 'projectLocationAgentEnvironmentSession' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}', + 'projectLocationAgentEnvironmentSessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}', + 'projectLocationAgentSession' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}', + 'projectLocationAgentSessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}', + 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', + 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'session' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}', + 'sessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', + 'version' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_rest_client_config.php new file mode 100644 index 000000000000..cc3c24d84c97 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_rest_client_config.php @@ -0,0 +1,195 @@ + [ + 'google.cloud.dialogflow.cx.v3.Sessions' => [ + 'DetectIntent' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/sessions/*}:detectIntent', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:detectIntent', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'session' => [ + 'getters' => [ + 'getSession', + ], + ], + ], + ], + 'FulfillIntent' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{match_intent_request.session=projects/*/locations/*/agents/*/sessions/*}:fulfillIntent', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{match_intent_request.session=projects/*/locations/*/agents/*/environments/*/sessions/*}:fulfillIntent', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'match_intent_request.session' => [ + 'getters' => [ + 'getMatchIntentRequest', + 'getSession', + ], + ], + ], + ], + 'MatchIntent' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/sessions/*}:matchIntent', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:matchIntent', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'session' => [ + 'getters' => [ + 'getSession', + ], + ], + ], + ], + 'ServerStreamingDetectIntent' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/sessions/*}:serverStreamingDetectIntent', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:serverStreamingDetectIntent', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'session' => [ + 'getters' => [ + 'getSession', + ], + ], + ], + ], + 'SubmitAnswerFeedback' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback', + 'body' => '*', + 'placeholders' => [ + 'session' => [ + 'getters' => [ + 'getSession', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_client_config.json new file mode 100644 index 000000000000..e5c31da1bcad --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_client_config.json @@ -0,0 +1,104 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.TestCases": { + "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": { + "BatchDeleteTestCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchRunTestCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CalculateCoverage": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateTestCase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ExportTestCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTestCase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTestCaseResult": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportTestCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTestCaseResults": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTestCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RunTestCase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateTestCase": { + "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/DialogflowCx/v3/src/V3/resources/test_cases_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_descriptor_config.php new file mode 100644 index 000000000000..189ae7e8f342 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_descriptor_config.php @@ -0,0 +1,268 @@ + [ + 'google.cloud.dialogflow.cx.v3.TestCases' => [ + 'BatchRunTestCases' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\BatchRunTestCasesResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\BatchRunTestCasesMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ExportTestCases' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportTestCasesResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportTestCasesMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ImportTestCases' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportTestCasesResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportTestCasesMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RunTestCase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\RunTestCaseResponse', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\RunTestCaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'BatchDeleteTestCases' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CalculateCoverage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\CalculateCoverageResponse', + 'headerParams' => [ + [ + 'keyName' => 'agent', + 'fieldAccessors' => [ + 'getAgent', + ], + ], + ], + ], + 'CreateTestCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TestCase', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetTestCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TestCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTestCaseResult' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TestCaseResult', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListTestCaseResults' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTestCaseResults', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListTestCaseResultsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTestCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTestCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListTestCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateTestCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TestCase', + 'headerParams' => [ + [ + 'keyName' => 'test_case.name', + 'fieldAccessors' => [ + 'getTestCase', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', + 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', + 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', + 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', + 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', + 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', + 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', + 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', + 'testCase' => 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}', + 'testCaseResult' => 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', + 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', + 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_rest_client_config.php new file mode 100644 index 000000000000..7a4f34f76c2a --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_rest_client_config.php @@ -0,0 +1,249 @@ + [ + 'google.cloud.dialogflow.cx.v3.TestCases' => [ + 'BatchDeleteTestCases' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases:batchDelete', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchRunTestCases' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases:batchRun', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CalculateCoverage' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{agent=projects/*/locations/*/agents/*}/testCases:calculateCoverage', + 'placeholders' => [ + 'agent' => [ + 'getters' => [ + 'getAgent', + ], + ], + ], + ], + 'CreateTestCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases', + 'body' => 'test_case', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ExportTestCases' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases:export', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetTestCase' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/testCases/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTestCaseResult' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/testCases/*/results/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportTestCases' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTestCaseResults' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/testCases/*}/results', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTestCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunTestCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/testCases/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateTestCase' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{test_case.name=projects/*/locations/*/agents/*/testCases/*}', + 'body' => 'test_case', + 'placeholders' => [ + 'test_case.name' => [ + 'getters' => [ + 'getTestCase', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_client_config.json new file mode 100644 index 000000000000..2d710a0fe175 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Tools": { + "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": { + "CreateTool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateToolVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteTool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteToolVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetToolVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListToolVersions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTools": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RestoreToolVersion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateTool": { + "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/DialogflowCx/v3/src/V3/resources/tools_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_descriptor_config.php new file mode 100644 index 000000000000..6a53fcc157d4 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_descriptor_config.php @@ -0,0 +1,206 @@ + [ + 'google.cloud.dialogflow.cx.v3.Tools' => [ + 'CreateTool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Tool', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateToolVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ToolVersion', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteTool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteToolVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Tool', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetToolVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ToolVersion', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListToolVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getToolVersions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListToolVersionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTools' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTools', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListToolsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RestoreToolVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\RestoreToolVersionResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateTool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Tool', + 'headerParams' => [ + [ + 'keyName' => 'tool.name', + 'fieldAccessors' => [ + 'getTool', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', + 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', + 'toolVersion' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_rest_client_config.php new file mode 100644 index 000000000000..fc7bf8c684c5 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_rest_client_config.php @@ -0,0 +1,221 @@ + [ + 'google.cloud.dialogflow.cx.v3.Tools' => [ + 'CreateTool' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/tools', + 'body' => 'tool', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateToolVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions', + 'body' => 'tool_version', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteTool' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/tools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteToolVersion' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTool' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/tools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetToolVersion' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListToolVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTools' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/tools', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RestoreToolVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}:restore', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateTool' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{tool.name=projects/*/locations/*/agents/*/tools/*}', + 'body' => 'tool', + 'placeholders' => [ + 'tool.name' => [ + 'getters' => [ + 'getTool', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_client_config.json new file mode 100644 index 000000000000..0ab81ba30d4b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.TransitionRouteGroups": { + "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": { + "CreateTransitionRouteGroup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteTransitionRouteGroup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTransitionRouteGroup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTransitionRouteGroups": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateTransitionRouteGroup": { + "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/DialogflowCx/v3/src/V3/resources/transition_route_groups_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_descriptor_config.php new file mode 100644 index 000000000000..73d079826a35 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_descriptor_config.php @@ -0,0 +1,143 @@ + [ + 'google.cloud.dialogflow.cx.v3.TransitionRouteGroups' => [ + 'CreateTransitionRouteGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteTransitionRouteGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTransitionRouteGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListTransitionRouteGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTransitionRouteGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListTransitionRouteGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateTransitionRouteGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup', + 'headerParams' => [ + [ + 'keyName' => 'transition_route_group.name', + 'fieldAccessors' => [ + 'getTransitionRouteGroup', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', + 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', + 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', + 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', + 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', + 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', + 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', + 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_rest_client_config.php new file mode 100644 index 000000000000..bbce0d4a92be --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_rest_client_config.php @@ -0,0 +1,196 @@ + [ + 'google.cloud.dialogflow.cx.v3.TransitionRouteGroups' => [ + 'CreateTransitionRouteGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups', + 'body' => 'transition_route_group', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups', + 'body' => 'transition_route_group', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteTransitionRouteGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTransitionRouteGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListTransitionRouteGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateTransitionRouteGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}', + 'body' => 'transition_route_group', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{transition_route_group.name=projects/*/locations/*/agents/*/transitionRouteGroups/*}', + 'body' => 'transition_route_group', + ], + ], + 'placeholders' => [ + 'transition_route_group.name' => [ + 'getters' => [ + 'getTransitionRouteGroup', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_client_config.json new file mode 100644 index 000000000000..aed8eb675d82 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.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": { + "CompareVersions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "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" + }, + "LoadVersion": { + "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/DialogflowCx/v3/src/V3/resources/versions_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_descriptor_config.php new file mode 100644 index 000000000000..33c16defe13c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_descriptor_config.php @@ -0,0 +1,173 @@ + [ + 'google.cloud.dialogflow.cx.v3.Versions' => [ + 'CreateVersion' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\Version', + 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\CreateVersionOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'LoadVersion' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Struct', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CompareVersions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\CompareVersionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'base_version', + 'fieldAccessors' => [ + 'getBaseVersion', + ], + ], + ], + ], + 'DeleteVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Version', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVersions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListVersionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Version', + 'headerParams' => [ + [ + 'keyName' => 'version.name', + 'fieldAccessors' => [ + 'getVersion', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', + 'version' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_rest_client_config.php new file mode 100644 index 000000000000..ccae7b77ac8d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_rest_client_config.php @@ -0,0 +1,191 @@ + [ + 'google.cloud.dialogflow.cx.v3.Versions' => [ + 'CompareVersions' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{base_version=projects/*/locations/*/agents/*/flows/*/versions/*}:compareVersions', + 'body' => '*', + 'placeholders' => [ + 'base_version' => [ + 'getters' => [ + 'getBaseVersion', + ], + ], + ], + ], + 'CreateVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/versions', + 'body' => 'version', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteVersion' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/versions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVersion' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/versions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/versions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'LoadVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/versions/*}:load', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateVersion' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{version.name=projects/*/locations/*/agents/*/flows/*/versions/*}', + 'body' => 'version', + 'placeholders' => [ + 'version.name' => [ + 'getters' => [ + 'getVersion', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_client_config.json new file mode 100644 index 000000000000..b554ad10e699 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Webhooks": { + "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": { + "CreateWebhook": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteWebhook": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetWebhook": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListWebhooks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateWebhook": { + "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/DialogflowCx/v3/src/V3/resources/webhooks_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_descriptor_config.php new file mode 100644 index 000000000000..4e70c97d82bf --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_descriptor_config.php @@ -0,0 +1,137 @@ + [ + 'google.cloud.dialogflow.cx.v3.Webhooks' => [ + 'CreateWebhook' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Webhook', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteWebhook' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetWebhook' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Webhook', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListWebhooks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getWebhooks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListWebhooksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateWebhook' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Webhook', + 'headerParams' => [ + [ + 'keyName' => 'webhook.name', + 'fieldAccessors' => [ + 'getWebhook', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', + 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', + 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_rest_client_config.php new file mode 100644 index 000000000000..4d1644f51c5f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_rest_client_config.php @@ -0,0 +1,164 @@ + [ + 'google.cloud.dialogflow.cx.v3.Webhooks' => [ + 'CreateWebhook' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/webhooks', + 'body' => 'webhook', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteWebhook' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/webhooks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetWebhook' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/webhooks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListWebhooks' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/webhooks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateWebhook' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{webhook.name=projects/*/locations/*/agents/*/webhooks/*}', + 'body' => 'webhook', + 'placeholders' => [ + 'webhook.name' => [ + 'getters' => [ + 'getWebhook', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/AgentsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/AgentsClientTest.php new file mode 100644 index 000000000000..bb69f10b3569 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/AgentsClientTest.php @@ -0,0 +1,1217 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AgentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AgentsClient($options); + } + + /** @test */ + public function createAgentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $defaultLanguageCode = 'defaultLanguageCode856575222'; + $timeZone = 'timeZone36848094'; + $description = 'description-1724546052'; + $avatarUri = 'avatarUri-402824826'; + $startFlow = 'startFlow-1573559573'; + $securitySettings = 'securitySettings-595091902'; + $enableStackdriverLogging = true; + $enableSpellCorrection = false; + $enableMultiLanguageTraining = false; + $locked = true; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Agent(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setDescription($description); + $expectedResponse->setAvatarUri($avatarUri); + $expectedResponse->setStartFlow($startFlow); + $expectedResponse->setSecuritySettings($securitySettings); + $expectedResponse->setEnableStackdriverLogging($enableStackdriverLogging); + $expectedResponse->setEnableSpellCorrection($enableSpellCorrection); + $expectedResponse->setEnableMultiLanguageTraining($enableMultiLanguageTraining); + $expectedResponse->setLocked($locked); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $agent = new Agent(); + $agentDisplayName = 'agentDisplayName2121176616'; + $agent->setDisplayName($agentDisplayName); + $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; + $agent->setDefaultLanguageCode($agentDefaultLanguageCode); + $agentTimeZone = 'agentTimeZone-453669314'; + $agent->setTimeZone($agentTimeZone); + $request = (new CreateAgentRequest()) + ->setParent($formattedParent) + ->setAgent($agent); + $response = $gapicClient->createAgent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/CreateAgent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAgent(); + $this->assertProtobufEquals($agent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAgentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $agent = new Agent(); + $agentDisplayName = 'agentDisplayName2121176616'; + $agent->setDisplayName($agentDisplayName); + $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; + $agent->setDefaultLanguageCode($agentDefaultLanguageCode); + $agentTimeZone = 'agentTimeZone-453669314'; + $agent->setTimeZone($agentTimeZone); + $request = (new CreateAgentRequest()) + ->setParent($formattedParent) + ->setAgent($agent); + try { + $gapicClient->createAgent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAgentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new DeleteAgentRequest()) + ->setName($formattedName); + $gapicClient->deleteAgent($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/DeleteAgent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $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 + $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new DeleteAgentRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAgent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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 + $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ExportAgentRequest()) + ->setName($formattedName); + $response = $gapicClient->exportAgent($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/ExportAgent', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $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 + $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ExportAgentRequest()) + ->setName($formattedName); + $response = $gapicClient->exportAgent($request); + $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 + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $defaultLanguageCode = 'defaultLanguageCode856575222'; + $timeZone = 'timeZone36848094'; + $description = 'description-1724546052'; + $avatarUri = 'avatarUri-402824826'; + $startFlow = 'startFlow-1573559573'; + $securitySettings = 'securitySettings-595091902'; + $enableStackdriverLogging = true; + $enableSpellCorrection = false; + $enableMultiLanguageTraining = false; + $locked = true; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Agent(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setDescription($description); + $expectedResponse->setAvatarUri($avatarUri); + $expectedResponse->setStartFlow($startFlow); + $expectedResponse->setSecuritySettings($securitySettings); + $expectedResponse->setEnableStackdriverLogging($enableStackdriverLogging); + $expectedResponse->setEnableSpellCorrection($enableSpellCorrection); + $expectedResponse->setEnableMultiLanguageTraining($enableMultiLanguageTraining); + $expectedResponse->setLocked($locked); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new GetAgentRequest()) + ->setName($formattedName); + $response = $gapicClient->getAgent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/GetAgent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $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 + $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new GetAgentRequest()) + ->setName($formattedName); + try { + $gapicClient->getAgent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAgentValidationResultTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new AgentValidationResult(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->agentValidationResultName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new GetAgentValidationResultRequest()) + ->setName($formattedName); + $response = $gapicClient->getAgentValidationResult($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/GetAgentValidationResult', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAgentValidationResultExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->agentValidationResultName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new GetAgentValidationResultRequest()) + ->setName($formattedName); + try { + $gapicClient->getAgentValidationResult($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGenerativeSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $languageCode2 = 'languageCode2-1564186329'; + $expectedResponse = new GenerativeSettings(); + $expectedResponse->setName($name2); + $expectedResponse->setLanguageCode($languageCode2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->agentGenerativeSettingsName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $languageCode = 'languageCode-412800396'; + $request = (new GetGenerativeSettingsRequest()) + ->setName($formattedName) + ->setLanguageCode($languageCode); + $response = $gapicClient->getGenerativeSettings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/GetGenerativeSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getLanguageCode(); + $this->assertProtobufEquals($languageCode, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGenerativeSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->agentGenerativeSettingsName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $languageCode = 'languageCode-412800396'; + $request = (new GetGenerativeSettingsRequest()) + ->setName($formattedName) + ->setLanguageCode($languageCode); + try { + $gapicClient->getGenerativeSettings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAgentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $agentsElement = new Agent(); + $agents = [ + $agentsElement, + ]; + $expectedResponse = new ListAgentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAgents($agents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAgentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAgents($request); + $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.cx.v3.Agents/ListAgents', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAgentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAgentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAgents($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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 + $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new RestoreAgentRequest()) + ->setName($formattedName); + $response = $gapicClient->restoreAgent($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/RestoreAgent', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $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 + $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new RestoreAgentRequest()) + ->setName($formattedName); + $response = $gapicClient->restoreAgent($request); + $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 updateAgentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $defaultLanguageCode = 'defaultLanguageCode856575222'; + $timeZone = 'timeZone36848094'; + $description = 'description-1724546052'; + $avatarUri = 'avatarUri-402824826'; + $startFlow = 'startFlow-1573559573'; + $securitySettings = 'securitySettings-595091902'; + $enableStackdriverLogging = true; + $enableSpellCorrection = false; + $enableMultiLanguageTraining = false; + $locked = true; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Agent(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setDescription($description); + $expectedResponse->setAvatarUri($avatarUri); + $expectedResponse->setStartFlow($startFlow); + $expectedResponse->setSecuritySettings($securitySettings); + $expectedResponse->setEnableStackdriverLogging($enableStackdriverLogging); + $expectedResponse->setEnableSpellCorrection($enableSpellCorrection); + $expectedResponse->setEnableMultiLanguageTraining($enableMultiLanguageTraining); + $expectedResponse->setLocked($locked); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $agent = new Agent(); + $agentDisplayName = 'agentDisplayName2121176616'; + $agent->setDisplayName($agentDisplayName); + $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; + $agent->setDefaultLanguageCode($agentDefaultLanguageCode); + $agentTimeZone = 'agentTimeZone-453669314'; + $agent->setTimeZone($agentTimeZone); + $request = (new UpdateAgentRequest()) + ->setAgent($agent); + $response = $gapicClient->updateAgent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/UpdateAgent', $actualFuncCall); + $actualValue = $actualRequestObject->getAgent(); + $this->assertProtobufEquals($agent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAgentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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(); + $agentDisplayName = 'agentDisplayName2121176616'; + $agent->setDisplayName($agentDisplayName); + $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; + $agent->setDefaultLanguageCode($agentDefaultLanguageCode); + $agentTimeZone = 'agentTimeZone-453669314'; + $agent->setTimeZone($agentTimeZone); + $request = (new UpdateAgentRequest()) + ->setAgent($agent); + try { + $gapicClient->updateAgent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGenerativeSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new GenerativeSettings(); + $expectedResponse->setName($name); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $generativeSettings = new GenerativeSettings(); + $request = (new UpdateGenerativeSettingsRequest()) + ->setGenerativeSettings($generativeSettings); + $response = $gapicClient->updateGenerativeSettings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/UpdateGenerativeSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getGenerativeSettings(); + $this->assertProtobufEquals($generativeSettings, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGenerativeSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $generativeSettings = new GenerativeSettings(); + $request = (new UpdateGenerativeSettingsRequest()) + ->setGenerativeSettings($generativeSettings); + try { + $gapicClient->updateGenerativeSettings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function validateAgentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new AgentValidationResult(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ValidateAgentRequest()) + ->setName($formattedName); + $response = $gapicClient->validateAgent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/ValidateAgent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function validateAgentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ValidateAgentRequest()) + ->setName($formattedName); + try { + $gapicClient->validateAgent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAgentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $defaultLanguageCode = 'defaultLanguageCode856575222'; + $timeZone = 'timeZone36848094'; + $description = 'description-1724546052'; + $avatarUri = 'avatarUri-402824826'; + $startFlow = 'startFlow-1573559573'; + $securitySettings = 'securitySettings-595091902'; + $enableStackdriverLogging = true; + $enableSpellCorrection = false; + $enableMultiLanguageTraining = false; + $locked = true; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Agent(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setDescription($description); + $expectedResponse->setAvatarUri($avatarUri); + $expectedResponse->setStartFlow($startFlow); + $expectedResponse->setSecuritySettings($securitySettings); + $expectedResponse->setEnableStackdriverLogging($enableStackdriverLogging); + $expectedResponse->setEnableSpellCorrection($enableSpellCorrection); + $expectedResponse->setEnableMultiLanguageTraining($enableMultiLanguageTraining); + $expectedResponse->setLocked($locked); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $agent = new Agent(); + $agentDisplayName = 'agentDisplayName2121176616'; + $agent->setDisplayName($agentDisplayName); + $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; + $agent->setDefaultLanguageCode($agentDefaultLanguageCode); + $agentTimeZone = 'agentTimeZone-453669314'; + $agent->setTimeZone($agentTimeZone); + $request = (new CreateAgentRequest()) + ->setParent($formattedParent) + ->setAgent($agent); + $response = $gapicClient->createAgentAsync($request)->wait(); + $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.cx.v3.Agents/CreateAgent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAgent(); + $this->assertProtobufEquals($agent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ChangelogsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ChangelogsClientTest.php new file mode 100644 index 000000000000..909b7d1bf7db --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ChangelogsClientTest.php @@ -0,0 +1,381 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ChangelogsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ChangelogsClient($options); + } + + /** @test */ + public function getChangelogTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $userEmail = 'userEmail1921668648'; + $displayName = 'displayName1615086568'; + $action = 'action-1422950858'; + $type = 'type3575610'; + $resource = 'resource-341064690'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new Changelog(); + $expectedResponse->setName($name2); + $expectedResponse->setUserEmail($userEmail); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAction($action); + $expectedResponse->setType($type); + $expectedResponse->setResource($resource); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->changelogName('[PROJECT]', '[LOCATION]', '[AGENT]', '[CHANGELOG]'); + $request = (new GetChangelogRequest()) + ->setName($formattedName); + $response = $gapicClient->getChangelog($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Changelogs/GetChangelog', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getChangelogExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->changelogName('[PROJECT]', '[LOCATION]', '[AGENT]', '[CHANGELOG]'); + $request = (new GetChangelogRequest()) + ->setName($formattedName); + try { + $gapicClient->getChangelog($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listChangelogsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $changelogsElement = new Changelog(); + $changelogs = [ + $changelogsElement, + ]; + $expectedResponse = new ListChangelogsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setChangelogs($changelogs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ListChangelogsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listChangelogs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getChangelogs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Changelogs/ListChangelogs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listChangelogsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $request = (new ListChangelogsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listChangelogs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getChangelogAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $userEmail = 'userEmail1921668648'; + $displayName = 'displayName1615086568'; + $action = 'action-1422950858'; + $type = 'type3575610'; + $resource = 'resource-341064690'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new Changelog(); + $expectedResponse->setName($name2); + $expectedResponse->setUserEmail($userEmail); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAction($action); + $expectedResponse->setType($type); + $expectedResponse->setResource($resource); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->changelogName('[PROJECT]', '[LOCATION]', '[AGENT]', '[CHANGELOG]'); + $request = (new GetChangelogRequest()) + ->setName($formattedName); + $response = $gapicClient->getChangelogAsync($request)->wait(); + $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.cx.v3.Changelogs/GetChangelog', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/DeploymentsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/DeploymentsClientTest.php new file mode 100644 index 000000000000..68016b04bff6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/DeploymentsClientTest.php @@ -0,0 +1,361 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DeploymentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DeploymentsClient($options); + } + + /** @test */ + public function getDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $flowVersion = 'flowVersion1517270727'; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setFlowVersion($flowVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[DEPLOYMENT]'); + $request = (new GetDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->getDeployment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Deployments/GetDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[DEPLOYMENT]'); + $request = (new GetDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->getDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeploymentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $deploymentsElement = new Deployment(); + $deployments = [ + $deploymentsElement, + ]; + $expectedResponse = new ListDeploymentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDeployments($deployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new ListDeploymentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDeployments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Deployments/ListDeployments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeploymentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new ListDeploymentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDeployments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeploymentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $flowVersion = 'flowVersion1517270727'; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setFlowVersion($flowVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[DEPLOYMENT]'); + $request = (new GetDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->getDeploymentAsync($request)->wait(); + $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.cx.v3.Deployments/GetDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EntityTypesClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EntityTypesClientTest.php new file mode 100644 index 000000000000..817a1512def9 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EntityTypesClientTest.php @@ -0,0 +1,870 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EntityTypesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EntityTypesClient($options); + } + + /** @test */ + public function createEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $enableFuzzyExtraction = true; + $redact = false; + $expectedResponse = new EntityType(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); + $expectedResponse->setRedact($redact); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $entityType = new EntityType(); + $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; + $entityType->setDisplayName($entityTypeDisplayName); + $entityTypeKind = Kind::KIND_UNSPECIFIED; + $entityType->setKind($entityTypeKind); + $request = (new CreateEntityTypeRequest()) + ->setParent($formattedParent) + ->setEntityType($entityType); + $response = $gapicClient->createEntityType($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]'); + $entityType = new EntityType(); + $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; + $entityType->setDisplayName($entityTypeDisplayName); + $entityTypeKind = Kind::KIND_UNSPECIFIED; + $entityType->setKind($entityTypeKind); + $request = (new CreateEntityTypeRequest()) + ->setParent($formattedParent) + ->setEntityType($entityType); + try { + $gapicClient->createEntityType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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]', '[LOCATION]', '[AGENT]', '[ENTITY_TYPE]'); + $request = (new DeleteEntityTypeRequest()) + ->setName($formattedName); + $gapicClient->deleteEntityType($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[ENTITY_TYPE]'); + $request = (new DeleteEntityTypeRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteEntityType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportEntityTypesTest() + { + $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/exportEntityTypesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $entityTypesUri2 = 'entityTypesUri21800038525'; + $expectedResponse = new ExportEntityTypesResponse(); + $expectedResponse->setEntityTypesUri($entityTypesUri2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportEntityTypesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $entityTypes = []; + $request = (new ExportEntityTypesRequest()) + ->setParent($formattedParent) + ->setEntityTypes($entityTypes); + $response = $gapicClient->exportEntityTypes($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.EntityTypes/ExportEntityTypes', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEntityTypes(); + $this->assertProtobufEquals($entityTypes, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportEntityTypesTest'); + $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 exportEntityTypesExceptionTest() + { + $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/exportEntityTypesTest'); + $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]', '[LOCATION]', '[AGENT]'); + $entityTypes = []; + $request = (new ExportEntityTypesRequest()) + ->setParent($formattedParent) + ->setEntityTypes($entityTypes); + $response = $gapicClient->exportEntityTypes($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportEntityTypesTest'); + 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 getEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $enableFuzzyExtraction = true; + $redact = false; + $expectedResponse = new EntityType(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); + $expectedResponse->setRedact($redact); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entityTypeName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENTITY_TYPE]'); + $request = (new GetEntityTypeRequest()) + ->setName($formattedName); + $response = $gapicClient->getEntityType($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[ENTITY_TYPE]'); + $request = (new GetEntityTypeRequest()) + ->setName($formattedName); + try { + $gapicClient->getEntityType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importEntityTypesTest() + { + $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/importEntityTypesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportEntityTypesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importEntityTypesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $mergeOption = MergeOption::MERGE_OPTION_UNSPECIFIED; + $request = (new ImportEntityTypesRequest()) + ->setParent($formattedParent) + ->setMergeOption($mergeOption); + $response = $gapicClient->importEntityTypes($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.EntityTypes/ImportEntityTypes', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMergeOption(); + $this->assertProtobufEquals($mergeOption, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importEntityTypesTest'); + $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 importEntityTypesExceptionTest() + { + $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/importEntityTypesTest'); + $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]', '[LOCATION]', '[AGENT]'); + $mergeOption = MergeOption::MERGE_OPTION_UNSPECIFIED; + $request = (new ImportEntityTypesRequest()) + ->setParent($formattedParent) + ->setMergeOption($mergeOption); + $response = $gapicClient->importEntityTypes($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importEntityTypesTest'); + 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 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]', '[LOCATION]', '[AGENT]'); + $request = (new ListEntityTypesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEntityTypes($request); + $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.cx.v3.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]', '[LOCATION]', '[AGENT]'); + $request = (new ListEntityTypesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEntityTypes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntityTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $enableFuzzyExtraction = true; + $redact = false; + $expectedResponse = new EntityType(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); + $expectedResponse->setRedact($redact); + $transport->addResponse($expectedResponse); + // Mock request + $entityType = new EntityType(); + $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; + $entityType->setDisplayName($entityTypeDisplayName); + $entityTypeKind = Kind::KIND_UNSPECIFIED; + $entityType->setKind($entityTypeKind); + $request = (new UpdateEntityTypeRequest()) + ->setEntityType($entityType); + $response = $gapicClient->updateEntityType($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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); + $request = (new UpdateEntityTypeRequest()) + ->setEntityType($entityType); + try { + $gapicClient->updateEntityType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntityTypeAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $enableFuzzyExtraction = true; + $redact = false; + $expectedResponse = new EntityType(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); + $expectedResponse->setRedact($redact); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $entityType = new EntityType(); + $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; + $entityType->setDisplayName($entityTypeDisplayName); + $entityTypeKind = Kind::KIND_UNSPECIFIED; + $entityType->setKind($entityTypeKind); + $request = (new CreateEntityTypeRequest()) + ->setParent($formattedParent) + ->setEntityType($entityType); + $response = $gapicClient->createEntityTypeAsync($request)->wait(); + $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.cx.v3.EntityTypes/CreateEntityType', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntityType(); + $this->assertProtobufEquals($entityType, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EnvironmentsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EnvironmentsClientTest.php new file mode 100644 index 000000000000..53a57dbd2825 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EnvironmentsClientTest.php @@ -0,0 +1,1155 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EnvironmentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EnvironmentsClient($options); + } + + /** @test */ + public function createEnvironmentTest() + { + $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/createEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $environment = new Environment(); + $environmentDisplayName = 'environmentDisplayName747655770'; + $environment->setDisplayName($environmentDisplayName); + $request = (new CreateEnvironmentRequest()) + ->setParent($formattedParent) + ->setEnvironment($environment); + $response = $gapicClient->createEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/CreateEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + $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 createEnvironmentExceptionTest() + { + $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/createEnvironmentTest'); + $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]', '[LOCATION]', '[AGENT]'); + $environment = new Environment(); + $environmentDisplayName = 'environmentDisplayName747655770'; + $environment->setDisplayName($environmentDisplayName); + $request = (new CreateEnvironmentRequest()) + ->setParent($formattedParent) + ->setEnvironment($environment); + $response = $gapicClient->createEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + 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 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new DeleteEnvironmentRequest()) + ->setName($formattedName); + $gapicClient->deleteEnvironment($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new DeleteEnvironmentRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteEnvironment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deployFlowTest() + { + $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/deployFlowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $deployment = 'deployment1939520197'; + $expectedResponse = new DeployFlowResponse(); + $expectedResponse->setDeployment($deployment); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deployFlowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $formattedFlowVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new DeployFlowRequest()) + ->setEnvironment($formattedEnvironment) + ->setFlowVersion($formattedFlowVersion); + $response = $gapicClient->deployFlow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/DeployFlow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($formattedEnvironment, $actualValue); + $actualValue = $actualApiRequestObject->getFlowVersion(); + $this->assertProtobufEquals($formattedFlowVersion, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployFlowTest'); + $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 deployFlowExceptionTest() + { + $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/deployFlowTest'); + $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 + $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $formattedFlowVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new DeployFlowRequest()) + ->setEnvironment($formattedEnvironment) + ->setFlowVersion($formattedFlowVersion); + $response = $gapicClient->deployFlow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployFlowTest'); + 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 getEnvironmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new GetEnvironmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getEnvironment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new GetEnvironmentRequest()) + ->setName($formattedName); + try { + $gapicClient->getEnvironment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContinuousTestResultsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $continuousTestResultsElement = new ContinuousTestResult(); + $continuousTestResults = [ + $continuousTestResultsElement, + ]; + $expectedResponse = new ListContinuousTestResultsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setContinuousTestResults($continuousTestResults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new ListContinuousTestResultsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listContinuousTestResults($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getContinuousTestResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/ListContinuousTestResults', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContinuousTestResultsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new ListContinuousTestResultsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listContinuousTestResults($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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]', '[LOCATION]', '[AGENT]'); + $request = (new ListEnvironmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEnvironments($request); + $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.cx.v3.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]', '[LOCATION]', '[AGENT]'); + $request = (new ListEnvironmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEnvironments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function lookupEnvironmentHistoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $environmentsElement = new Environment(); + $environments = [ + $environmentsElement, + ]; + $expectedResponse = new LookupEnvironmentHistoryResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEnvironments($environments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new LookupEnvironmentHistoryRequest()) + ->setName($formattedName); + $response = $gapicClient->lookupEnvironmentHistory($request); + $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.cx.v3.Environments/LookupEnvironmentHistory', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function lookupEnvironmentHistoryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new LookupEnvironmentHistoryRequest()) + ->setName($formattedName); + try { + $gapicClient->lookupEnvironmentHistory($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runContinuousTestTest() + { + $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/runContinuousTestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RunContinuousTestResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runContinuousTestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new RunContinuousTestRequest()) + ->setEnvironment($formattedEnvironment); + $response = $gapicClient->runContinuousTest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/RunContinuousTest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($formattedEnvironment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runContinuousTestTest'); + $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 runContinuousTestExceptionTest() + { + $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/runContinuousTestTest'); + $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 + $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new RunContinuousTestRequest()) + ->setEnvironment($formattedEnvironment); + $response = $gapicClient->runContinuousTest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runContinuousTestTest'); + 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 updateEnvironmentTest() + { + $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/updateEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $environment = new Environment(); + $environmentDisplayName = 'environmentDisplayName747655770'; + $environment->setDisplayName($environmentDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateEnvironmentRequest()) + ->setEnvironment($environment) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/UpdateEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); + $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 updateEnvironmentExceptionTest() + { + $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/updateEnvironmentTest'); + $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 + $environment = new Environment(); + $environmentDisplayName = 'environmentDisplayName747655770'; + $environment->setDisplayName($environmentDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateEnvironmentRequest()) + ->setEnvironment($environment) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); + 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEnvironmentAsyncTest() + { + $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/createEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $environment = new Environment(); + $environmentDisplayName = 'environmentDisplayName747655770'; + $environment->setDisplayName($environmentDisplayName); + $request = (new CreateEnvironmentRequest()) + ->setParent($formattedParent) + ->setEnvironment($environment); + $response = $gapicClient->createEnvironmentAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/CreateEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExamplesClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExamplesClientTest.php new file mode 100644 index 000000000000..bdd0ea772087 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExamplesClientTest.php @@ -0,0 +1,623 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ExamplesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ExamplesClient($options); + } + + /** @test */ + public function createExampleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $tokenCount = 1164226743; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new Example(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTokenCount($tokenCount); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $example = new Example(); + $exampleActions = []; + $example->setActions($exampleActions); + $exampleDisplayName = 'exampleDisplayName1524254371'; + $example->setDisplayName($exampleDisplayName); + $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; + $example->setConversationState($exampleConversationState); + $request = (new CreateExampleRequest()) + ->setParent($formattedParent) + ->setExample($example); + $response = $gapicClient->createExample($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Examples/CreateExample', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getExample(); + $this->assertProtobufEquals($example, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createExampleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $example = new Example(); + $exampleActions = []; + $example->setActions($exampleActions); + $exampleDisplayName = 'exampleDisplayName1524254371'; + $example->setDisplayName($exampleDisplayName); + $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; + $example->setConversationState($exampleConversationState); + $request = (new CreateExampleRequest()) + ->setParent($formattedParent) + ->setExample($example); + try { + $gapicClient->createExample($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExampleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->exampleName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[EXAMPLE]'); + $request = (new DeleteExampleRequest()) + ->setName($formattedName); + $gapicClient->deleteExample($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Examples/DeleteExample', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExampleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->exampleName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[EXAMPLE]'); + $request = (new DeleteExampleRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteExample($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExampleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $tokenCount = 1164226743; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new Example(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTokenCount($tokenCount); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->exampleName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[EXAMPLE]'); + $request = (new GetExampleRequest()) + ->setName($formattedName); + $response = $gapicClient->getExample($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Examples/GetExample', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExampleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->exampleName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[EXAMPLE]'); + $request = (new GetExampleRequest()) + ->setName($formattedName); + try { + $gapicClient->getExample($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExamplesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $examplesElement = new Example(); + $examples = [ + $examplesElement, + ]; + $expectedResponse = new ListExamplesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExamples($examples); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $request = (new ListExamplesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listExamples($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExamples()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Examples/ListExamples', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExamplesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $request = (new ListExamplesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listExamples($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExampleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $tokenCount = 1164226743; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new Example(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTokenCount($tokenCount); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $example = new Example(); + $exampleActions = []; + $example->setActions($exampleActions); + $exampleDisplayName = 'exampleDisplayName1524254371'; + $example->setDisplayName($exampleDisplayName); + $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; + $example->setConversationState($exampleConversationState); + $request = (new UpdateExampleRequest()) + ->setExample($example); + $response = $gapicClient->updateExample($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Examples/UpdateExample', $actualFuncCall); + $actualValue = $actualRequestObject->getExample(); + $this->assertProtobufEquals($example, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExampleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $example = new Example(); + $exampleActions = []; + $example->setActions($exampleActions); + $exampleDisplayName = 'exampleDisplayName1524254371'; + $example->setDisplayName($exampleDisplayName); + $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; + $example->setConversationState($exampleConversationState); + $request = (new UpdateExampleRequest()) + ->setExample($example); + try { + $gapicClient->updateExample($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createExampleAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $tokenCount = 1164226743; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new Example(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTokenCount($tokenCount); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $example = new Example(); + $exampleActions = []; + $example->setActions($exampleActions); + $exampleDisplayName = 'exampleDisplayName1524254371'; + $example->setDisplayName($exampleDisplayName); + $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; + $example->setConversationState($exampleConversationState); + $request = (new CreateExampleRequest()) + ->setParent($formattedParent) + ->setExample($example); + $response = $gapicClient->createExampleAsync($request)->wait(); + $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.cx.v3.Examples/CreateExample', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getExample(); + $this->assertProtobufEquals($example, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExperimentsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExperimentsClientTest.php new file mode 100644 index 000000000000..fce87db7fbd6 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExperimentsClientTest.php @@ -0,0 +1,743 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ExperimentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ExperimentsClient($options); + } + + /** @test */ + public function createExperimentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $rolloutFailureReason = 'rolloutFailureReason-379444505'; + $expectedResponse = new Experiment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setRolloutFailureReason($rolloutFailureReason); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $experiment = new Experiment(); + $experimentDisplayName = 'experimentDisplayName-1508560336'; + $experiment->setDisplayName($experimentDisplayName); + $request = (new CreateExperimentRequest()) + ->setParent($formattedParent) + ->setExperiment($experiment); + $response = $gapicClient->createExperiment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/CreateExperiment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getExperiment(); + $this->assertProtobufEquals($experiment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createExperimentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $experiment = new Experiment(); + $experimentDisplayName = 'experimentDisplayName-1508560336'; + $experiment->setDisplayName($experimentDisplayName); + $request = (new CreateExperimentRequest()) + ->setParent($formattedParent) + ->setExperiment($experiment); + try { + $gapicClient->createExperiment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExperimentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); + $request = (new DeleteExperimentRequest()) + ->setName($formattedName); + $gapicClient->deleteExperiment($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/DeleteExperiment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExperimentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); + $request = (new DeleteExperimentRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteExperiment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExperimentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $rolloutFailureReason = 'rolloutFailureReason-379444505'; + $expectedResponse = new Experiment(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setRolloutFailureReason($rolloutFailureReason); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); + $request = (new GetExperimentRequest()) + ->setName($formattedName); + $response = $gapicClient->getExperiment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/GetExperiment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExperimentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); + $request = (new GetExperimentRequest()) + ->setName($formattedName); + try { + $gapicClient->getExperiment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExperimentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $experimentsElement = new Experiment(); + $experiments = [ + $experimentsElement, + ]; + $expectedResponse = new ListExperimentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExperiments($experiments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new ListExperimentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listExperiments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExperiments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/ListExperiments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExperimentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $request = (new ListExperimentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listExperiments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startExperimentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $rolloutFailureReason = 'rolloutFailureReason-379444505'; + $expectedResponse = new Experiment(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setRolloutFailureReason($rolloutFailureReason); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); + $request = (new StartExperimentRequest()) + ->setName($formattedName); + $response = $gapicClient->startExperiment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/StartExperiment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startExperimentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); + $request = (new StartExperimentRequest()) + ->setName($formattedName); + try { + $gapicClient->startExperiment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopExperimentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $rolloutFailureReason = 'rolloutFailureReason-379444505'; + $expectedResponse = new Experiment(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setRolloutFailureReason($rolloutFailureReason); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); + $request = (new StopExperimentRequest()) + ->setName($formattedName); + $response = $gapicClient->stopExperiment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/StopExperiment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopExperimentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); + $request = (new StopExperimentRequest()) + ->setName($formattedName); + try { + $gapicClient->stopExperiment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExperimentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $rolloutFailureReason = 'rolloutFailureReason-379444505'; + $expectedResponse = new Experiment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setRolloutFailureReason($rolloutFailureReason); + $transport->addResponse($expectedResponse); + // Mock request + $experiment = new Experiment(); + $experimentDisplayName = 'experimentDisplayName-1508560336'; + $experiment->setDisplayName($experimentDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateExperimentRequest()) + ->setExperiment($experiment) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateExperiment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/UpdateExperiment', $actualFuncCall); + $actualValue = $actualRequestObject->getExperiment(); + $this->assertProtobufEquals($experiment, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExperimentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $experiment = new Experiment(); + $experimentDisplayName = 'experimentDisplayName-1508560336'; + $experiment->setDisplayName($experimentDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateExperimentRequest()) + ->setExperiment($experiment) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateExperiment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createExperimentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $rolloutFailureReason = 'rolloutFailureReason-379444505'; + $expectedResponse = new Experiment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setRolloutFailureReason($rolloutFailureReason); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); + $experiment = new Experiment(); + $experimentDisplayName = 'experimentDisplayName-1508560336'; + $experiment->setDisplayName($experimentDisplayName); + $request = (new CreateExperimentRequest()) + ->setParent($formattedParent) + ->setExperiment($experiment); + $response = $gapicClient->createExperimentAsync($request)->wait(); + $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.cx.v3.Experiments/CreateExperiment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getExperiment(); + $this->assertProtobufEquals($experiment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/FlowsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/FlowsClientTest.php new file mode 100644 index 000000000000..42aae3008c7f --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/FlowsClientTest.php @@ -0,0 +1,1101 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FlowsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FlowsClient($options); + } + + /** @test */ + public function createFlowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $locked = true; + $expectedResponse = new Flow(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setLocked($locked); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $flow = new Flow(); + $flowDisplayName = 'flowDisplayName-554265505'; + $flow->setDisplayName($flowDisplayName); + $request = (new CreateFlowRequest()) + ->setParent($formattedParent) + ->setFlow($flow); + $response = $gapicClient->createFlow($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/CreateFlow', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFlow(); + $this->assertProtobufEquals($flow, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFlowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $flow = new Flow(); + $flowDisplayName = 'flowDisplayName-554265505'; + $flow->setDisplayName($flowDisplayName); + $request = (new CreateFlowRequest()) + ->setParent($formattedParent) + ->setFlow($flow); + try { + $gapicClient->createFlow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFlowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new DeleteFlowRequest()) + ->setName($formattedName); + $gapicClient->deleteFlow($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/DeleteFlow', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFlowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new DeleteFlowRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteFlow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportFlowTest() + { + $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/exportFlowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $flowUri2 = 'flowUri2747401166'; + $expectedResponse = new ExportFlowResponse(); + $expectedResponse->setFlowUri($flowUri2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportFlowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new ExportFlowRequest()) + ->setName($formattedName); + $response = $gapicClient->exportFlow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/ExportFlow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportFlowTest'); + $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 exportFlowExceptionTest() + { + $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/exportFlowTest'); + $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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new ExportFlowRequest()) + ->setName($formattedName); + $response = $gapicClient->exportFlow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportFlowTest'); + 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 getFlowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $locked = true; + $expectedResponse = new Flow(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setLocked($locked); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new GetFlowRequest()) + ->setName($formattedName); + $response = $gapicClient->getFlow($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/GetFlow', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFlowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new GetFlowRequest()) + ->setName($formattedName); + try { + $gapicClient->getFlow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFlowValidationResultTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new FlowValidationResult(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->flowValidationResultName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new GetFlowValidationResultRequest()) + ->setName($formattedName); + $response = $gapicClient->getFlowValidationResult($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/GetFlowValidationResult', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFlowValidationResultExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->flowValidationResultName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new GetFlowValidationResultRequest()) + ->setName($formattedName); + try { + $gapicClient->getFlowValidationResult($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importFlowTest() + { + $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/importFlowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $flow = 'flow3146030'; + $expectedResponse = new ImportFlowResponse(); + $expectedResponse->setFlow($flow); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importFlowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ImportFlowRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importFlow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/ImportFlow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importFlowTest'); + $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 importFlowExceptionTest() + { + $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/importFlowTest'); + $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]', '[LOCATION]', '[AGENT]'); + $request = (new ImportFlowRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importFlow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importFlowTest'); + 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 listFlowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $flowsElement = new Flow(); + $flows = [ + $flowsElement, + ]; + $expectedResponse = new ListFlowsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFlows($flows); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ListFlowsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listFlows($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFlows()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/ListFlows', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFlowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $request = (new ListFlowsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listFlows($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function trainFlowTest() + { + $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/trainFlowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/trainFlowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new TrainFlowRequest()) + ->setName($formattedName); + $response = $gapicClient->trainFlow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/TrainFlow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/trainFlowTest'); + $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 trainFlowExceptionTest() + { + $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/trainFlowTest'); + $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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new TrainFlowRequest()) + ->setName($formattedName); + $response = $gapicClient->trainFlow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/trainFlowTest'); + 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 updateFlowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $locked = true; + $expectedResponse = new Flow(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setLocked($locked); + $transport->addResponse($expectedResponse); + // Mock request + $flow = new Flow(); + $flowDisplayName = 'flowDisplayName-554265505'; + $flow->setDisplayName($flowDisplayName); + $request = (new UpdateFlowRequest()) + ->setFlow($flow); + $response = $gapicClient->updateFlow($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/UpdateFlow', $actualFuncCall); + $actualValue = $actualRequestObject->getFlow(); + $this->assertProtobufEquals($flow, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateFlowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $flow = new Flow(); + $flowDisplayName = 'flowDisplayName-554265505'; + $flow->setDisplayName($flowDisplayName); + $request = (new UpdateFlowRequest()) + ->setFlow($flow); + try { + $gapicClient->updateFlow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function validateFlowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new FlowValidationResult(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new ValidateFlowRequest()) + ->setName($formattedName); + $response = $gapicClient->validateFlow($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/ValidateFlow', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function validateFlowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new ValidateFlowRequest()) + ->setName($formattedName); + try { + $gapicClient->validateFlow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFlowAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $locked = true; + $expectedResponse = new Flow(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setLocked($locked); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $flow = new Flow(); + $flowDisplayName = 'flowDisplayName-554265505'; + $flow->setDisplayName($flowDisplayName); + $request = (new CreateFlowRequest()) + ->setParent($formattedParent) + ->setFlow($flow); + $response = $gapicClient->createFlowAsync($request)->wait(); + $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.cx.v3.Flows/CreateFlow', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFlow(); + $this->assertProtobufEquals($flow, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/GeneratorsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/GeneratorsClientTest.php new file mode 100644 index 000000000000..73d0e5ddb8a2 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/GeneratorsClientTest.php @@ -0,0 +1,599 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GeneratorsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GeneratorsClient($options); + } + + /** @test */ + public function createGeneratorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Generator(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $generator = new Generator(); + $generatorDisplayName = 'generatorDisplayName421654938'; + $generator->setDisplayName($generatorDisplayName); + $generatorPromptText = new Phrase(); + $promptTextText = 'promptTextText-1712080514'; + $generatorPromptText->setText($promptTextText); + $generator->setPromptText($generatorPromptText); + $request = (new CreateGeneratorRequest()) + ->setParent($formattedParent) + ->setGenerator($generator); + $response = $gapicClient->createGenerator($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Generators/CreateGenerator', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGenerator(); + $this->assertProtobufEquals($generator, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createGeneratorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $generator = new Generator(); + $generatorDisplayName = 'generatorDisplayName421654938'; + $generator->setDisplayName($generatorDisplayName); + $generatorPromptText = new Phrase(); + $promptTextText = 'promptTextText-1712080514'; + $generatorPromptText->setText($promptTextText); + $generator->setPromptText($generatorPromptText); + $request = (new CreateGeneratorRequest()) + ->setParent($formattedParent) + ->setGenerator($generator); + try { + $gapicClient->createGenerator($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteGeneratorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->generatorName('[PROJECT]', '[LOCATION]', '[AGENT]', '[GENERATOR]'); + $request = (new DeleteGeneratorRequest()) + ->setName($formattedName); + $gapicClient->deleteGenerator($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Generators/DeleteGenerator', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteGeneratorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->generatorName('[PROJECT]', '[LOCATION]', '[AGENT]', '[GENERATOR]'); + $request = (new DeleteGeneratorRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteGenerator($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGeneratorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Generator(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->generatorName('[PROJECT]', '[LOCATION]', '[AGENT]', '[GENERATOR]'); + $request = (new GetGeneratorRequest()) + ->setName($formattedName); + $response = $gapicClient->getGenerator($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Generators/GetGenerator', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGeneratorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->generatorName('[PROJECT]', '[LOCATION]', '[AGENT]', '[GENERATOR]'); + $request = (new GetGeneratorRequest()) + ->setName($formattedName); + try { + $gapicClient->getGenerator($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGeneratorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $generatorsElement = new Generator(); + $generators = [ + $generatorsElement, + ]; + $expectedResponse = new ListGeneratorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGenerators($generators); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ListGeneratorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listGenerators($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGenerators()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Generators/ListGenerators', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGeneratorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $request = (new ListGeneratorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listGenerators($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGeneratorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Generator(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $generator = new Generator(); + $generatorDisplayName = 'generatorDisplayName421654938'; + $generator->setDisplayName($generatorDisplayName); + $generatorPromptText = new Phrase(); + $promptTextText = 'promptTextText-1712080514'; + $generatorPromptText->setText($promptTextText); + $generator->setPromptText($generatorPromptText); + $request = (new UpdateGeneratorRequest()) + ->setGenerator($generator); + $response = $gapicClient->updateGenerator($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Generators/UpdateGenerator', $actualFuncCall); + $actualValue = $actualRequestObject->getGenerator(); + $this->assertProtobufEquals($generator, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGeneratorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $generator = new Generator(); + $generatorDisplayName = 'generatorDisplayName421654938'; + $generator->setDisplayName($generatorDisplayName); + $generatorPromptText = new Phrase(); + $promptTextText = 'promptTextText-1712080514'; + $generatorPromptText->setText($promptTextText); + $generator->setPromptText($generatorPromptText); + $request = (new UpdateGeneratorRequest()) + ->setGenerator($generator); + try { + $gapicClient->updateGenerator($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createGeneratorAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Generator(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $generator = new Generator(); + $generatorDisplayName = 'generatorDisplayName421654938'; + $generator->setDisplayName($generatorDisplayName); + $generatorPromptText = new Phrase(); + $promptTextText = 'promptTextText-1712080514'; + $generatorPromptText->setText($promptTextText); + $generator->setPromptText($generatorPromptText); + $request = (new CreateGeneratorRequest()) + ->setParent($formattedParent) + ->setGenerator($generator); + $response = $gapicClient->createGeneratorAsync($request)->wait(); + $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.cx.v3.Generators/CreateGenerator', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGenerator(); + $this->assertProtobufEquals($generator, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/IntentsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/IntentsClientTest.php new file mode 100644 index 000000000000..62a0b6fd30a7 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/IntentsClientTest.php @@ -0,0 +1,860 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return IntentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new IntentsClient($options); + } + + /** @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; + $description = 'description-1724546052'; + $expectedResponse = new Intent(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setPriority($priority); + $expectedResponse->setIsFallback($isFallback); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $intent = new Intent(); + $intentDisplayName = 'intentDisplayName-1733865935'; + $intent->setDisplayName($intentDisplayName); + $request = (new CreateIntentRequest()) + ->setParent($formattedParent) + ->setIntent($intent); + $response = $gapicClient->createIntent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]'); + $intent = new Intent(); + $intentDisplayName = 'intentDisplayName-1733865935'; + $intent->setDisplayName($intentDisplayName); + $request = (new CreateIntentRequest()) + ->setParent($formattedParent) + ->setIntent($intent); + try { + $gapicClient->createIntent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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]', '[LOCATION]', '[AGENT]', '[INTENT]'); + $request = (new DeleteIntentRequest()) + ->setName($formattedName); + $gapicClient->deleteIntent($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[INTENT]'); + $request = (new DeleteIntentRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteIntent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportIntentsTest() + { + $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/exportIntentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $intentsUri2 = 'intentsUri2776767799'; + $expectedResponse = new ExportIntentsResponse(); + $expectedResponse->setIntentsUri($intentsUri2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportIntentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $intents = []; + $request = (new ExportIntentsRequest()) + ->setParent($formattedParent) + ->setIntents($intents); + $response = $gapicClient->exportIntents($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Intents/ExportIntents', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIntents(); + $this->assertProtobufEquals($intents, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportIntentsTest'); + $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 exportIntentsExceptionTest() + { + $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/exportIntentsTest'); + $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]', '[LOCATION]', '[AGENT]'); + $intents = []; + $request = (new ExportIntentsRequest()) + ->setParent($formattedParent) + ->setIntents($intents); + $response = $gapicClient->exportIntents($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportIntentsTest'); + 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 getIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $priority = 1165461084; + $isFallback = false; + $description = 'description-1724546052'; + $expectedResponse = new Intent(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setPriority($priority); + $expectedResponse->setIsFallback($isFallback); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->intentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[INTENT]'); + $request = (new GetIntentRequest()) + ->setName($formattedName); + $response = $gapicClient->getIntent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[INTENT]'); + $request = (new GetIntentRequest()) + ->setName($formattedName); + try { + $gapicClient->getIntent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importIntentsTest() + { + $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/importIntentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportIntentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importIntentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ImportIntentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importIntents($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Intents/ImportIntents', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importIntentsTest'); + $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 importIntentsExceptionTest() + { + $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/importIntentsTest'); + $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]', '[LOCATION]', '[AGENT]'); + $request = (new ImportIntentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importIntents($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importIntentsTest'); + 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 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]', '[LOCATION]', '[AGENT]'); + $request = (new ListIntentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIntents($request); + $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.cx.v3.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]', '[LOCATION]', '[AGENT]'); + $request = (new ListIntentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIntents($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $priority = 1165461084; + $isFallback = false; + $description = 'description-1724546052'; + $expectedResponse = new Intent(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setPriority($priority); + $expectedResponse->setIsFallback($isFallback); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $intent = new Intent(); + $intentDisplayName = 'intentDisplayName-1733865935'; + $intent->setDisplayName($intentDisplayName); + $request = (new UpdateIntentRequest()) + ->setIntent($intent); + $response = $gapicClient->updateIntent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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); + $request = (new UpdateIntentRequest()) + ->setIntent($intent); + try { + $gapicClient->updateIntent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createIntentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $priority = 1165461084; + $isFallback = false; + $description = 'description-1724546052'; + $expectedResponse = new Intent(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setPriority($priority); + $expectedResponse->setIsFallback($isFallback); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $intent = new Intent(); + $intentDisplayName = 'intentDisplayName-1733865935'; + $intent->setDisplayName($intentDisplayName); + $request = (new CreateIntentRequest()) + ->setParent($formattedParent) + ->setIntent($intent); + $response = $gapicClient->createIntentAsync($request)->wait(); + $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.cx.v3.Intents/CreateIntent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getIntent(); + $this->assertProtobufEquals($intent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PagesClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PagesClientTest.php new file mode 100644 index 000000000000..86fbf47a887c --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PagesClientTest.php @@ -0,0 +1,586 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PagesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PagesClient($options); + } + + /** @test */ + public function createPageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Page(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $page = new Page(); + $pageDisplayName = 'pageDisplayName-1368703906'; + $page->setDisplayName($pageDisplayName); + $request = (new CreatePageRequest()) + ->setParent($formattedParent) + ->setPage($page); + $response = $gapicClient->createPage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Pages/CreatePage', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPage(); + $this->assertProtobufEquals($page, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $page = new Page(); + $pageDisplayName = 'pageDisplayName-1368703906'; + $page->setDisplayName($pageDisplayName); + $request = (new CreatePageRequest()) + ->setParent($formattedParent) + ->setPage($page); + try { + $gapicClient->createPage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); + $request = (new DeletePageRequest()) + ->setName($formattedName); + $gapicClient->deletePage($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Pages/DeletePage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); + $request = (new DeletePageRequest()) + ->setName($formattedName); + try { + $gapicClient->deletePage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Page(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); + $request = (new GetPageRequest()) + ->setName($formattedName); + $response = $gapicClient->getPage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Pages/GetPage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); + $request = (new GetPageRequest()) + ->setName($formattedName); + try { + $gapicClient->getPage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $pagesElement = new Page(); + $pages = [ + $pagesElement, + ]; + $expectedResponse = new ListPagesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPages($pages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new ListPagesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPages($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Pages/ListPages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new ListPagesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPages($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Page(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $page = new Page(); + $pageDisplayName = 'pageDisplayName-1368703906'; + $page->setDisplayName($pageDisplayName); + $request = (new UpdatePageRequest()) + ->setPage($page); + $response = $gapicClient->updatePage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Pages/UpdatePage', $actualFuncCall); + $actualValue = $actualRequestObject->getPage(); + $this->assertProtobufEquals($page, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $page = new Page(); + $pageDisplayName = 'pageDisplayName-1368703906'; + $page->setDisplayName($pageDisplayName); + $request = (new UpdatePageRequest()) + ->setPage($page); + try { + $gapicClient->updatePage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPageAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Page(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $page = new Page(); + $pageDisplayName = 'pageDisplayName-1368703906'; + $page->setDisplayName($pageDisplayName); + $request = (new CreatePageRequest()) + ->setParent($formattedParent) + ->setPage($page); + $response = $gapicClient->createPageAsync($request)->wait(); + $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.cx.v3.Pages/CreatePage', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPage(); + $this->assertProtobufEquals($page, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PlaybooksClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PlaybooksClientTest.php new file mode 100644 index 000000000000..b384d0adf1ad --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PlaybooksClientTest.php @@ -0,0 +1,1199 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PlaybooksClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PlaybooksClient($options); + } + + /** @test */ + public function createPlaybookTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $goal = 'goal3178259'; + $tokenCount = 1164226743; + $expectedResponse = new Playbook(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGoal($goal); + $expectedResponse->setTokenCount($tokenCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $playbook = new Playbook(); + $playbookDisplayName = 'playbookDisplayName-684478960'; + $playbook->setDisplayName($playbookDisplayName); + $playbookGoal = 'playbookGoal1238804688'; + $playbook->setGoal($playbookGoal); + $request = (new CreatePlaybookRequest()) + ->setParent($formattedParent) + ->setPlaybook($playbook); + $response = $gapicClient->createPlaybook($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/CreatePlaybook', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPlaybook(); + $this->assertProtobufEquals($playbook, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPlaybookExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $playbook = new Playbook(); + $playbookDisplayName = 'playbookDisplayName-684478960'; + $playbook->setDisplayName($playbookDisplayName); + $playbookGoal = 'playbookGoal1238804688'; + $playbook->setGoal($playbookGoal); + $request = (new CreatePlaybookRequest()) + ->setParent($formattedParent) + ->setPlaybook($playbook); + try { + $gapicClient->createPlaybook($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPlaybookVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new PlaybookVersion(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $playbookVersion = new PlaybookVersion(); + $request = (new CreatePlaybookVersionRequest()) + ->setParent($formattedParent) + ->setPlaybookVersion($playbookVersion); + $response = $gapicClient->createPlaybookVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/CreatePlaybookVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPlaybookVersion(); + $this->assertProtobufEquals($playbookVersion, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPlaybookVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $playbookVersion = new PlaybookVersion(); + $request = (new CreatePlaybookVersionRequest()) + ->setParent($formattedParent) + ->setPlaybookVersion($playbookVersion); + try { + $gapicClient->createPlaybookVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePlaybookTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $request = (new DeletePlaybookRequest()) + ->setName($formattedName); + $gapicClient->deletePlaybook($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/DeletePlaybook', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePlaybookExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $request = (new DeletePlaybookRequest()) + ->setName($formattedName); + try { + $gapicClient->deletePlaybook($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePlaybookVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); + $request = (new DeletePlaybookVersionRequest()) + ->setName($formattedName); + $gapicClient->deletePlaybookVersion($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/DeletePlaybookVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePlaybookVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); + $request = (new DeletePlaybookVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->deletePlaybookVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportPlaybookTest() + { + $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/exportPlaybookTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $playbookUri2 = 'playbookUri21478511485'; + $expectedResponse = new ExportPlaybookResponse(); + $expectedResponse->setPlaybookUri($playbookUri2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportPlaybookTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $request = (new ExportPlaybookRequest()) + ->setName($formattedName); + $response = $gapicClient->exportPlaybook($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/ExportPlaybook', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportPlaybookTest'); + $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 exportPlaybookExceptionTest() + { + $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/exportPlaybookTest'); + $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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $request = (new ExportPlaybookRequest()) + ->setName($formattedName); + $response = $gapicClient->exportPlaybook($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportPlaybookTest'); + 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 getPlaybookTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $goal = 'goal3178259'; + $tokenCount = 1164226743; + $expectedResponse = new Playbook(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGoal($goal); + $expectedResponse->setTokenCount($tokenCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $request = (new GetPlaybookRequest()) + ->setName($formattedName); + $response = $gapicClient->getPlaybook($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/GetPlaybook', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPlaybookExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $request = (new GetPlaybookRequest()) + ->setName($formattedName); + try { + $gapicClient->getPlaybook($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPlaybookVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new PlaybookVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); + $request = (new GetPlaybookVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->getPlaybookVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/GetPlaybookVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPlaybookVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); + $request = (new GetPlaybookVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->getPlaybookVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importPlaybookTest() + { + $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/importPlaybookTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $playbook = 'playbook1879182365'; + $expectedResponse = new ImportPlaybookResponse(); + $expectedResponse->setPlaybook($playbook); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importPlaybookTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ImportPlaybookRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importPlaybook($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/ImportPlaybook', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importPlaybookTest'); + $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 importPlaybookExceptionTest() + { + $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/importPlaybookTest'); + $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]', '[LOCATION]', '[AGENT]'); + $request = (new ImportPlaybookRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importPlaybook($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importPlaybookTest'); + 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 listPlaybookVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $playbookVersionsElement = new PlaybookVersion(); + $playbookVersions = [ + $playbookVersionsElement, + ]; + $expectedResponse = new ListPlaybookVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPlaybookVersions($playbookVersions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $request = (new ListPlaybookVersionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPlaybookVersions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPlaybookVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/ListPlaybookVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPlaybookVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); + $request = (new ListPlaybookVersionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPlaybookVersions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPlaybooksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $playbooksElement = new Playbook(); + $playbooks = [ + $playbooksElement, + ]; + $expectedResponse = new ListPlaybooksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPlaybooks($playbooks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ListPlaybooksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPlaybooks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPlaybooks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/ListPlaybooks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPlaybooksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $request = (new ListPlaybooksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPlaybooks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restorePlaybookVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RestorePlaybookVersionResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); + $request = (new RestorePlaybookVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->restorePlaybookVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/RestorePlaybookVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restorePlaybookVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); + $request = (new RestorePlaybookVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->restorePlaybookVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePlaybookTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $goal = 'goal3178259'; + $tokenCount = 1164226743; + $expectedResponse = new Playbook(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGoal($goal); + $expectedResponse->setTokenCount($tokenCount); + $transport->addResponse($expectedResponse); + // Mock request + $playbook = new Playbook(); + $playbookDisplayName = 'playbookDisplayName-684478960'; + $playbook->setDisplayName($playbookDisplayName); + $playbookGoal = 'playbookGoal1238804688'; + $playbook->setGoal($playbookGoal); + $request = (new UpdatePlaybookRequest()) + ->setPlaybook($playbook); + $response = $gapicClient->updatePlaybook($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Playbooks/UpdatePlaybook', $actualFuncCall); + $actualValue = $actualRequestObject->getPlaybook(); + $this->assertProtobufEquals($playbook, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePlaybookExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $playbook = new Playbook(); + $playbookDisplayName = 'playbookDisplayName-684478960'; + $playbook->setDisplayName($playbookDisplayName); + $playbookGoal = 'playbookGoal1238804688'; + $playbook->setGoal($playbookGoal); + $request = (new UpdatePlaybookRequest()) + ->setPlaybook($playbook); + try { + $gapicClient->updatePlaybook($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPlaybookAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $goal = 'goal3178259'; + $tokenCount = 1164226743; + $expectedResponse = new Playbook(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGoal($goal); + $expectedResponse->setTokenCount($tokenCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $playbook = new Playbook(); + $playbookDisplayName = 'playbookDisplayName-684478960'; + $playbook->setDisplayName($playbookDisplayName); + $playbookGoal = 'playbookGoal1238804688'; + $playbook->setGoal($playbookGoal); + $request = (new CreatePlaybookRequest()) + ->setParent($formattedParent) + ->setPlaybook($playbook); + $response = $gapicClient->createPlaybookAsync($request)->wait(); + $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.cx.v3.Playbooks/CreatePlaybook', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPlaybook(); + $this->assertProtobufEquals($playbook, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SecuritySettingsServiceClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SecuritySettingsServiceClientTest.php new file mode 100644 index 000000000000..eaa661dda158 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SecuritySettingsServiceClientTest.php @@ -0,0 +1,609 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SecuritySettingsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SecuritySettingsServiceClient($options); + } + + /** @test */ + public function createSecuritySettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $inspectTemplate = 'inspectTemplate-159468987'; + $deidentifyTemplate = 'deidentifyTemplate1397891564'; + $retentionWindowDays = 810238885; + $expectedResponse = new SecuritySettings(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setInspectTemplate($inspectTemplate); + $expectedResponse->setDeidentifyTemplate($deidentifyTemplate); + $expectedResponse->setRetentionWindowDays($retentionWindowDays); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $securitySettings = new SecuritySettings(); + $securitySettingsDisplayName = 'securitySettingsDisplayName1233938154'; + $securitySettings->setDisplayName($securitySettingsDisplayName); + $request = (new CreateSecuritySettingsRequest()) + ->setParent($formattedParent) + ->setSecuritySettings($securitySettings); + $response = $gapicClient->createSecuritySettings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.SecuritySettingsService/CreateSecuritySettings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSecuritySettings(); + $this->assertProtobufEquals($securitySettings, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSecuritySettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $securitySettings = new SecuritySettings(); + $securitySettingsDisplayName = 'securitySettingsDisplayName1233938154'; + $securitySettings->setDisplayName($securitySettingsDisplayName); + $request = (new CreateSecuritySettingsRequest()) + ->setParent($formattedParent) + ->setSecuritySettings($securitySettings); + try { + $gapicClient->createSecuritySettings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSecuritySettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->securitySettingsName('[PROJECT]', '[LOCATION]', '[SECURITY_SETTINGS]'); + $request = (new DeleteSecuritySettingsRequest()) + ->setName($formattedName); + $gapicClient->deleteSecuritySettings($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.SecuritySettingsService/DeleteSecuritySettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSecuritySettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->securitySettingsName('[PROJECT]', '[LOCATION]', '[SECURITY_SETTINGS]'); + $request = (new DeleteSecuritySettingsRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSecuritySettings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSecuritySettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $inspectTemplate = 'inspectTemplate-159468987'; + $deidentifyTemplate = 'deidentifyTemplate1397891564'; + $retentionWindowDays = 810238885; + $expectedResponse = new SecuritySettings(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setInspectTemplate($inspectTemplate); + $expectedResponse->setDeidentifyTemplate($deidentifyTemplate); + $expectedResponse->setRetentionWindowDays($retentionWindowDays); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->securitySettingsName('[PROJECT]', '[LOCATION]', '[SECURITY_SETTINGS]'); + $request = (new GetSecuritySettingsRequest()) + ->setName($formattedName); + $response = $gapicClient->getSecuritySettings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.SecuritySettingsService/GetSecuritySettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSecuritySettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->securitySettingsName('[PROJECT]', '[LOCATION]', '[SECURITY_SETTINGS]'); + $request = (new GetSecuritySettingsRequest()) + ->setName($formattedName); + try { + $gapicClient->getSecuritySettings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSecuritySettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $securitySettingsElement = new SecuritySettings(); + $securitySettings = [ + $securitySettingsElement, + ]; + $expectedResponse = new ListSecuritySettingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSecuritySettings($securitySettings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSecuritySettingsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSecuritySettings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSecuritySettings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.SecuritySettingsService/ListSecuritySettings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSecuritySettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSecuritySettingsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSecuritySettings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSecuritySettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $inspectTemplate = 'inspectTemplate-159468987'; + $deidentifyTemplate = 'deidentifyTemplate1397891564'; + $retentionWindowDays = 810238885; + $expectedResponse = new SecuritySettings(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setInspectTemplate($inspectTemplate); + $expectedResponse->setDeidentifyTemplate($deidentifyTemplate); + $expectedResponse->setRetentionWindowDays($retentionWindowDays); + $transport->addResponse($expectedResponse); + // Mock request + $securitySettings = new SecuritySettings(); + $securitySettingsDisplayName = 'securitySettingsDisplayName1233938154'; + $securitySettings->setDisplayName($securitySettingsDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateSecuritySettingsRequest()) + ->setSecuritySettings($securitySettings) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateSecuritySettings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.SecuritySettingsService/UpdateSecuritySettings', $actualFuncCall); + $actualValue = $actualRequestObject->getSecuritySettings(); + $this->assertProtobufEquals($securitySettings, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSecuritySettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $securitySettings = new SecuritySettings(); + $securitySettingsDisplayName = 'securitySettingsDisplayName1233938154'; + $securitySettings->setDisplayName($securitySettingsDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateSecuritySettingsRequest()) + ->setSecuritySettings($securitySettings) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateSecuritySettings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSecuritySettingsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $inspectTemplate = 'inspectTemplate-159468987'; + $deidentifyTemplate = 'deidentifyTemplate1397891564'; + $retentionWindowDays = 810238885; + $expectedResponse = new SecuritySettings(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setInspectTemplate($inspectTemplate); + $expectedResponse->setDeidentifyTemplate($deidentifyTemplate); + $expectedResponse->setRetentionWindowDays($retentionWindowDays); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $securitySettings = new SecuritySettings(); + $securitySettingsDisplayName = 'securitySettingsDisplayName1233938154'; + $securitySettings->setDisplayName($securitySettingsDisplayName); + $request = (new CreateSecuritySettingsRequest()) + ->setParent($formattedParent) + ->setSecuritySettings($securitySettings); + $response = $gapicClient->createSecuritySettingsAsync($request)->wait(); + $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.cx.v3.SecuritySettingsService/CreateSecuritySettings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSecuritySettings(); + $this->assertProtobufEquals($securitySettings, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionEntityTypesClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionEntityTypesClientTest.php new file mode 100644 index 000000000000..480debe475a3 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionEntityTypesClientTest.php @@ -0,0 +1,591 @@ +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]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $sessionEntityType = new SessionEntityType(); + $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; + $sessionEntityType->setName($sessionEntityTypeName); + $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; + $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); + $sessionEntityTypeEntities = []; + $sessionEntityType->setEntities($sessionEntityTypeEntities); + $request = (new CreateSessionEntityTypeRequest()) + ->setParent($formattedParent) + ->setSessionEntityType($sessionEntityType); + $response = $gapicClient->createSessionEntityType($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $sessionEntityType = new SessionEntityType(); + $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; + $sessionEntityType->setName($sessionEntityTypeName); + $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; + $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); + $sessionEntityTypeEntities = []; + $sessionEntityType->setEntities($sessionEntityTypeEntities); + $request = (new CreateSessionEntityTypeRequest()) + ->setParent($formattedParent) + ->setSessionEntityType($sessionEntityType); + try { + $gapicClient->createSessionEntityType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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]', '[LOCATION]', '[AGENT]', '[SESSION]', '[ENTITY_TYPE]'); + $request = (new DeleteSessionEntityTypeRequest()) + ->setName($formattedName); + $gapicClient->deleteSessionEntityType($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[SESSION]', '[ENTITY_TYPE]'); + $request = (new DeleteSessionEntityTypeRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSessionEntityType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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]', '[LOCATION]', '[AGENT]', '[SESSION]', '[ENTITY_TYPE]'); + $request = (new GetSessionEntityTypeRequest()) + ->setName($formattedName); + $response = $gapicClient->getSessionEntityType($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[SESSION]', '[ENTITY_TYPE]'); + $request = (new GetSessionEntityTypeRequest()) + ->setName($formattedName); + try { + $gapicClient->getSessionEntityType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $request = (new ListSessionEntityTypesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSessionEntityTypes($request); + $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.cx.v3.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]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $request = (new ListSessionEntityTypesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSessionEntityTypes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = (new UpdateSessionEntityTypeRequest()) + ->setSessionEntityType($sessionEntityType); + $response = $gapicClient->updateSessionEntityType($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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); + $request = (new UpdateSessionEntityTypeRequest()) + ->setSessionEntityType($sessionEntityType); + try { + $gapicClient->updateSessionEntityType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSessionEntityTypeAsyncTest() + { + $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]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $sessionEntityType = new SessionEntityType(); + $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; + $sessionEntityType->setName($sessionEntityTypeName); + $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; + $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); + $sessionEntityTypeEntities = []; + $sessionEntityType->setEntities($sessionEntityTypeEntities); + $request = (new CreateSessionEntityTypeRequest()) + ->setParent($formattedParent) + ->setSessionEntityType($sessionEntityType); + $response = $gapicClient->createSessionEntityTypeAsync($request)->wait(); + $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.cx.v3.SessionEntityTypes/CreateSessionEntityType', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSessionEntityType(); + $this->assertProtobufEquals($sessionEntityType, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionsClientTest.php new file mode 100644 index 000000000000..29900ec9cf13 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionsClientTest.php @@ -0,0 +1,728 @@ +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'; + $allowCancellation = false; + $expectedResponse = new DetectIntentResponse(); + $expectedResponse->setResponseId($responseId); + $expectedResponse->setOutputAudio($outputAudio); + $expectedResponse->setAllowCancellation($allowCancellation); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $queryInput = new QueryInput(); + $queryInputLanguageCode = 'queryInputLanguageCode478766695'; + $queryInput->setLanguageCode($queryInputLanguageCode); + $request = (new DetectIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + $response = $gapicClient->detectIntent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $queryInput = new QueryInput(); + $queryInputLanguageCode = 'queryInputLanguageCode478766695'; + $queryInput->setLanguageCode($queryInputLanguageCode); + $request = (new DetectIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + try { + $gapicClient->detectIntent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fulfillIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $responseId = 'responseId1847552473'; + $outputAudio = '24'; + $expectedResponse = new FulfillIntentResponse(); + $expectedResponse->setResponseId($responseId); + $expectedResponse->setOutputAudio($outputAudio); + $transport->addResponse($expectedResponse); + $request = new FulfillIntentRequest(); + $response = $gapicClient->fulfillIntent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Sessions/FulfillIntent', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fulfillIntentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new FulfillIntentRequest(); + try { + $gapicClient->fulfillIntent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function matchIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $text = 'text3556653'; + $expectedResponse = new MatchIntentResponse(); + $expectedResponse->setText($text); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $queryInput = new QueryInput(); + $queryInputLanguageCode = 'queryInputLanguageCode478766695'; + $queryInput->setLanguageCode($queryInputLanguageCode); + $request = (new MatchIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + $response = $gapicClient->matchIntent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Sessions/MatchIntent', $actualFuncCall); + $actualValue = $actualRequestObject->getSession(); + $this->assertProtobufEquals($formattedSession, $actualValue); + $actualValue = $actualRequestObject->getQueryInput(); + $this->assertProtobufEquals($queryInput, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function matchIntentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $queryInput = new QueryInput(); + $queryInputLanguageCode = 'queryInputLanguageCode478766695'; + $queryInput->setLanguageCode($queryInputLanguageCode); + $request = (new MatchIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + try { + $gapicClient->matchIntent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function serverStreamingDetectIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $responseId = 'responseId1847552473'; + $outputAudio = '24'; + $allowCancellation = false; + $expectedResponse = new DetectIntentResponse(); + $expectedResponse->setResponseId($responseId); + $expectedResponse->setOutputAudio($outputAudio); + $expectedResponse->setAllowCancellation($allowCancellation); + $transport->addResponse($expectedResponse); + $responseId2 = 'responseId21676436300'; + $outputAudio2 = '-53'; + $allowCancellation2 = true; + $expectedResponse2 = new DetectIntentResponse(); + $expectedResponse2->setResponseId($responseId2); + $expectedResponse2->setOutputAudio($outputAudio2); + $expectedResponse2->setAllowCancellation($allowCancellation2); + $transport->addResponse($expectedResponse2); + $responseId3 = 'responseId31676436301'; + $outputAudio3 = '-52'; + $allowCancellation3 = false; + $expectedResponse3 = new DetectIntentResponse(); + $expectedResponse3->setResponseId($responseId3); + $expectedResponse3->setOutputAudio($outputAudio3); + $expectedResponse3->setAllowCancellation($allowCancellation3); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $queryInput = new QueryInput(); + $queryInputLanguageCode = 'queryInputLanguageCode478766695'; + $queryInput->setLanguageCode($queryInputLanguageCode); + $request = (new DetectIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + $serverStream = $gapicClient->serverStreamingDetectIntent($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Sessions/ServerStreamingDetectIntent', $actualFuncCall); + $actualValue = $actualRequestObject->getSession(); + $this->assertProtobufEquals($formattedSession, $actualValue); + $actualValue = $actualRequestObject->getQueryInput(); + $this->assertProtobufEquals($queryInput, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function serverStreamingDetectIntentExceptionTest() + { + $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()); + // Mock request + $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $queryInput = new QueryInput(); + $queryInputLanguageCode = 'queryInputLanguageCode478766695'; + $queryInput->setLanguageCode($queryInputLanguageCode); + $request = (new DetectIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + $serverStream = $gapicClient->serverStreamingDetectIntent($request); + $results = $serverStream->readAll(); + 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 streamingDetectIntentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new StreamingDetectIntentResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new StreamingDetectIntentResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new StreamingDetectIntentResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $queryInput = new QueryInput(); + $queryInputLanguageCode = 'queryInputLanguageCode478766695'; + $queryInput->setLanguageCode($queryInputLanguageCode); + $request = new StreamingDetectIntentRequest(); + $request->setQueryInput($queryInput); + $queryInput2 = new QueryInput(); + $queryInputLanguageCode = 'queryInputLanguageCode478766695'; + $queryInput2->setLanguageCode($queryInputLanguageCode); + $request2 = new StreamingDetectIntentRequest(); + $request2->setQueryInput($queryInput2); + $queryInput3 = new QueryInput(); + $queryInputLanguageCode = 'queryInputLanguageCode478766695'; + $queryInput3->setLanguageCode($queryInputLanguageCode); + $request3 = new StreamingDetectIntentRequest(); + $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.cx.v3.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 submitAnswerFeedbackTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $customRating = 'customRating1123127851'; + $expectedResponse = new AnswerFeedback(); + $expectedResponse->setCustomRating($customRating); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $responseId = 'responseId1847552473'; + $answerFeedback = new AnswerFeedback(); + $request = (new SubmitAnswerFeedbackRequest()) + ->setSession($formattedSession) + ->setResponseId($responseId) + ->setAnswerFeedback($answerFeedback); + $response = $gapicClient->submitAnswerFeedback($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Sessions/SubmitAnswerFeedback', $actualFuncCall); + $actualValue = $actualRequestObject->getSession(); + $this->assertProtobufEquals($formattedSession, $actualValue); + $actualValue = $actualRequestObject->getResponseId(); + $this->assertProtobufEquals($responseId, $actualValue); + $actualValue = $actualRequestObject->getAnswerFeedback(); + $this->assertProtobufEquals($answerFeedback, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function submitAnswerFeedbackExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $responseId = 'responseId1847552473'; + $answerFeedback = new AnswerFeedback(); + $request = (new SubmitAnswerFeedbackRequest()) + ->setSession($formattedSession) + ->setResponseId($responseId) + ->setAnswerFeedback($answerFeedback); + try { + $gapicClient->submitAnswerFeedback($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function detectIntentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $responseId = 'responseId1847552473'; + $outputAudio = '24'; + $allowCancellation = false; + $expectedResponse = new DetectIntentResponse(); + $expectedResponse->setResponseId($responseId); + $expectedResponse->setOutputAudio($outputAudio); + $expectedResponse->setAllowCancellation($allowCancellation); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); + $queryInput = new QueryInput(); + $queryInputLanguageCode = 'queryInputLanguageCode478766695'; + $queryInput->setLanguageCode($queryInputLanguageCode); + $request = (new DetectIntentRequest()) + ->setSession($formattedSession) + ->setQueryInput($queryInput); + $response = $gapicClient->detectIntentAsync($request)->wait(); + $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.cx.v3.Sessions/DetectIntent', $actualFuncCall); + $actualValue = $actualRequestObject->getSession(); + $this->assertProtobufEquals($formattedSession, $actualValue); + $actualValue = $actualRequestObject->getQueryInput(); + $this->assertProtobufEquals($queryInput, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TestCasesClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TestCasesClientTest.php new file mode 100644 index 000000000000..ec73cf27a1ba --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TestCasesClientTest.php @@ -0,0 +1,1318 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TestCasesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TestCasesClient($options); + } + + /** @test */ + public function batchDeleteTestCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $formattedNames = [ + $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'), + ]; + $request = (new BatchDeleteTestCasesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $gapicClient->batchDeleteTestCases($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/BatchDeleteTestCases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeleteTestCasesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $formattedNames = [ + $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'), + ]; + $request = (new BatchDeleteTestCasesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + try { + $gapicClient->batchDeleteTestCases($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchRunTestCasesTest() + { + $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/batchRunTestCasesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchRunTestCasesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchRunTestCasesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $formattedTestCases = [ + $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'), + ]; + $request = (new BatchRunTestCasesRequest()) + ->setParent($formattedParent) + ->setTestCases($formattedTestCases); + $response = $gapicClient->batchRunTestCases($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/BatchRunTestCases', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTestCases(); + $this->assertProtobufEquals($formattedTestCases, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchRunTestCasesTest'); + $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 batchRunTestCasesExceptionTest() + { + $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/batchRunTestCasesTest'); + $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]', '[LOCATION]', '[AGENT]'); + $formattedTestCases = [ + $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'), + ]; + $request = (new BatchRunTestCasesRequest()) + ->setParent($formattedParent) + ->setTestCases($formattedTestCases); + $response = $gapicClient->batchRunTestCases($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchRunTestCasesTest'); + 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 calculateCoverageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $agent2 = 'agent2-1060986504'; + $expectedResponse = new CalculateCoverageResponse(); + $expectedResponse->setAgent($agent2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedAgent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $type = CoverageType::COVERAGE_TYPE_UNSPECIFIED; + $request = (new CalculateCoverageRequest()) + ->setAgent($formattedAgent) + ->setType($type); + $response = $gapicClient->calculateCoverage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/CalculateCoverage', $actualFuncCall); + $actualValue = $actualRequestObject->getAgent(); + $this->assertProtobufEquals($formattedAgent, $actualValue); + $actualValue = $actualRequestObject->getType(); + $this->assertProtobufEquals($type, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function calculateCoverageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedAgent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $type = CoverageType::COVERAGE_TYPE_UNSPECIFIED; + $request = (new CalculateCoverageRequest()) + ->setAgent($formattedAgent) + ->setType($type); + try { + $gapicClient->calculateCoverage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTestCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $notes = 'notes105008833'; + $expectedResponse = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNotes($notes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $testCase = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); + $testCaseDisplayName = 'testCaseDisplayName1109893675'; + $testCase->setDisplayName($testCaseDisplayName); + $request = (new CreateTestCaseRequest()) + ->setParent($formattedParent) + ->setTestCase($testCase); + $response = $gapicClient->createTestCase($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/CreateTestCase', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTestCase(); + $this->assertProtobufEquals($testCase, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTestCaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $testCase = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); + $testCaseDisplayName = 'testCaseDisplayName1109893675'; + $testCase->setDisplayName($testCaseDisplayName); + $request = (new CreateTestCaseRequest()) + ->setParent($formattedParent) + ->setTestCase($testCase); + try { + $gapicClient->createTestCase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportTestCasesTest() + { + $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/exportTestCasesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $gcsUri2 = 'gcsUri21070344951'; + $expectedResponse = new ExportTestCasesResponse(); + $expectedResponse->setGcsUri($gcsUri2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportTestCasesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ExportTestCasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->exportTestCases($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/ExportTestCases', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportTestCasesTest'); + $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 exportTestCasesExceptionTest() + { + $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/exportTestCasesTest'); + $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]', '[LOCATION]', '[AGENT]'); + $request = (new ExportTestCasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->exportTestCases($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportTestCasesTest'); + 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 getTestCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $notes = 'notes105008833'; + $expectedResponse = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNotes($notes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); + $request = (new GetTestCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->getTestCase($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/GetTestCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTestCaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); + $request = (new GetTestCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->getTestCase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTestCaseResultTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $environment = 'environment-85904877'; + $expectedResponse = new TestCaseResult(); + $expectedResponse->setName($name2); + $expectedResponse->setEnvironment($environment); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->testCaseResultName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]', '[RESULT]'); + $request = (new GetTestCaseResultRequest()) + ->setName($formattedName); + $response = $gapicClient->getTestCaseResult($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/GetTestCaseResult', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTestCaseResultExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->testCaseResultName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]', '[RESULT]'); + $request = (new GetTestCaseResultRequest()) + ->setName($formattedName); + try { + $gapicClient->getTestCaseResult($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importTestCasesTest() + { + $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/importTestCasesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportTestCasesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importTestCasesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ImportTestCasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importTestCases($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/ImportTestCases', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importTestCasesTest'); + $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 importTestCasesExceptionTest() + { + $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/importTestCasesTest'); + $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]', '[LOCATION]', '[AGENT]'); + $request = (new ImportTestCasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importTestCases($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importTestCasesTest'); + 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 listTestCaseResultsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $testCaseResultsElement = new TestCaseResult(); + $testCaseResults = [ + $testCaseResultsElement, + ]; + $expectedResponse = new ListTestCaseResultsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTestCaseResults($testCaseResults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); + $request = (new ListTestCaseResultsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTestCaseResults($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTestCaseResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/ListTestCaseResults', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTestCaseResultsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); + $request = (new ListTestCaseResultsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTestCaseResults($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTestCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $testCasesElement = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); + $testCases = [ + $testCasesElement, + ]; + $expectedResponse = new ListTestCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTestCases($testCases); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ListTestCasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTestCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTestCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/ListTestCases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTestCasesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $request = (new ListTestCasesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTestCases($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTestCaseTest() + { + $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/runTestCaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RunTestCaseResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runTestCaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); + $request = (new RunTestCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->runTestCase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/RunTestCase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runTestCaseTest'); + $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 runTestCaseExceptionTest() + { + $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/runTestCaseTest'); + $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->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); + $request = (new RunTestCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->runTestCase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runTestCaseTest'); + 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 updateTestCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $notes = 'notes105008833'; + $expectedResponse = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNotes($notes); + $transport->addResponse($expectedResponse); + // Mock request + $testCase = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); + $testCaseDisplayName = 'testCaseDisplayName1109893675'; + $testCase->setDisplayName($testCaseDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateTestCaseRequest()) + ->setTestCase($testCase) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateTestCase($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/UpdateTestCase', $actualFuncCall); + $actualValue = $actualRequestObject->getTestCase(); + $this->assertProtobufEquals($testCase, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTestCaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $testCase = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); + $testCaseDisplayName = 'testCaseDisplayName1109893675'; + $testCase->setDisplayName($testCaseDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateTestCaseRequest()) + ->setTestCase($testCase) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateTestCase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeleteTestCasesAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $formattedNames = [ + $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'), + ]; + $request = (new BatchDeleteTestCasesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $gapicClient->batchDeleteTestCasesAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/BatchDeleteTestCases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ToolsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ToolsClientTest.php new file mode 100644 index 000000000000..eceeaf6cb17b --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ToolsClientTest.php @@ -0,0 +1,953 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ToolsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ToolsClient($options); + } + + /** @test */ + public function createToolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Tool(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $tool = new Tool(); + $toolDisplayName = 'toolDisplayName435004853'; + $tool->setDisplayName($toolDisplayName); + $toolDescription = 'toolDescription1291277124'; + $tool->setDescription($toolDescription); + $request = (new CreateToolRequest()) + ->setParent($formattedParent) + ->setTool($tool); + $response = $gapicClient->createTool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Tools/CreateTool', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTool(); + $this->assertProtobufEquals($tool, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createToolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $tool = new Tool(); + $toolDisplayName = 'toolDisplayName435004853'; + $tool->setDisplayName($toolDisplayName); + $toolDescription = 'toolDescription1291277124'; + $tool->setDescription($toolDescription); + $request = (new CreateToolRequest()) + ->setParent($formattedParent) + ->setTool($tool); + try { + $gapicClient->createTool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createToolVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ToolVersion(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + $toolVersion = new ToolVersion(); + $toolVersionDisplayName = 'toolVersionDisplayName1899387437'; + $toolVersion->setDisplayName($toolVersionDisplayName); + $toolVersionTool = new Tool(); + $toolDisplayName = 'toolDisplayName435004853'; + $toolVersionTool->setDisplayName($toolDisplayName); + $toolDescription = 'toolDescription1291277124'; + $toolVersionTool->setDescription($toolDescription); + $toolVersion->setTool($toolVersionTool); + $request = (new CreateToolVersionRequest()) + ->setParent($formattedParent) + ->setToolVersion($toolVersion); + $response = $gapicClient->createToolVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Tools/CreateToolVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getToolVersion(); + $this->assertProtobufEquals($toolVersion, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createToolVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + $toolVersion = new ToolVersion(); + $toolVersionDisplayName = 'toolVersionDisplayName1899387437'; + $toolVersion->setDisplayName($toolVersionDisplayName); + $toolVersionTool = new Tool(); + $toolDisplayName = 'toolDisplayName435004853'; + $toolVersionTool->setDisplayName($toolDisplayName); + $toolDescription = 'toolDescription1291277124'; + $toolVersionTool->setDescription($toolDescription); + $toolVersion->setTool($toolVersionTool); + $request = (new CreateToolVersionRequest()) + ->setParent($formattedParent) + ->setToolVersion($toolVersion); + try { + $gapicClient->createToolVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteToolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + $request = (new DeleteToolRequest()) + ->setName($formattedName); + $gapicClient->deleteTool($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Tools/DeleteTool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteToolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + $request = (new DeleteToolRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteTool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteToolVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); + $request = (new DeleteToolVersionRequest()) + ->setName($formattedName); + $gapicClient->deleteToolVersion($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Tools/DeleteToolVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteToolVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); + $request = (new DeleteToolVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteToolVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getToolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Tool(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + $request = (new GetToolRequest()) + ->setName($formattedName); + $response = $gapicClient->getTool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Tools/GetTool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getToolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + $request = (new GetToolRequest()) + ->setName($formattedName); + try { + $gapicClient->getTool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getToolVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ToolVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); + $request = (new GetToolVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->getToolVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Tools/GetToolVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getToolVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); + $request = (new GetToolVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->getToolVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listToolVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $toolVersionsElement = new ToolVersion(); + $toolVersions = [ + $toolVersionsElement, + ]; + $expectedResponse = new ListToolVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setToolVersions($toolVersions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + $request = (new ListToolVersionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listToolVersions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getToolVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Tools/ListToolVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listToolVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); + $request = (new ListToolVersionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listToolVersions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listToolsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $toolsElement = new Tool(); + $tools = [ + $toolsElement, + ]; + $expectedResponse = new ListToolsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTools($tools); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ListToolsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTools($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTools()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Tools/ListTools', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listToolsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $request = (new ListToolsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTools($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreToolVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RestoreToolVersionResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); + $request = (new RestoreToolVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->restoreToolVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Tools/RestoreToolVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreToolVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); + $request = (new RestoreToolVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->restoreToolVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateToolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Tool(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $tool = new Tool(); + $toolDisplayName = 'toolDisplayName435004853'; + $tool->setDisplayName($toolDisplayName); + $toolDescription = 'toolDescription1291277124'; + $tool->setDescription($toolDescription); + $request = (new UpdateToolRequest()) + ->setTool($tool); + $response = $gapicClient->updateTool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Tools/UpdateTool', $actualFuncCall); + $actualValue = $actualRequestObject->getTool(); + $this->assertProtobufEquals($tool, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateToolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $tool = new Tool(); + $toolDisplayName = 'toolDisplayName435004853'; + $tool->setDisplayName($toolDisplayName); + $toolDescription = 'toolDescription1291277124'; + $tool->setDescription($toolDescription); + $request = (new UpdateToolRequest()) + ->setTool($tool); + try { + $gapicClient->updateTool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createToolAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Tool(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $tool = new Tool(); + $toolDisplayName = 'toolDisplayName435004853'; + $tool->setDisplayName($toolDisplayName); + $toolDescription = 'toolDescription1291277124'; + $tool->setDescription($toolDescription); + $request = (new CreateToolRequest()) + ->setParent($formattedParent) + ->setTool($tool); + $response = $gapicClient->createToolAsync($request)->wait(); + $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.cx.v3.Tools/CreateTool', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTool(); + $this->assertProtobufEquals($tool, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TransitionRouteGroupsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TransitionRouteGroupsClientTest.php new file mode 100644 index 000000000000..16f0ccaab272 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TransitionRouteGroupsClientTest.php @@ -0,0 +1,578 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TransitionRouteGroupsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TransitionRouteGroupsClient($options); + } + + /** @test */ + public function createTransitionRouteGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new TransitionRouteGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $transitionRouteGroup = new TransitionRouteGroup(); + $transitionRouteGroupDisplayName = 'transitionRouteGroupDisplayName-1406267262'; + $transitionRouteGroup->setDisplayName($transitionRouteGroupDisplayName); + $request = (new CreateTransitionRouteGroupRequest()) + ->setParent($formattedParent) + ->setTransitionRouteGroup($transitionRouteGroup); + $response = $gapicClient->createTransitionRouteGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TransitionRouteGroups/CreateTransitionRouteGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTransitionRouteGroup(); + $this->assertProtobufEquals($transitionRouteGroup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTransitionRouteGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $transitionRouteGroup = new TransitionRouteGroup(); + $transitionRouteGroupDisplayName = 'transitionRouteGroupDisplayName-1406267262'; + $transitionRouteGroup->setDisplayName($transitionRouteGroupDisplayName); + $request = (new CreateTransitionRouteGroupRequest()) + ->setParent($formattedParent) + ->setTransitionRouteGroup($transitionRouteGroup); + try { + $gapicClient->createTransitionRouteGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTransitionRouteGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->transitionRouteGroupName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[TRANSITION_ROUTE_GROUP]'); + $request = (new DeleteTransitionRouteGroupRequest()) + ->setName($formattedName); + $gapicClient->deleteTransitionRouteGroup($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TransitionRouteGroups/DeleteTransitionRouteGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTransitionRouteGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->transitionRouteGroupName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[TRANSITION_ROUTE_GROUP]'); + $request = (new DeleteTransitionRouteGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteTransitionRouteGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTransitionRouteGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new TransitionRouteGroup(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->transitionRouteGroupName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[TRANSITION_ROUTE_GROUP]'); + $request = (new GetTransitionRouteGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getTransitionRouteGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TransitionRouteGroups/GetTransitionRouteGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTransitionRouteGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->transitionRouteGroupName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[TRANSITION_ROUTE_GROUP]'); + $request = (new GetTransitionRouteGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getTransitionRouteGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTransitionRouteGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $transitionRouteGroupsElement = new TransitionRouteGroup(); + $transitionRouteGroups = [ + $transitionRouteGroupsElement, + ]; + $expectedResponse = new ListTransitionRouteGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTransitionRouteGroups($transitionRouteGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new ListTransitionRouteGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTransitionRouteGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTransitionRouteGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TransitionRouteGroups/ListTransitionRouteGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTransitionRouteGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new ListTransitionRouteGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTransitionRouteGroups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTransitionRouteGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new TransitionRouteGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $transitionRouteGroup = new TransitionRouteGroup(); + $transitionRouteGroupDisplayName = 'transitionRouteGroupDisplayName-1406267262'; + $transitionRouteGroup->setDisplayName($transitionRouteGroupDisplayName); + $request = (new UpdateTransitionRouteGroupRequest()) + ->setTransitionRouteGroup($transitionRouteGroup); + $response = $gapicClient->updateTransitionRouteGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.TransitionRouteGroups/UpdateTransitionRouteGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getTransitionRouteGroup(); + $this->assertProtobufEquals($transitionRouteGroup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTransitionRouteGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $transitionRouteGroup = new TransitionRouteGroup(); + $transitionRouteGroupDisplayName = 'transitionRouteGroupDisplayName-1406267262'; + $transitionRouteGroup->setDisplayName($transitionRouteGroupDisplayName); + $request = (new UpdateTransitionRouteGroupRequest()) + ->setTransitionRouteGroup($transitionRouteGroup); + try { + $gapicClient->updateTransitionRouteGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTransitionRouteGroupAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new TransitionRouteGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $transitionRouteGroup = new TransitionRouteGroup(); + $transitionRouteGroupDisplayName = 'transitionRouteGroupDisplayName-1406267262'; + $transitionRouteGroup->setDisplayName($transitionRouteGroupDisplayName); + $request = (new CreateTransitionRouteGroupRequest()) + ->setParent($formattedParent) + ->setTransitionRouteGroup($transitionRouteGroup); + $response = $gapicClient->createTransitionRouteGroupAsync($request)->wait(); + $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.cx.v3.TransitionRouteGroups/CreateTransitionRouteGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTransitionRouteGroup(); + $this->assertProtobufEquals($transitionRouteGroup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/VersionsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/VersionsClientTest.php new file mode 100644 index 000000000000..4fe2a4f1d78d --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/VersionsClientTest.php @@ -0,0 +1,848 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VersionsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VersionsClient($options); + } + + /** @test */ + public function compareVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $baseVersionContentJson = 'baseVersionContentJson359428515'; + $targetVersionContentJson = 'targetVersionContentJson-1079099677'; + $expectedResponse = new CompareVersionsResponse(); + $expectedResponse->setBaseVersionContentJson($baseVersionContentJson); + $expectedResponse->setTargetVersionContentJson($targetVersionContentJson); + $transport->addResponse($expectedResponse); + // Mock request + $formattedBaseVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $formattedTargetVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new CompareVersionsRequest()) + ->setBaseVersion($formattedBaseVersion) + ->setTargetVersion($formattedTargetVersion); + $response = $gapicClient->compareVersions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Versions/CompareVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getBaseVersion(); + $this->assertProtobufEquals($formattedBaseVersion, $actualValue); + $actualValue = $actualRequestObject->getTargetVersion(); + $this->assertProtobufEquals($formattedTargetVersion, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function compareVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedBaseVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $formattedTargetVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new CompareVersionsRequest()) + ->setBaseVersion($formattedBaseVersion) + ->setTargetVersion($formattedTargetVersion); + try { + $gapicClient->compareVersions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createVersionTest() + { + $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/createVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Version(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createVersionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $version = new Version(); + $versionDisplayName = 'versionDisplayName1702521461'; + $version->setDisplayName($versionDisplayName); + $request = (new CreateVersionRequest()) + ->setParent($formattedParent) + ->setVersion($version); + $response = $gapicClient->createVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Versions/CreateVersion', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getVersion(); + $this->assertProtobufEquals($version, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVersionTest'); + $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 createVersionExceptionTest() + { + $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/createVersionTest'); + $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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $version = new Version(); + $versionDisplayName = 'versionDisplayName1702521461'; + $version->setDisplayName($versionDisplayName); + $request = (new CreateVersionRequest()) + ->setParent($formattedParent) + ->setVersion($version); + $response = $gapicClient->createVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVersionTest'); + 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 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]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new DeleteVersionRequest()) + ->setName($formattedName); + $gapicClient->deleteVersion($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new DeleteVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Version(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new GetVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->getVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new GetVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->getVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new ListVersionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVersions($request); + $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.cx.v3.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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); + $request = (new ListVersionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVersions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function loadVersionTest() + { + $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/loadVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/loadVersionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new LoadVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->loadVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Versions/LoadVersion', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/loadVersionTest'); + $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 loadVersionExceptionTest() + { + $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/loadVersionTest'); + $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->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new LoadVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->loadVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/loadVersionTest'); + 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 updateVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Version(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $version = new Version(); + $versionDisplayName = 'versionDisplayName1702521461'; + $version->setDisplayName($versionDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateVersionRequest()) + ->setVersion($version) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.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(); + $versionDisplayName = 'versionDisplayName1702521461'; + $version->setDisplayName($versionDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateVersionRequest()) + ->setVersion($version) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function compareVersionsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $baseVersionContentJson = 'baseVersionContentJson359428515'; + $targetVersionContentJson = 'targetVersionContentJson-1079099677'; + $expectedResponse = new CompareVersionsResponse(); + $expectedResponse->setBaseVersionContentJson($baseVersionContentJson); + $expectedResponse->setTargetVersionContentJson($targetVersionContentJson); + $transport->addResponse($expectedResponse); + // Mock request + $formattedBaseVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $formattedTargetVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); + $request = (new CompareVersionsRequest()) + ->setBaseVersion($formattedBaseVersion) + ->setTargetVersion($formattedTargetVersion); + $response = $gapicClient->compareVersionsAsync($request)->wait(); + $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.cx.v3.Versions/CompareVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getBaseVersion(); + $this->assertProtobufEquals($formattedBaseVersion, $actualValue); + $actualValue = $actualRequestObject->getTargetVersion(); + $this->assertProtobufEquals($formattedTargetVersion, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/WebhooksClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/WebhooksClientTest.php new file mode 100644 index 000000000000..7be29f279e90 --- /dev/null +++ b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/WebhooksClientTest.php @@ -0,0 +1,586 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return WebhooksClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new WebhooksClient($options); + } + + /** @test */ + public function createWebhookTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $disabled = true; + $expectedResponse = new Webhook(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDisabled($disabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $webhook = new Webhook(); + $webhookDisplayName = 'webhookDisplayName1755228022'; + $webhook->setDisplayName($webhookDisplayName); + $request = (new CreateWebhookRequest()) + ->setParent($formattedParent) + ->setWebhook($webhook); + $response = $gapicClient->createWebhook($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Webhooks/CreateWebhook', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getWebhook(); + $this->assertProtobufEquals($webhook, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createWebhookExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $webhook = new Webhook(); + $webhookDisplayName = 'webhookDisplayName1755228022'; + $webhook->setDisplayName($webhookDisplayName); + $request = (new CreateWebhookRequest()) + ->setParent($formattedParent) + ->setWebhook($webhook); + try { + $gapicClient->createWebhook($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteWebhookTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); + $request = (new DeleteWebhookRequest()) + ->setName($formattedName); + $gapicClient->deleteWebhook($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Webhooks/DeleteWebhook', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteWebhookExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); + $request = (new DeleteWebhookRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteWebhook($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWebhookTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $disabled = true; + $expectedResponse = new Webhook(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDisabled($disabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); + $request = (new GetWebhookRequest()) + ->setName($formattedName); + $response = $gapicClient->getWebhook($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Webhooks/GetWebhook', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWebhookExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); + $request = (new GetWebhookRequest()) + ->setName($formattedName); + try { + $gapicClient->getWebhook($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWebhooksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $webhooksElement = new Webhook(); + $webhooks = [ + $webhooksElement, + ]; + $expectedResponse = new ListWebhooksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setWebhooks($webhooks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $request = (new ListWebhooksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listWebhooks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getWebhooks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Webhooks/ListWebhooks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWebhooksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); + $request = (new ListWebhooksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listWebhooks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateWebhookTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $disabled = true; + $expectedResponse = new Webhook(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDisabled($disabled); + $transport->addResponse($expectedResponse); + // Mock request + $webhook = new Webhook(); + $webhookDisplayName = 'webhookDisplayName1755228022'; + $webhook->setDisplayName($webhookDisplayName); + $request = (new UpdateWebhookRequest()) + ->setWebhook($webhook); + $response = $gapicClient->updateWebhook($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dialogflow.cx.v3.Webhooks/UpdateWebhook', $actualFuncCall); + $actualValue = $actualRequestObject->getWebhook(); + $this->assertProtobufEquals($webhook, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateWebhookExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $webhook = new Webhook(); + $webhookDisplayName = 'webhookDisplayName1755228022'; + $webhook->setDisplayName($webhookDisplayName); + $request = (new UpdateWebhookRequest()) + ->setWebhook($webhook); + try { + $gapicClient->updateWebhook($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createWebhookAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $disabled = true; + $expectedResponse = new Webhook(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDisabled($disabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); + $webhook = new Webhook(); + $webhookDisplayName = 'webhookDisplayName1755228022'; + $webhook->setDisplayName($webhookDisplayName); + $request = (new CreateWebhookRequest()) + ->setParent($formattedParent) + ->setWebhook($webhook); + $response = $gapicClient->createWebhookAsync($request)->wait(); + $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.cx.v3.Webhooks/CreateWebhook', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getWebhook(); + $this->assertProtobufEquals($webhook, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From 08eb4d1273e892075029092183ad2f6c5b56729c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 15 Jan 2026 22:11:28 +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 --- DialogflowCx/metadata/V3/Agent.php | Bin 9116 -> 9210 bytes .../metadata}/V3/CodeBlock.php | 0 .../metadata/V3/DataStoreConnection.php | Bin 3668 -> 3798 bytes .../metadata}/V3/Example.php | 0 DialogflowCx/metadata/V3/Flow.php | Bin 7582 -> 7914 bytes .../metadata/V3/GenerativeSettings.php | 13 +- DialogflowCx/metadata/V3/Generator.php | Bin 3902 -> 4119 bytes DialogflowCx/metadata/V3/Page.php | Bin 5847 -> 5916 bytes .../metadata}/V3/ParameterDefinition.php | Bin .../metadata}/V3/Playbook.php | Bin DialogflowCx/metadata/V3/ResponseMessage.php | Bin 2776 -> 2959 bytes DialogflowCx/metadata/V3/SafetySettings.php | Bin 1059 -> 2220 bytes DialogflowCx/metadata/V3/Session.php | Bin 13603 -> 14351 bytes .../Cx => DialogflowCx/metadata}/V3/Tool.php | Bin .../metadata}/V3/ToolCall.php | Bin .../Cx => DialogflowCx/metadata}/V3/Trace.php | Bin DialogflowCx/metadata/V3/Webhook.php | Bin 8329 -> 9112 bytes .../V3/ExamplesClient/create_example.php | 0 .../V3/ExamplesClient/delete_example.php | 0 .../samples/V3/ExamplesClient/get_example.php | 0 .../V3/ExamplesClient/get_location.php | 0 .../V3/ExamplesClient/list_examples.php | 0 .../V3/ExamplesClient/list_locations.php | 0 .../V3/ExamplesClient/update_example.php | 0 .../V3/PlaybooksClient/create_playbook.php | 0 .../create_playbook_version.php | 0 .../V3/PlaybooksClient/delete_playbook.php | 0 .../delete_playbook_version.php | 0 .../V3/PlaybooksClient/export_playbook.php | 0 .../V3/PlaybooksClient/get_location.php | 0 .../V3/PlaybooksClient/get_playbook.php | 0 .../PlaybooksClient/get_playbook_version.php | 0 .../V3/PlaybooksClient/import_playbook.php | 0 .../V3/PlaybooksClient/list_locations.php | 0 .../list_playbook_versions.php | 0 .../V3/PlaybooksClient/list_playbooks.php | 0 .../restore_playbook_version.php | 0 .../V3/PlaybooksClient/update_playbook.php | 0 .../samples/V3/ToolsClient/create_tool.php | 0 .../V3/ToolsClient/create_tool_version.php | 0 .../samples/V3/ToolsClient/delete_tool.php | 0 .../V3/ToolsClient/delete_tool_version.php | 0 .../samples/V3/ToolsClient/get_location.php | 0 .../samples/V3/ToolsClient/get_tool.php | 0 .../V3/ToolsClient/get_tool_version.php | 0 .../samples/V3/ToolsClient/list_locations.php | 0 .../V3/ToolsClient/list_tool_versions.php | 0 .../samples/V3/ToolsClient/list_tools.php | 0 .../V3/ToolsClient/restore_tool_version.php | 0 .../samples/V3/ToolsClient/update_tool.php | 0 .../Cx => DialogflowCx/src}/V3/Action.php | 0 DialogflowCx/src/V3/Agent.php | 112 +- .../src}/V3/AgentUtterance.php | 0 DialogflowCx/src/V3/AudioEncoding.php | 1 + DialogflowCx/src/V3/Client/AgentsClient.php | 22 + .../src/V3/Client/EnvironmentsClient.php | 20 + .../src/V3/Client/ExamplesClient.php | 9 +- DialogflowCx/src/V3/Client/FlowsClient.php | 44 + DialogflowCx/src/V3/Client/PagesClient.php | 44 + .../src/V3/Client/PlaybooksClient.php | 36 +- DialogflowCx/src/V3/Client/SessionsClient.php | 44 + .../src/V3/Client/TestCasesClient.php | 44 + .../src/V3/Client/ToolsClient.php | 15 +- .../V3/Client/TransitionRouteGroupsClient.php | 22 + DialogflowCx/src/V3/Client/WebhooksClient.php | 20 + .../Cx => DialogflowCx/src}/V3/CodeBlock.php | 0 .../src}/V3/CreateExampleRequest.php | 0 .../src}/V3/CreatePlaybookRequest.php | 0 .../src}/V3/CreatePlaybookVersionRequest.php | 0 .../src}/V3/CreateToolRequest.php | 0 .../src}/V3/CreateToolVersionRequest.php | 0 .../SearchSnippet.php | 44 + .../Cx => DialogflowCx/src}/V3/DataType.php | 0 .../src}/V3/DeleteExampleRequest.php | 0 .../src}/V3/DeletePlaybookRequest.php | 0 .../src}/V3/DeletePlaybookVersionRequest.php | 0 .../src}/V3/DeleteToolRequest.php | 0 .../src}/V3/DeleteToolVersionRequest.php | 0 DialogflowCx/src/V3/DetectIntentRequest.php | 42 + .../src}/V3/DetectIntentResponseView.php | 0 .../src/V3/Environment/VersionConfig.php | 16 +- DialogflowCx/src/V3/EventHandler.php | 39 + .../Cx => DialogflowCx/src}/V3/Example.php | 0 .../src}/V3/ExportPlaybookRequest.php | 0 .../V3/ExportPlaybookRequest/DataFormat.php | 2 - .../src}/V3/ExportPlaybookResponse.php | 0 DialogflowCx/src/V3/Flow.php | 68 + .../src}/V3/FlowInvocation.php | 0 .../src}/V3/FlowTransition.php | 0 DialogflowCx/src/V3/GenerativeSettings.php | 44 + DialogflowCx/src/V3/Generator.php | 44 + .../src}/V3/GetExampleRequest.php | 0 .../src}/V3/GetPlaybookRequest.php | 0 .../src}/V3/GetPlaybookVersionRequest.php | 0 .../src}/V3/GetToolRequest.php | 0 .../src}/V3/GetToolVersionRequest.php | 0 .../Cx => DialogflowCx/src}/V3/Handler.php | 0 .../src}/V3/Handler/EventHandler.php | 2 - .../src}/V3/Handler/LifecycleHandler.php | 2 - .../src}/V3/ImportPlaybookRequest.php | 0 .../src}/V3/ImportPlaybookResponse.php | 0 .../ConflictingResources.php | 2 - .../src}/V3/InlineSchema.php | 0 .../src}/V3/ListExamplesRequest.php | 0 .../src}/V3/ListExamplesResponse.php | 0 .../src}/V3/ListPlaybookVersionsRequest.php | 0 .../src}/V3/ListPlaybookVersionsResponse.php | 0 .../src}/V3/ListPlaybooksRequest.php | 0 .../src}/V3/ListPlaybooksResponse.php | 0 .../src}/V3/ListToolVersionsRequest.php | 0 .../src}/V3/ListToolVersionsResponse.php | 0 .../src}/V3/ListToolsRequest.php | 0 .../src}/V3/ListToolsResponse.php | 0 .../src}/V3/LlmModelSettings.php | 0 DialogflowCx/src/V3/OutputAudioEncoding.php | 2 + .../src}/V3/OutputState.php | 0 DialogflowCx/src/V3/PBMatch/MatchType.php | 3 +- .../src}/V3/ParameterDefinition.php | 0 .../V3/ParameterDefinition/ParameterType.php | 2 - .../Cx => DialogflowCx/src}/V3/Playbook.php | 0 .../src}/V3/Playbook/Instruction.php | 2 - .../src}/V3/Playbook/PlaybookType.php | 2 - .../src}/V3/Playbook/Step.php | 2 - .../src}/V3/PlaybookImportStrategy.php | 0 .../src}/V3/PlaybookInput.php | 0 .../src}/V3/PlaybookInvocation.php | 0 .../src}/V3/PlaybookOutput.php | 0 .../src}/V3/PlaybookTransition.php | 0 .../src}/V3/PlaybookVersion.php | 0 DialogflowCx/src/V3/QueryInput.php | 33 + DialogflowCx/src/V3/QueryParameters.php | 148 ++ DialogflowCx/src/V3/QueryResult.php | 136 -- DialogflowCx/src/V3/ResponseMessage.php | 36 + .../src}/V3/RestorePlaybookVersionRequest.php | 0 .../V3/RestorePlaybookVersionResponse.php | 0 .../src}/V3/RestoreToolVersionRequest.php | 0 .../src}/V3/RestoreToolVersionResponse.php | 0 DialogflowCx/src/V3/SafetySettings.php | 174 +++ .../V3/SafetySettings/PhraseMatchStrategy.php | 2 - .../SafetySettings/PromptSecuritySettings.php | 2 - .../src}/V3/SafetySettings/RaiSettings.php | 2 - .../RaiSettings/CategoryFilter.php | 2 - .../RaiSettings/SafetyCategory.php | 2 - .../RaiSettings/SafetyFilterLevel.php | 2 - .../SecuritySettings/AudioExportSettings.php | 12 + .../src/V3/StreamingDetectIntentRequest.php | 42 + .../Cx => DialogflowCx/src}/V3/Tool.php | 0 .../src}/V3/Tool/Authentication.php | 2 - .../V3/Tool/Authentication/ApiKeyConfig.php | 2 - .../Tool/Authentication/BearerTokenConfig.php | 2 - .../V3/Tool/Authentication/OAuthConfig.php | 2 - .../OAuthConfig/OauthGrantType.php | 2 - .../Tool/Authentication/RequestLocation.php | 2 - .../ServiceAccountAuthConfig.php | 2 - .../Authentication/ServiceAgentAuthConfig.php | 2 - .../ServiceAgentAuth.php | 2 - .../src}/V3/Tool/DataStoreTool.php | 2 - .../V3/Tool/DataStoreTool/FallbackPrompt.php | 2 - .../src}/V3/Tool/FunctionTool.php | 2 - .../src}/V3/Tool/OpenApiTool.php | 2 - .../src}/V3/Tool/ServiceDirectoryConfig.php | 2 - .../src}/V3/Tool/TLSConfig.php | 2 - .../src}/V3/Tool/TLSConfig/CACert.php | 2 - .../src}/V3/Tool/ToolType.php | 2 - .../Cx => DialogflowCx/src}/V3/ToolCall.php | 0 .../src}/V3/ToolCallResult.php | 0 .../src}/V3/ToolCallResult/Error.php | 2 - .../Cx => DialogflowCx/src}/V3/ToolUse.php | 0 .../src}/V3/ToolVersion.php | 0 .../Cx => DialogflowCx/src}/V3/TypeSchema.php | 0 .../src}/V3/TypeSchema/SchemaReference.php | 2 - .../src}/V3/UpdateExampleRequest.php | 0 .../src}/V3/UpdatePlaybookRequest.php | 0 .../src}/V3/UpdateToolRequest.php | 0 .../src}/V3/UserUtterance.php | 0 .../src/V3/Webhook/GenericWebService.php | 136 ++ .../Webhook/GenericWebService/OAuthConfig.php | 46 + .../SecretVersionHeaderValue.php | 2 - .../ServiceAccountAuthConfig.php | 2 - DialogflowCx/src/V3/gapic_metadata.json | 192 +++ .../V3/resources/agents_descriptor_config.php | 1 + .../environments_descriptor_config.php | 1 + .../V3/resources/examples_client_config.json | 0 .../resources/examples_descriptor_config.php | 0 .../resources/examples_rest_client_config.php | 0 .../V3/resources/flows_descriptor_config.php | 2 + .../V3/resources/pages_descriptor_config.php | 2 + .../V3/resources/playbooks_client_config.json | 0 .../resources/playbooks_descriptor_config.php | 0 .../playbooks_rest_client_config.php | 0 .../resources/sessions_descriptor_config.php | 2 + .../test_cases_descriptor_config.php | 2 + .../src/V3/resources/tools_client_config.json | 0 .../V3/resources/tools_descriptor_config.php | 0 .../V3/resources/tools_rest_client_config.php | 0 ...nsition_route_groups_descriptor_config.php | 1 + .../resources/webhooks_descriptor_config.php | 1 + .../Unit/V3/Client/ExamplesClientTest.php | 153 +- .../Unit/V3/Client/PlaybooksClientTest.php | 346 +++-- .../tests/Unit/V3/Client/ToolsClientTest.php | 264 ++-- .../Dialogflow/Cx/V3/AdvancedSettings.php | 55 - .../Google/Cloud/Dialogflow/Cx/V3/Agent.php | Bin 9210 -> 0 bytes .../Cloud/Dialogflow/Cx/V3/AudioConfig.php | Bin 3413 -> 0 bytes .../Cloud/Dialogflow/Cx/V3/Changelog.php | 60 - .../Dialogflow/Cx/V3/DataStoreConnection.php | Bin 3798 -> 0 bytes .../Cloud/Dialogflow/Cx/V3/Deployment.php | Bin 2810 -> 0 bytes .../Cloud/Dialogflow/Cx/V3/EntityType.php | Bin 6225 -> 0 bytes .../Cloud/Dialogflow/Cx/V3/Environment.php | Bin 7377 -> 0 bytes .../Cloud/Dialogflow/Cx/V3/Experiment.php | Bin 6922 -> 0 bytes .../Google/Cloud/Dialogflow/Cx/V3/Flow.php | Bin 7914 -> 0 bytes .../Cloud/Dialogflow/Cx/V3/Fulfillment.php | Bin 2676 -> 0 bytes .../Google/Cloud/Dialogflow/Cx/V3/Gcs.php | 30 - .../Dialogflow/Cx/V3/GenerativeSettings.php | 55 - .../Cloud/Dialogflow/Cx/V3/Generator.php | Bin 4119 -> 0 bytes .../Cloud/Dialogflow/Cx/V3/ImportStrategy.php | Bin 1045 -> 0 bytes .../Google/Cloud/Dialogflow/Cx/V3/Inline.php | 32 - .../Google/Cloud/Dialogflow/Cx/V3/Intent.php | Bin 5936 -> 0 bytes .../Google/Cloud/Dialogflow/Cx/V3/Page.php | Bin 5916 -> 0 bytes .../Dialogflow/Cx/V3/ResponseMessage.php | Bin 2959 -> 0 bytes .../Cloud/Dialogflow/Cx/V3/SafetySettings.php | Bin 2220 -> 0 bytes .../Dialogflow/Cx/V3/SecuritySettings.php | Bin 5496 -> 0 bytes .../Google/Cloud/Dialogflow/Cx/V3/Session.php | Bin 14351 -> 0 bytes .../Dialogflow/Cx/V3/SessionEntityType.php | Bin 4806 -> 0 bytes .../Cloud/Dialogflow/Cx/V3/TestCase.php | Bin 12146 -> 0 bytes .../Dialogflow/Cx/V3/TransitionRouteGroup.php | 70 - .../Dialogflow/Cx/V3/ValidationMessage.php | Bin 1579 -> 0 bytes .../Google/Cloud/Dialogflow/Cx/V3/Version.php | Bin 5015 -> 0 bytes .../Google/Cloud/Dialogflow/Cx/V3/Webhook.php | Bin 9112 -> 0 bytes .../Dialogflow/Cx/V3/AdvancedSettings.php | 289 ---- .../Cx/V3/AdvancedSettings/DtmfSettings.php | 246 --- .../V3/AdvancedSettings/LoggingSettings.php | 146 -- .../Cx/V3/AdvancedSettings/SpeechSettings.php | 206 --- .../Google/Cloud/Dialogflow/Cx/V3/Agent.php | 1141 -------------- .../Cx/V3/Agent/AnswerFeedbackSettings.php | 82 - .../Cx/V3/Agent/ClientCertificateSettings.php | 162 -- .../Cx/V3/Agent/GenAppBuilderSettings.php | 78 - .../Cx/V3/Agent/GitIntegrationSettings.php | 78 - .../GitIntegrationSettings/GithubSettings.php | 210 --- .../Cx/V3/Agent/PersonalizationSettings.php | 108 -- .../Cx/V3/AgentValidationResult.php | 110 -- .../Cloud/Dialogflow/Cx/V3/AnswerFeedback.php | 157 -- .../Cx/V3/AnswerFeedback/Rating.php | 64 - .../Cx/V3/AnswerFeedback/RatingReason.php | 116 -- .../Cloud/Dialogflow/Cx/V3/AudioEncoding.php | 126 -- .../Cloud/Dialogflow/Cx/V3/AudioInput.php | 143 -- .../Cloud/Dialogflow/Cx/V3/BargeInConfig.php | 143 -- .../Cx/V3/BatchDeleteTestCasesRequest.php | 125 -- .../Cx/V3/BatchRunTestCasesMetadata.php | 69 - .../Cx/V3/BatchRunTestCasesRequest.php | 148 -- .../Cx/V3/BatchRunTestCasesResponse.php | 80 - .../Cloud/Dialogflow/Cx/V3/BoostSpec.php | 82 - .../Cx/V3/BoostSpec/ConditionBoostSpec.php | 228 --- .../ConditionBoostSpec/BoostControlSpec.php | 206 --- .../BoostControlSpec/AttributeType.php | 73 - .../BoostControlSpec/ControlPoint.php | 130 -- .../BoostControlSpec/InterpolationType.php | 59 - .../Cloud/Dialogflow/Cx/V3/BoostSpecs.php | 113 -- .../Cx/V3/CalculateCoverageRequest.php | 106 -- .../CalculateCoverageRequest/CoverageType.php | 71 - .../Cx/V3/CalculateCoverageResponse.php | 180 --- .../Cloud/Dialogflow/Cx/V3/Changelog.php | 323 ---- .../Cx/V3/CloudConversationDebuggingInfo.php | 750 ---------- .../Cx/V3/CompareVersionsRequest.php | 198 --- .../Cx/V3/CompareVersionsResponse.php | 146 -- .../Dialogflow/Cx/V3/ContinuousTestResult.php | 187 --- .../AggregatedTestResult.php | 64 - .../Dialogflow/Cx/V3/ConversationTurn.php | 122 -- .../Cx/V3/ConversationTurn/UserInput.php | 212 --- .../ConversationTurn/VirtualAgentOutput.php | 356 ----- .../Dialogflow/Cx/V3/CreateAgentRequest.php | 133 -- .../Cx/V3/CreateEntityTypeRequest.php | 199 --- .../Cx/V3/CreateEnvironmentRequest.php | 138 -- .../Cx/V3/CreateExperimentRequest.php | 138 -- .../Dialogflow/Cx/V3/CreateFlowRequest.php | 203 --- .../Cx/V3/CreateGeneratorRequest.php | 175 --- .../Dialogflow/Cx/V3/CreateIntentRequest.php | 191 --- .../Dialogflow/Cx/V3/CreatePageRequest.php | 240 --- .../Cx/V3/CreateSecuritySettingsRequest.php | 137 -- .../Cx/V3/CreateSessionEntityTypeRequest.php | 158 -- .../Cx/V3/CreateTestCaseRequest.php | 133 -- .../V3/CreateTransitionRouteGroupRequest.php | 219 --- .../Cx/V3/CreateVersionOperationMetadata.php | 76 - .../Dialogflow/Cx/V3/CreateVersionRequest.php | 138 -- .../Dialogflow/Cx/V3/CreateWebhookRequest.php | 133 -- .../Dialogflow/Cx/V3/DataStoreConnection.php | 156 -- .../Cx/V3/DataStoreConnectionSignals.php | 394 ----- .../AnswerGenerationModelCallSignals.php | 142 -- .../DataStoreConnectionSignals/AnswerPart.php | 104 -- .../CitedSnippet.php | 114 -- .../GroundingSignals.php | 104 -- .../GroundingSignals/GroundingDecision.php | 64 - .../GroundingSignals/GroundingScoreBucket.php | 85 -- .../RewriterModelCallSignals.php | 142 -- .../SafetySignals.php | 138 -- .../SafetySignals/BannedPhraseMatch.php | 71 - .../SafetySignals/SafetyDecision.php | 66 - .../SearchSnippet.php | 182 --- .../Cloud/Dialogflow/Cx/V3/DataStoreType.php | 70 - .../Dialogflow/Cx/V3/DeleteAgentRequest.php | 87 -- .../Cx/V3/DeleteEntityTypeRequest.php | 166 --- .../Cx/V3/DeleteEnvironmentRequest.php | 92 -- .../Cx/V3/DeleteExperimentRequest.php | 92 -- .../Dialogflow/Cx/V3/DeleteFlowRequest.php | 158 -- .../Cx/V3/DeleteGeneratorRequest.php | 150 -- .../Dialogflow/Cx/V3/DeleteIntentRequest.php | 92 -- .../Dialogflow/Cx/V3/DeletePageRequest.php | 158 -- .../Cx/V3/DeleteSecuritySettingsRequest.php | 96 -- .../Cx/V3/DeleteSessionEntityTypeRequest.php | 112 -- .../V3/DeleteTransitionRouteGroupRequest.php | 161 -- .../Dialogflow/Cx/V3/DeleteVersionRequest.php | 92 -- .../Dialogflow/Cx/V3/DeleteWebhookRequest.php | 158 -- .../Dialogflow/Cx/V3/DeployFlowMetadata.php | 69 - .../Dialogflow/Cx/V3/DeployFlowRequest.php | 118 -- .../Dialogflow/Cx/V3/DeployFlowResponse.php | 120 -- .../Cloud/Dialogflow/Cx/V3/Deployment.php | 286 ---- .../Dialogflow/Cx/V3/Deployment/Result.php | 120 -- .../Dialogflow/Cx/V3/Deployment/State.php | 71 - .../Dialogflow/Cx/V3/DetectIntentRequest.php | 297 ---- .../Dialogflow/Cx/V3/DetectIntentResponse.php | 305 ---- .../V3/DetectIntentResponse/ResponseType.php | 70 - .../Cx/V3/DocumentProcessingMode.php | 63 - .../Cloud/Dialogflow/Cx/V3/DtmfInput.php | 101 -- .../Cloud/Dialogflow/Cx/V3/EntityType.php | 371 ----- .../Cx/V3/EntityType/AutoExpansionMode.php | 60 - .../Dialogflow/Cx/V3/EntityType/Entity.php | 148 -- .../Cx/V3/EntityType/ExcludedPhrase.php | 70 - .../Dialogflow/Cx/V3/EntityType/Kind.php | 75 - .../Cloud/Dialogflow/Cx/V3/Environment.php | 336 ----- .../Cx/V3/Environment/TestCasesConfig.php | 162 -- .../Cx/V3/Environment/VersionConfig.php | 94 -- .../Cx/V3/Environment/WebhookConfig.php | 86 -- .../Cloud/Dialogflow/Cx/V3/EventHandler.php | 297 ---- .../Cloud/Dialogflow/Cx/V3/EventInput.php | 67 - .../Cloud/Dialogflow/Cx/V3/Experiment.php | 685 --------- .../Cx/V3/Experiment/Definition.php | 124 -- .../Dialogflow/Cx/V3/Experiment/Result.php | 119 -- .../Experiment/Result/ConfidenceInterval.php | 181 --- .../Cx/V3/Experiment/Result/CountType.php | 71 - .../Cx/V3/Experiment/Result/Metric.php | 235 --- .../Cx/V3/Experiment/Result/MetricType.php | 86 -- .../V3/Experiment/Result/VersionMetrics.php | 150 -- .../Dialogflow/Cx/V3/Experiment/State.php | 78 - .../Dialogflow/Cx/V3/ExportAgentRequest.php | 296 ---- .../Cx/V3/ExportAgentRequest/DataFormat.php | 64 - .../V3/ExportAgentRequest/GitDestination.php | 104 -- .../Dialogflow/Cx/V3/ExportAgentResponse.php | 160 -- .../Cx/V3/ExportEntityTypesMetadata.php | 35 - .../Cx/V3/ExportEntityTypesRequest.php | 321 ---- .../ExportEntityTypesRequest/DataFormat.php | 64 - .../Cx/V3/ExportEntityTypesResponse.php | 121 -- .../Dialogflow/Cx/V3/ExportFlowRequest.php | 176 --- .../Dialogflow/Cx/V3/ExportFlowResponse.php | 115 -- .../Cx/V3/ExportIntentsMetadata.php | 35 - .../Dialogflow/Cx/V3/ExportIntentsRequest.php | 251 ---- .../Cx/V3/ExportIntentsRequest/DataFormat.php | 71 - .../Cx/V3/ExportIntentsResponse.php | 121 -- .../Cx/V3/ExportTestCasesMetadata.php | 35 - .../Cx/V3/ExportTestCasesRequest.php | 234 --- .../V3/ExportTestCasesRequest/DataFormat.php | 64 - .../Cx/V3/ExportTestCasesResponse.php | 115 -- .../Cloud/Dialogflow/Cx/V3/FilterSpecs.php | 121 -- .../Google/Cloud/Dialogflow/Cx/V3/Flow.php | 670 --------- .../Cx/V3/Flow/MultiLanguageSettings.php | 140 -- .../Dialogflow/Cx/V3/FlowImportStrategy.php | 80 - .../Dialogflow/Cx/V3/FlowValidationResult.php | 154 -- .../Google/Cloud/Dialogflow/Cx/V3/Form.php | 72 - .../Cloud/Dialogflow/Cx/V3/Form/Parameter.php | 402 ----- .../Cx/V3/Form/Parameter/FillBehavior.php | 222 --- .../Dialogflow/Cx/V3/FulfillIntentRequest.php | 169 --- .../Cx/V3/FulfillIntentResponse.php | 229 --- .../Cloud/Dialogflow/Cx/V3/Fulfillment.php | 445 ------ .../Cx/V3/Fulfillment/ConditionalCases.php | 71 - .../Fulfillment/ConditionalCases/PBCase.php | 125 -- .../ConditionalCases/PBCase/CaseContent.php | 111 -- .../Cx/V3/Fulfillment/GeneratorSettings.php | 182 --- .../Cx/V3/Fulfillment/SetParameterAction.php | 114 -- .../Cloud/Dialogflow/Cx/V3/GcsDestination.php | 76 - .../Dialogflow/Cx/V3/GenerativeSettings.php | 281 ---- .../GenerativeSettings/FallbackSettings.php | 108 -- .../FallbackSettings/PromptTemplate.php | 150 -- .../KnowledgeConnectorSettings.php | 263 ---- .../Cloud/Dialogflow/Cx/V3/Generator.php | 302 ---- .../Cx/V3/Generator/ModelParameter.php | 257 ---- .../Cx/V3/Generator/Placeholder.php | 104 -- .../Dialogflow/Cx/V3/GetAgentRequest.php | 87 -- .../Cx/V3/GetAgentValidationResultRequest.php | 126 -- .../Dialogflow/Cx/V3/GetChangelogRequest.php | 92 -- .../Dialogflow/Cx/V3/GetDeploymentRequest.php | 92 -- .../Dialogflow/Cx/V3/GetEntityTypeRequest.php | 162 -- .../Cx/V3/GetEnvironmentRequest.php | 92 -- .../Dialogflow/Cx/V3/GetExperimentRequest.php | 92 -- .../Cloud/Dialogflow/Cx/V3/GetFlowRequest.php | 166 --- .../Cx/V3/GetFlowValidationResultRequest.php | 126 -- .../Cx/V3/GetGenerativeSettingsRequest.php | 124 -- .../Dialogflow/Cx/V3/GetGeneratorRequest.php | 126 -- .../Dialogflow/Cx/V3/GetIntentRequest.php | 154 -- .../Cloud/Dialogflow/Cx/V3/GetPageRequest.php | 198 --- .../Cx/V3/GetSecuritySettingsRequest.php | 92 -- .../Cx/V3/GetSessionEntityTypeRequest.php | 112 -- .../Dialogflow/Cx/V3/GetTestCaseRequest.php | 92 -- .../Cx/V3/GetTestCaseResultRequest.php | 92 -- .../Cx/V3/GetTransitionRouteGroupRequest.php | 177 --- .../Dialogflow/Cx/V3/GetVersionRequest.php | 92 -- .../Dialogflow/Cx/V3/GetWebhookRequest.php | 92 -- .../Cx/V3/ImportEntityTypesMetadata.php | 35 - .../Cx/V3/ImportEntityTypesRequest.php | 264 ---- .../ImportEntityTypesRequest/MergeOption.php | 90 -- .../Cx/V3/ImportEntityTypesResponse.php | 128 -- .../ConflictingResources.php | 106 -- .../Dialogflow/Cx/V3/ImportFlowRequest.php | 250 ---- .../Cx/V3/ImportFlowRequest/ImportOption.php | 68 - .../Dialogflow/Cx/V3/ImportFlowResponse.php | 76 - .../Cx/V3/ImportIntentsMetadata.php | 35 - .../Dialogflow/Cx/V3/ImportIntentsRequest.php | 202 --- .../V3/ImportIntentsRequest/MergeOption.php | 100 -- .../Cx/V3/ImportIntentsResponse.php | 128 -- .../ConflictingResources.php | 106 -- .../Cloud/Dialogflow/Cx/V3/ImportStrategy.php | 87 -- .../Cx/V3/ImportTestCasesMetadata.php | 69 - .../Cx/V3/ImportTestCasesRequest.php | 168 --- .../Cx/V3/ImportTestCasesResponse.php | 76 - .../Dialogflow/Cx/V3/InlineDestination.php | 72 - .../Cloud/Dialogflow/Cx/V3/InlineSource.php | 68 - .../Dialogflow/Cx/V3/InputAudioConfig.php | 457 ------ .../Google/Cloud/Dialogflow/Cx/V3/Intent.php | 428 ------ .../Dialogflow/Cx/V3/Intent/Parameter.php | 228 --- .../Cx/V3/Intent/TrainingPhrase.php | 194 --- .../Cx/V3/Intent/TrainingPhrase/Part.php | 112 -- .../Cloud/Dialogflow/Cx/V3/IntentCoverage.php | 102 -- .../Cx/V3/IntentCoverage/Intent.php | 108 -- .../Cloud/Dialogflow/Cx/V3/IntentInput.php | 76 - .../Cloud/Dialogflow/Cx/V3/IntentView.php | 63 - .../Cx/V3/KnowledgeConnectorSettings.php | 254 ---- .../Cloud/Dialogflow/Cx/V3/LanguageInfo.php | 143 -- .../Dialogflow/Cx/V3/ListAgentsRequest.php | 159 -- .../Dialogflow/Cx/V3/ListAgentsResponse.php | 110 -- .../Cx/V3/ListChangelogsRequest.php | 269 ---- .../Cx/V3/ListChangelogsResponse.php | 114 -- .../V3/ListContinuousTestResultsRequest.php | 164 -- .../V3/ListContinuousTestResultsResponse.php | 105 -- .../Cx/V3/ListDeploymentsRequest.php | 164 -- .../Cx/V3/ListDeploymentsResponse.php | 118 -- .../Cx/V3/ListEntityTypesRequest.php | 229 --- .../Cx/V3/ListEntityTypesResponse.php | 110 -- .../Cx/V3/ListEnvironmentsRequest.php | 164 -- .../Cx/V3/ListEnvironmentsResponse.php | 118 -- .../Cx/V3/ListExperimentsRequest.php | 164 -- .../Cx/V3/ListExperimentsResponse.php | 118 -- .../Dialogflow/Cx/V3/ListFlowsRequest.php | 233 --- .../Dialogflow/Cx/V3/ListFlowsResponse.php | 110 -- .../Cx/V3/ListGeneratorsRequest.php | 193 --- .../Cx/V3/ListGeneratorsResponse.php | 110 -- .../Dialogflow/Cx/V3/ListIntentsRequest.php | 255 ---- .../Dialogflow/Cx/V3/ListIntentsResponse.php | 110 -- .../Dialogflow/Cx/V3/ListPagesRequest.php | 270 ---- .../Dialogflow/Cx/V3/ListPagesResponse.php | 110 -- .../Cx/V3/ListSecuritySettingsRequest.php | 158 -- .../Cx/V3/ListSecuritySettingsResponse.php | 105 -- .../Cx/V3/ListSessionEntityTypesRequest.php | 184 --- .../Cx/V3/ListSessionEntityTypesResponse.php | 110 -- .../Cx/V3/ListTestCaseResultsRequest.php | 280 ---- .../Cx/V3/ListTestCaseResultsResponse.php | 106 -- .../Dialogflow/Cx/V3/ListTestCasesRequest.php | 197 --- .../V3/ListTestCasesRequest/TestCaseView.php | 66 - .../Cx/V3/ListTestCasesResponse.php | 110 -- .../V3/ListTransitionRouteGroupsRequest.php | 239 --- .../V3/ListTransitionRouteGroupsResponse.php | 118 -- .../Dialogflow/Cx/V3/ListVersionsRequest.php | 164 -- .../Dialogflow/Cx/V3/ListVersionsResponse.php | 114 -- .../Dialogflow/Cx/V3/ListWebhooksRequest.php | 159 -- .../Dialogflow/Cx/V3/ListWebhooksResponse.php | 110 -- .../Dialogflow/Cx/V3/LoadVersionRequest.php | 138 -- .../Cx/V3/LookupEnvironmentHistoryRequest.php | 164 -- .../V3/LookupEnvironmentHistoryResponse.php | 114 -- .../Dialogflow/Cx/V3/MatchIntentRequest.php | 233 --- .../Dialogflow/Cx/V3/MatchIntentResponse.php | 282 ---- .../Cloud/Dialogflow/Cx/V3/NluSettings.php | 159 -- .../Cx/V3/NluSettings/ModelTrainingMode.php | 66 - .../Cx/V3/NluSettings/ModelType.php | 64 - .../Dialogflow/Cx/V3/OutputAudioConfig.php | 173 --- .../Dialogflow/Cx/V3/OutputAudioEncoding.php | 95 -- .../Google/Cloud/Dialogflow/Cx/V3/PBMatch.php | 353 ----- .../Dialogflow/Cx/V3/PBMatch/MatchType.php | 107 -- .../Google/Cloud/Dialogflow/Cx/V3/Page.php | 593 -------- .../Cloud/Dialogflow/Cx/V3/PageInfo.php | 185 --- .../Dialogflow/Cx/V3/PageInfo/FormInfo.php | 86 -- .../Cx/V3/PageInfo/FormInfo/ParameterInfo.php | 316 ---- .../FormInfo/ParameterInfo/ParameterState.php | 77 - .../Google/Cloud/Dialogflow/Cx/V3/Phrase.php | 67 - .../Cloud/Dialogflow/Cx/V3/QueryInput.php | 292 ---- .../Dialogflow/Cx/V3/QueryParameters.php | 1106 -------------- .../Cloud/Dialogflow/Cx/V3/QueryResult.php | 1089 -------------- .../Cloud/Dialogflow/Cx/V3/ResourceName.php | 101 -- .../Dialogflow/Cx/V3/ResponseMessage.php | 546 ------- .../ResponseMessage/ConversationSuccess.php | 93 -- .../Cx/V3/ResponseMessage/EndInteraction.php | 38 - .../V3/ResponseMessage/KnowledgeInfoCard.php | 39 - .../V3/ResponseMessage/LiveAgentHandoff.php | 95 -- .../Cx/V3/ResponseMessage/MixedAudio.php | 76 - .../V3/ResponseMessage/MixedAudio/Segment.php | 159 -- .../Cx/V3/ResponseMessage/OutputAudioText.php | 157 -- .../Cx/V3/ResponseMessage/PlayAudio.php | 116 -- .../Cx/V3/ResponseMessage/ResponseType.php | 77 - .../ResponseMessage/TelephonyTransferCall.php | 82 - .../Dialogflow/Cx/V3/ResponseMessage/Text.php | 116 -- .../Dialogflow/Cx/V3/RestoreAgentRequest.php | 235 --- .../Cx/V3/RestoreAgentRequest/GitSource.php | 70 - .../V3/RestoreAgentRequest/RestoreOption.php | 67 - .../Cloud/Dialogflow/Cx/V3/RolloutConfig.php | 167 --- .../Cx/V3/RolloutConfig/RolloutStep.php | 160 -- .../Cloud/Dialogflow/Cx/V3/RolloutState.php | 145 -- .../Cx/V3/RunContinuousTestMetadata.php | 69 - .../Cx/V3/RunContinuousTestRequest.php | 72 - .../Cx/V3/RunContinuousTestResponse.php | 78 - .../Dialogflow/Cx/V3/RunTestCaseMetadata.php | 35 - .../Dialogflow/Cx/V3/RunTestCaseRequest.php | 114 -- .../Dialogflow/Cx/V3/RunTestCaseResponse.php | 78 - .../Cloud/Dialogflow/Cx/V3/SafetySettings.php | 241 --- .../Cx/V3/SafetySettings/Phrase.php | 104 -- .../Cloud/Dialogflow/Cx/V3/SearchConfig.php | 129 -- .../Dialogflow/Cx/V3/SecuritySettings.php | 664 --------- .../SecuritySettings/AudioExportSettings.php | 250 ---- .../AudioExportSettings/AudioFormat.php | 72 - .../InsightsExportSettings.php | 75 - .../Cx/V3/SecuritySettings/PurgeDataType.php | 58 - .../Cx/V3/SecuritySettings/RedactionScope.php | 59 - .../V3/SecuritySettings/RedactionStrategy.php | 57 - .../V3/SecuritySettings/RetentionStrategy.php | 59 - .../Cx/V3/SentimentAnalysisResult.php | 111 -- .../Dialogflow/Cx/V3/SessionEntityType.php | 176 --- .../SessionEntityType/EntityOverrideMode.php | 73 - .../Cloud/Dialogflow/Cx/V3/SessionInfo.php | 169 --- .../Dialogflow/Cx/V3/SpeechModelVariant.php | 85 -- .../Dialogflow/Cx/V3/SpeechToTextSettings.php | 67 - .../Cloud/Dialogflow/Cx/V3/SpeechWordInfo.php | 225 --- .../Dialogflow/Cx/V3/SsmlVoiceGender.php | 70 - .../Cx/V3/StartExperimentRequest.php | 92 -- .../Cx/V3/StopExperimentRequest.php | 92 -- .../Cx/V3/StreamingDetectIntentRequest.php | 407 ----- .../Cx/V3/StreamingDetectIntentResponse.php | 174 --- .../Cx/V3/StreamingRecognitionResult.php | 425 ------ .../MessageType.php | 71 - .../Cx/V3/SubmitAnswerFeedbackRequest.php | 197 --- .../Cx/V3/SynthesizeSpeechConfig.php | 269 ---- .../Cloud/Dialogflow/Cx/V3/TestCase.php | 367 ----- .../Cloud/Dialogflow/Cx/V3/TestCaseError.php | 121 -- .../Cloud/Dialogflow/Cx/V3/TestCaseResult.php | 225 --- .../Cloud/Dialogflow/Cx/V3/TestConfig.php | 175 --- .../Cloud/Dialogflow/Cx/V3/TestError.php | 155 -- .../Cloud/Dialogflow/Cx/V3/TestResult.php | 61 - .../Dialogflow/Cx/V3/TestRunDifference.php | 105 -- .../Cx/V3/TestRunDifference/DiffType.php | 85 -- .../Cloud/Dialogflow/Cx/V3/TextInput.php | 67 - .../Dialogflow/Cx/V3/TextToSpeechSettings.php | 119 -- .../Dialogflow/Cx/V3/TrainFlowRequest.php | 92 -- .../Dialogflow/Cx/V3/TransitionCoverage.php | 103 -- .../Cx/V3/TransitionCoverage/Transition.php | 271 ---- .../V3/TransitionCoverage/TransitionNode.php | 117 -- .../Dialogflow/Cx/V3/TransitionRoute.php | 382 ----- .../Dialogflow/Cx/V3/TransitionRouteGroup.php | 161 -- .../Cx/V3/TransitionRouteGroupCoverage.php | 107 -- .../TransitionRouteGroupCoverage/Coverage.php | 152 -- .../Coverage/Transition.php | 118 -- .../Dialogflow/Cx/V3/UpdateAgentRequest.php | 142 -- .../Cx/V3/UpdateEntityTypeRequest.php | 203 --- .../Cx/V3/UpdateEnvironmentRequest.php | 137 -- .../Cx/V3/UpdateExperimentRequest.php | 137 -- .../Dialogflow/Cx/V3/UpdateFlowRequest.php | 212 --- .../Cx/V3/UpdateGenerativeSettingsRequest.php | 143 -- .../Cx/V3/UpdateGeneratorRequest.php | 176 --- .../Dialogflow/Cx/V3/UpdateIntentRequest.php | 200 --- .../Dialogflow/Cx/V3/UpdatePageRequest.php | 244 --- .../Cx/V3/UpdateSecuritySettingsRequest.php | 147 -- .../Cx/V3/UpdateSessionEntityTypeRequest.php | 167 --- .../Cx/V3/UpdateTestCaseRequest.php | 152 -- .../V3/UpdateTransitionRouteGroupRequest.php | 203 --- .../Dialogflow/Cx/V3/UpdateVersionRequest.php | 142 -- .../Dialogflow/Cx/V3/UpdateWebhookRequest.php | 142 -- .../Dialogflow/Cx/V3/ValidateAgentRequest.php | 106 -- .../Dialogflow/Cx/V3/ValidateFlowRequest.php | 110 -- .../Dialogflow/Cx/V3/ValidationMessage.php | 212 --- .../Cx/V3/ValidationMessage/ResourceType.php | 148 -- .../Cx/V3/ValidationMessage/Severity.php | 71 - .../Dialogflow/Cx/V3/VariantsHistory.php | 119 -- .../Google/Cloud/Dialogflow/Cx/V3/Version.php | 277 ---- .../Cloud/Dialogflow/Cx/V3/Version/State.php | 71 - .../Dialogflow/Cx/V3/VersionVariants.php | 67 - .../Cx/V3/VersionVariants/Variant.php | 150 -- .../Dialogflow/Cx/V3/VoiceSelectionParams.php | 137 -- .../Google/Cloud/Dialogflow/Cx/V3/Webhook.php | 292 ---- .../Cx/V3/Webhook/GenericWebService.php | 658 -------- .../Webhook/GenericWebService/HttpMethod.php | 99 -- .../Webhook/GenericWebService/OAuthConfig.php | 223 --- .../GenericWebService/ServiceAgentAuth.php | 80 - .../Webhook/GenericWebService/WebhookType.php | 64 - .../Cx/V3/Webhook/ServiceDirectoryConfig.php | 135 -- .../Cloud/Dialogflow/Cx/V3/WebhookRequest.php | 673 --------- .../Cx/V3/WebhookRequest/FulfillmentInfo.php | 94 -- .../Cx/V3/WebhookRequest/IntentInfo.php | 204 --- .../IntentInfo/IntentParameterValue.php | 118 -- .../SentimentAnalysisResult.php | 116 -- .../Dialogflow/Cx/V3/WebhookResponse.php | 312 ---- .../WebhookResponse/FulfillmentResponse.php | 104 -- .../FulfillmentResponse/MergeBehavior.php | 66 - .../samples/V3/AgentsClient/create_agent.php | 99 -- .../samples/V3/AgentsClient/delete_agent.php | 70 - .../samples/V3/AgentsClient/export_agent.php | 93 -- .../v3/samples/V3/AgentsClient/get_agent.php | 72 - .../get_agent_validation_result.php | 74 - .../AgentsClient/get_generative_settings.php | 75 - .../samples/V3/AgentsClient/get_location.php | 57 - .../samples/V3/AgentsClient/list_agents.php | 77 - .../V3/AgentsClient/list_locations.php | 62 - .../samples/V3/AgentsClient/restore_agent.php | 97 -- .../samples/V3/AgentsClient/update_agent.php | 93 -- .../update_generative_settings.php | 59 - .../V3/AgentsClient/validate_agent.php | 74 - .../V3/ChangelogsClient/get_changelog.php | 78 - .../V3/ChangelogsClient/get_location.php | 57 - .../V3/ChangelogsClient/list_changelogs.php | 77 - .../V3/ChangelogsClient/list_locations.php | 62 - .../V3/DeploymentsClient/get_deployment.php | 80 - .../V3/DeploymentsClient/get_location.php | 57 - .../V3/DeploymentsClient/list_deployments.php | 84 -- .../V3/DeploymentsClient/list_locations.php | 62 - .../EntityTypesClient/create_entity_type.php | 89 -- .../EntityTypesClient/delete_entity_type.php | 80 - .../EntityTypesClient/export_entity_types.php | 90 -- .../V3/EntityTypesClient/get_entity_type.php | 78 - .../V3/EntityTypesClient/get_location.php | 57 - .../EntityTypesClient/import_entity_types.php | 88 -- .../EntityTypesClient/list_entity_types.php | 77 - .../V3/EntityTypesClient/list_locations.php | 62 - .../EntityTypesClient/update_entity_type.php | 81 - .../EnvironmentsClient/create_environment.php | 100 -- .../EnvironmentsClient/delete_environment.php | 77 - .../V3/EnvironmentsClient/deploy_flow.php | 112 -- .../V3/EnvironmentsClient/get_environment.php | 79 - .../V3/EnvironmentsClient/get_location.php | 57 - .../list_continuous_test_results.php | 83 -- .../EnvironmentsClient/list_environments.php | 79 - .../V3/EnvironmentsClient/list_locations.php | 62 - .../lookup_environment_history.php | 84 -- .../run_continuous_test.php | 99 -- .../EnvironmentsClient/update_environment.php | 97 -- .../ExperimentsClient/create_experiment.php | 85 -- .../ExperimentsClient/delete_experiment.php | 78 - .../V3/ExperimentsClient/get_experiment.php | 80 - .../V3/ExperimentsClient/get_location.php | 57 - .../V3/ExperimentsClient/list_experiments.php | 84 -- .../V3/ExperimentsClient/list_locations.php | 62 - .../V3/ExperimentsClient/start_experiment.php | 81 - .../V3/ExperimentsClient/stop_experiment.php | 80 - .../ExperimentsClient/update_experiment.php | 77 - .../v3/samples/V3/FlowsClient/create_flow.php | 81 - .../v3/samples/V3/FlowsClient/delete_flow.php | 71 - .../v3/samples/V3/FlowsClient/export_flow.php | 97 -- .../v3/samples/V3/FlowsClient/get_flow.php | 73 - .../get_flow_validation_result.php | 79 - .../samples/V3/FlowsClient/get_location.php | 57 - .../v3/samples/V3/FlowsClient/import_flow.php | 97 -- .../v3/samples/V3/FlowsClient/list_flows.php | 77 - .../samples/V3/FlowsClient/list_locations.php | 62 - .../v3/samples/V3/FlowsClient/train_flow.php | 96 -- .../v3/samples/V3/FlowsClient/update_flow.php | 76 - .../samples/V3/FlowsClient/validate_flow.php | 75 - .../V3/GeneratorsClient/create_generator.php | 89 -- .../V3/GeneratorsClient/delete_generator.php | 76 - .../V3/GeneratorsClient/get_generator.php | 78 - .../V3/GeneratorsClient/get_location.php | 57 - .../V3/GeneratorsClient/list_generators.php | 77 - .../V3/GeneratorsClient/list_locations.php | 62 - .../V3/GeneratorsClient/update_generator.php | 83 -- .../V3/IntentsClient/create_intent.php | 81 - .../V3/IntentsClient/delete_intent.php | 75 - .../V3/IntentsClient/export_intents.php | 99 -- .../samples/V3/IntentsClient/get_intent.php | 73 - .../samples/V3/IntentsClient/get_location.php | 57 - .../V3/IntentsClient/import_intents.php | 93 -- .../samples/V3/IntentsClient/list_intents.php | 77 - .../V3/IntentsClient/list_locations.php | 62 - .../V3/IntentsClient/update_intent.php | 76 - .../v3/samples/V3/PagesClient/create_page.php | 82 - .../v3/samples/V3/PagesClient/delete_page.php | 75 - .../samples/V3/PagesClient/get_location.php | 57 - .../v3/samples/V3/PagesClient/get_page.php | 73 - .../samples/V3/PagesClient/list_locations.php | 62 - .../v3/samples/V3/PagesClient/list_pages.php | 78 - .../v3/samples/V3/PagesClient/update_page.php | 76 - .../create_security_settings.php | 81 - .../delete_security_settings.php | 77 - .../get_location.php | 57 - .../get_security_settings.php | 79 - .../list_locations.php | 62 - .../list_security_settings.php | 77 - .../update_security_settings.php | 77 - .../create_session_entity_type.php | 137 -- .../delete_session_entity_type.php | 81 - .../SessionEntityTypesClient/get_location.php | 57 - .../get_session_entity_type.php | 83 -- .../list_locations.php | 62 - .../list_session_entity_types.php | 87 -- .../update_session_entity_type.php | 120 -- .../V3/SessionsClient/detect_intent.php | 103 -- .../V3/SessionsClient/fulfill_intent.php | 63 - .../V3/SessionsClient/get_location.php | 57 - .../V3/SessionsClient/list_locations.php | 62 - .../V3/SessionsClient/match_intent.php | 93 -- .../server_streaming_detect_intent.php | 107 -- .../streaming_detect_intent.php | 88 -- .../SessionsClient/submit_answer_feedback.php | 78 - .../batch_delete_test_cases.php | 83 -- .../TestCasesClient/batch_run_test_cases.php | 106 -- .../V3/TestCasesClient/calculate_coverage.php | 76 - .../V3/TestCasesClient/create_test_case.php | 78 - .../V3/TestCasesClient/export_test_cases.php | 94 -- .../V3/TestCasesClient/get_location.php | 57 - .../V3/TestCasesClient/get_test_case.php | 73 - .../TestCasesClient/get_test_case_result.php | 79 - .../V3/TestCasesClient/import_test_cases.php | 95 -- .../V3/TestCasesClient/list_locations.php | 62 - .../list_test_case_results.php | 86 -- .../V3/TestCasesClient/list_test_cases.php | 77 - .../V3/TestCasesClient/run_test_case.php | 93 -- .../V3/TestCasesClient/update_test_case.php | 76 - .../create_transition_route_group.php | 95 -- .../delete_transition_route_group.php | 85 -- .../get_location.php | 57 - .../get_transition_route_group.php | 83 -- .../list_locations.php | 62 - .../list_transition_route_groups.php | 84 -- .../update_transition_route_group.php | 78 - .../V3/VersionsClient/compare_versions.php | 96 -- .../V3/VersionsClient/create_version.php | 99 -- .../V3/VersionsClient/delete_version.php | 77 - .../V3/VersionsClient/get_location.php | 57 - .../samples/V3/VersionsClient/get_version.php | 79 - .../V3/VersionsClient/list_locations.php | 62 - .../V3/VersionsClient/list_versions.php | 79 - .../V3/VersionsClient/load_version.php | 97 -- .../V3/VersionsClient/update_version.php | 75 - .../V3/WebhooksClient/create_webhook.php | 77 - .../V3/WebhooksClient/delete_webhook.php | 71 - .../V3/WebhooksClient/get_location.php | 57 - .../samples/V3/WebhooksClient/get_webhook.php | 73 - .../V3/WebhooksClient/list_locations.php | 62 - .../V3/WebhooksClient/list_webhooks.php | 77 - .../V3/WebhooksClient/update_webhook.php | 72 - .../v3/src/V3/Client/AgentsClient.php | 850 ----------- .../v3/src/V3/Client/ChangelogsClient.php | 364 ----- .../v3/src/V3/Client/DeploymentsClient.php | 370 ----- .../v3/src/V3/Client/EntityTypesClient.php | 570 ------- .../v3/src/V3/Client/EnvironmentsClient.php | 772 ---------- .../v3/src/V3/Client/ExperimentsClient.php | 538 ------- .../v3/src/V3/Client/FlowsClient.php | 920 ------------ .../v3/src/V3/Client/GeneratorsClient.php | 446 ------ .../v3/src/V3/Client/IntentsClient.php | 612 -------- .../v3/src/V3/Client/PagesClient.php | 664 --------- .../Client/SecuritySettingsServiceClient.php | 572 ------- .../V3/Client/SessionEntityTypesClient.php | 552 ------- .../v3/src/V3/Client/SessionsClient.php | 814 ---------- .../v3/src/V3/Client/TestCasesClient.php | 1041 ------------- .../V3/Client/TransitionRouteGroupsClient.php | 651 -------- .../v3/src/V3/Client/VersionsClient.php | 582 -------- .../v3/src/V3/Client/WebhooksClient.php | 488 ------ .../v3/src/V3/gapic_metadata.json | 1074 -------------- .../V3/resources/agents_client_config.json | 111 -- .../V3/resources/agents_descriptor_config.php | 229 --- .../resources/agents_rest_client_config.php | 238 --- .../resources/changelogs_client_config.json | 54 - .../changelogs_descriptor_config.php | 98 -- .../changelogs_rest_client_config.php | 128 -- .../resources/deployments_client_config.json | 54 - .../deployments_descriptor_config.php | 98 -- .../deployments_rest_client_config.php | 128 -- .../resources/entity_types_client_config.json | 79 - .../entity_types_descriptor_config.php | 173 --- .../entity_types_rest_client_config.php | 188 --- .../resources/environments_client_config.json | 89 -- .../environments_descriptor_config.php | 232 --- .../environments_rest_client_config.php | 213 --- .../resources/experiments_client_config.json | 79 - .../experiments_descriptor_config.php | 160 -- .../experiments_rest_client_config.php | 191 --- .../src/V3/resources/flows_client_config.json | 94 -- .../V3/resources/flows_descriptor_config.php | 226 --- .../V3/resources/flows_rest_client_config.php | 223 --- .../resources/generators_client_config.json | 69 - .../generators_descriptor_config.php | 135 -- .../generators_rest_client_config.php | 164 -- .../V3/resources/intents_client_config.json | 79 - .../resources/intents_descriptor_config.php | 174 --- .../resources/intents_rest_client_config.php | 188 --- .../src/V3/resources/pages_client_config.json | 69 - .../V3/resources/pages_descriptor_config.php | 144 -- .../V3/resources/pages_rest_client_config.php | 164 -- ...curity_settings_service_client_config.json | 69 - ...ity_settings_service_descriptor_config.php | 141 -- ...ty_settings_service_rest_client_config.php | 167 --- .../session_entity_types_client_config.json | 69 - ...session_entity_types_descriptor_config.php | 139 -- ...ession_entity_types_rest_client_config.php | 196 --- .../V3/resources/sessions_client_config.json | 92 -- .../resources/sessions_descriptor_config.php | 151 -- .../resources/sessions_rest_client_config.php | 195 --- .../resources/test_cases_client_config.json | 104 -- .../test_cases_descriptor_config.php | 268 ---- .../test_cases_rest_client_config.php | 249 ---- ...transition_route_groups_client_config.json | 69 - ...nsition_route_groups_descriptor_config.php | 143 -- ...sition_route_groups_rest_client_config.php | 196 --- .../V3/resources/versions_client_config.json | 79 - .../resources/versions_descriptor_config.php | 173 --- .../resources/versions_rest_client_config.php | 191 --- .../V3/resources/webhooks_client_config.json | 69 - .../resources/webhooks_descriptor_config.php | 137 -- .../resources/webhooks_rest_client_config.php | 164 -- .../tests/Unit/V3/Client/AgentsClientTest.php | 1217 --------------- .../Unit/V3/Client/ChangelogsClientTest.php | 381 ----- .../Unit/V3/Client/DeploymentsClientTest.php | 361 ----- .../Unit/V3/Client/EntityTypesClientTest.php | 870 ----------- .../Unit/V3/Client/EnvironmentsClientTest.php | 1155 --------------- .../Unit/V3/Client/ExperimentsClientTest.php | 743 ---------- .../tests/Unit/V3/Client/FlowsClientTest.php | 1101 -------------- .../Unit/V3/Client/GeneratorsClientTest.php | 599 -------- .../Unit/V3/Client/IntentsClientTest.php | 860 ----------- .../tests/Unit/V3/Client/PagesClientTest.php | 586 -------- .../SecuritySettingsServiceClientTest.php | 609 -------- .../Client/SessionEntityTypesClientTest.php | 591 -------- .../Unit/V3/Client/SessionsClientTest.php | 728 --------- .../Unit/V3/Client/TestCasesClientTest.php | 1318 ----------------- .../TransitionRouteGroupsClientTest.php | 578 -------- .../Unit/V3/Client/VersionsClientTest.php | 848 ----------- .../Unit/V3/Client/WebhooksClientTest.php | 586 -------- 834 files changed, 1943 insertions(+), 106142 deletions(-) rename {owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx => DialogflowCx/metadata}/V3/CodeBlock.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx => DialogflowCx/metadata}/V3/Example.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx => DialogflowCx/metadata}/V3/ParameterDefinition.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx => DialogflowCx/metadata}/V3/Playbook.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx => DialogflowCx/metadata}/V3/Tool.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx => DialogflowCx/metadata}/V3/ToolCall.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx => DialogflowCx/metadata}/V3/Trace.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ExamplesClient/create_example.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ExamplesClient/delete_example.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ExamplesClient/get_example.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ExamplesClient/get_location.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ExamplesClient/list_examples.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ExamplesClient/list_locations.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ExamplesClient/update_example.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/create_playbook.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/create_playbook_version.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/delete_playbook.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/delete_playbook_version.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/export_playbook.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/get_location.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/get_playbook.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/get_playbook_version.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/import_playbook.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/list_locations.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/list_playbook_versions.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/list_playbooks.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/restore_playbook_version.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/PlaybooksClient/update_playbook.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/create_tool.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/create_tool_version.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/delete_tool.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/delete_tool_version.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/get_location.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/get_tool.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/get_tool_version.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/list_locations.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/list_tool_versions.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/list_tools.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/restore_tool_version.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/samples/V3/ToolsClient/update_tool.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Action.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/AgentUtterance.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/Client/ExamplesClient.php (99%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/Client/PlaybooksClient.php (97%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/Client/ToolsClient.php (98%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/CodeBlock.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/CreateExampleRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/CreatePlaybookRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/CreatePlaybookVersionRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/CreateToolRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/CreateToolVersionRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/DataType.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/DeleteExampleRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/DeletePlaybookRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/DeletePlaybookVersionRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/DeleteToolRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/DeleteToolVersionRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/DetectIntentResponseView.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Example.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ExportPlaybookRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ExportPlaybookRequest/DataFormat.php (89%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ExportPlaybookResponse.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/FlowInvocation.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/FlowTransition.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/GetExampleRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/GetPlaybookRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/GetPlaybookVersionRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/GetToolRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/GetToolVersionRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Handler.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Handler/EventHandler.php (96%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Handler/LifecycleHandler.php (96%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ImportPlaybookRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ImportPlaybookResponse.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ImportPlaybookResponse/ConflictingResources.php (95%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/InlineSchema.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ListExamplesRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ListExamplesResponse.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ListPlaybookVersionsRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ListPlaybookVersionsResponse.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ListPlaybooksRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ListPlaybooksResponse.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ListToolVersionsRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ListToolVersionsResponse.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ListToolsRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ListToolsResponse.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/LlmModelSettings.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/OutputState.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ParameterDefinition.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ParameterDefinition/ParameterType.php (93%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Playbook.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Playbook/Instruction.php (95%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Playbook/PlaybookType.php (89%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Playbook/Step.php (94%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/PlaybookImportStrategy.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/PlaybookInput.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/PlaybookInvocation.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/PlaybookOutput.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/PlaybookTransition.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/PlaybookVersion.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/RestorePlaybookVersionRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/RestorePlaybookVersionResponse.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/RestoreToolVersionRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/RestoreToolVersionResponse.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/SafetySettings/PhraseMatchStrategy.php (90%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/SafetySettings/PromptSecuritySettings.php (90%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/SafetySettings/RaiSettings.php (93%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/SafetySettings/RaiSettings/CategoryFilter.php (94%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/SafetySettings/RaiSettings/SafetyCategory.php (91%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php (91%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/Authentication.php (97%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/Authentication/ApiKeyConfig.php (97%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/Authentication/BearerTokenConfig.php (96%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/Authentication/OAuthConfig.php (97%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php (89%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/Authentication/RequestLocation.php (89%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/Authentication/ServiceAccountAuthConfig.php (94%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/Authentication/ServiceAgentAuthConfig.php (93%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php (91%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/DataStoreTool.php (95%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/DataStoreTool/FallbackPrompt.php (82%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/FunctionTool.php (96%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/OpenApiTool.php (97%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/ServiceDirectoryConfig.php (94%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/TLSConfig.php (93%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/TLSConfig/CACert.php (97%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Tool/ToolType.php (91%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ToolCall.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ToolCallResult.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ToolCallResult/Error.php (91%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ToolUse.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/ToolVersion.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/TypeSchema.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/TypeSchema/SchemaReference.php (93%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/UpdateExampleRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/UpdatePlaybookRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/UpdateToolRequest.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/UserUtterance.php (100%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php (91%) rename {owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx => DialogflowCx/src}/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php (94%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/resources/examples_client_config.json (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/resources/examples_descriptor_config.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/resources/examples_rest_client_config.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/resources/playbooks_client_config.json (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/resources/playbooks_descriptor_config.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/resources/playbooks_rest_client_config.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/resources/tools_client_config.json (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/resources/tools_descriptor_config.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/src/V3/resources/tools_rest_client_config.php (100%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/tests/Unit/V3/Client/ExamplesClientTest.php (88%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/tests/Unit/V3/Client/PlaybooksClientTest.php (86%) rename {owl-bot-staging/DialogflowCx/v3 => DialogflowCx}/tests/Unit/V3/Client/ToolsClientTest.php (87%) delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Agent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/AudioConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Changelog.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Deployment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/EntityType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Environment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Experiment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Gcs.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Generator.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Inline.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Page.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Session.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TestCase.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Version.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Webhook.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/DtmfSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/LoggingSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/SpeechSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/AnswerFeedbackSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/ClientCertificateSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GenAppBuilderSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings/GithubSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/PersonalizationSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentValidationResult.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/Rating.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/RatingReason.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioEncoding.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioInput.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BargeInConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchDeleteTestCasesRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpecs.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest/CoverageType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Changelog.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CloudConversationDebuggingInfo.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult/AggregatedTestResult.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/UserInput.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/VirtualAgentOutput.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateAgentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEntityTypeRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEnvironmentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExperimentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateFlowRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateGeneratorRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateIntentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePageRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSecuritySettingsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSessionEntityTypeRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTestCaseRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTransitionRouteGroupRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionOperationMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateWebhookRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerGenerationModelCallSignals.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerPart.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/CitedSnippet.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingDecision.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingScoreBucket.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/RewriterModelCallSignals.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/BannedPhraseMatch.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/SafetyDecision.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SearchSnippet.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteAgentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEntityTypeRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEnvironmentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExperimentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteFlowRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteGeneratorRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteIntentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePageRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSecuritySettingsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSessionEntityTypeRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteTransitionRouteGroupRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteVersionRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteWebhookRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/Result.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/State.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse/ResponseType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DocumentProcessingMode.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DtmfInput.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/AutoExpansionMode.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Entity.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/ExcludedPhrase.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Kind.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/TestCasesConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/VersionConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/WebhookConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventHandler.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventInput.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Definition.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/ConfidenceInterval.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/CountType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/Metric.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/MetricType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/VersionMetrics.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/State.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/DataFormat.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/GitDestination.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest/DataFormat.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest/DataFormat.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest/DataFormat.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FilterSpecs.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow/MultiLanguageSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowImportStrategy.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowValidationResult.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter/FillBehavior.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase/CaseContent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/GeneratorSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/SetParameterAction.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GcsDestination.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings/PromptTemplate.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/KnowledgeConnectorSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/ModelParameter.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/Placeholder.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentValidationResultRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetChangelogRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetDeploymentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEntityTypeRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEnvironmentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExperimentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowValidationResultRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGenerativeSettingsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGeneratorRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetIntentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPageRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSecuritySettingsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSessionEntityTypeRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseResultRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTransitionRouteGroupRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetVersionRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetWebhookRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest/MergeOption.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse/ConflictingResources.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest/ImportOption.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest/MergeOption.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse/ConflictingResources.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineDestination.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSource.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InputAudioConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/Parameter.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase/Part.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage/Intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentInput.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentView.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/KnowledgeConnectorSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LanguageInfo.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest/TestCaseView.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LoadVersionRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelTrainingMode.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioEncoding.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch/MatchType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Page.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo/ParameterState.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Phrase.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryInput.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryParameters.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryResult.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResourceName.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ConversationSuccess.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/EndInteraction.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/KnowledgeInfoCard.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/LiveAgentHandoff.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio/Segment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/OutputAudioText.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/PlayAudio.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ResponseType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/TelephonyTransferCall.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/Text.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/GitSource.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/RestoreOption.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig/RolloutStep.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutState.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseMetadata.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/Phrase.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SearchConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings/AudioFormat.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/InsightsExportSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/PurgeDataType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionScope.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionStrategy.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RetentionStrategy.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SentimentAnalysisResult.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType/EntityOverrideMode.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionInfo.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechModelVariant.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechToTextSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechWordInfo.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SsmlVoiceGender.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StartExperimentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StopExperimentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult/MessageType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SubmitAnswerFeedbackRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SynthesizeSpeechConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCase.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseError.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseResult.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestError.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestResult.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference/DiffType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextInput.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextToSpeechSettings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TrainFlowRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/Transition.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/TransitionNode.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRoute.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage/Transition.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateAgentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEntityTypeRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEnvironmentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExperimentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateFlowRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGenerativeSettingsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGeneratorRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateIntentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePageRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSecuritySettingsRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSessionEntityTypeRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTestCaseRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTransitionRouteGroupRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateVersionRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateWebhookRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateAgentRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateFlowRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/ResourceType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/Severity.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VariantsHistory.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version/State.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants/Variant.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VoiceSelectionParams.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/HttpMethod.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/OAuthConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAgentAuth.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/WebhookType.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/ServiceDirectoryConfig.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/FulfillmentInfo.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo/IntentParameterValue.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/SentimentAnalysisResult.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse/MergeBehavior.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/create_agent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/delete_agent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/export_agent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent_validation_result.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_generative_settings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_agents.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/restore_agent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_agent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_generative_settings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/validate_agent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_changelog.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_changelogs.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_deployment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_deployments.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/create_entity_type.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/delete_entity_type.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/export_entity_types.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_entity_type.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/import_entity_types.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_entity_types.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/update_entity_type.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/create_environment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/delete_environment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/deploy_flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_environment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_continuous_test_results.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_environments.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/lookup_environment_history.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/run_continuous_test.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/update_environment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/create_experiment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/delete_experiment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_experiment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_experiments.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/start_experiment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/stop_experiment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/update_experiment.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/create_flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/delete_flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/export_flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow_validation_result.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/import_flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_flows.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/train_flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/update_flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/validate_flow.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/create_generator.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/delete_generator.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_generator.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_generators.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/update_generator.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/create_intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/delete_intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/export_intents.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/import_intents.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_intents.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/update_intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/create_page.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/delete_page.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_page.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_pages.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/update_page.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/create_security_settings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/delete_security_settings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_security_settings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_security_settings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/update_security_settings.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/create_session_entity_type.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/delete_session_entity_type.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_session_entity_type.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_session_entity_types.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/update_session_entity_type.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/detect_intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/fulfill_intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/match_intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/server_streaming_detect_intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/streaming_detect_intent.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/submit_answer_feedback.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_delete_test_cases.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_run_test_cases.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/calculate_coverage.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/create_test_case.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/export_test_cases.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case_result.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/import_test_cases.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_case_results.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_cases.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/run_test_case.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/update_test_case.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/create_transition_route_group.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/delete_transition_route_group.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_transition_route_group.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_transition_route_groups.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/update_transition_route_group.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/compare_versions.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/create_version.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/delete_version.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_version.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_versions.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/load_version.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/update_version.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/create_webhook.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/delete_webhook.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_location.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_webhook.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_locations.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_webhooks.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/update_webhook.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/AgentsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/ChangelogsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/DeploymentsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/EntityTypesClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/EnvironmentsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExperimentsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/FlowsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/GeneratorsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/IntentsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/PagesClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/SecuritySettingsServiceClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionEntityTypesClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/TestCasesClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/TransitionRouteGroupsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/VersionsClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/Client/WebhooksClient.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/gapic_metadata.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_client_config.json delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_descriptor_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_rest_client_config.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/AgentsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ChangelogsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/DeploymentsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EntityTypesClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EnvironmentsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExperimentsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/FlowsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/GeneratorsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/IntentsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PagesClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SecuritySettingsServiceClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionEntityTypesClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TestCasesClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TransitionRouteGroupsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/VersionsClientTest.php delete mode 100644 owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/WebhooksClientTest.php diff --git a/DialogflowCx/metadata/V3/Agent.php b/DialogflowCx/metadata/V3/Agent.php index 9c0cb9ac7df80611701dd13baa151eb94285ef06..724675fd9bcedbbf4dfffc4e5627acd37acd6232 100644 GIT binary patch delta 186 zcmbQ^{>y#CBNmopwp^N%-?7R~%;et8&-#~; c8QYFK6XJySt~BC;*!LolK8Zo{Bj8a z1x5`{C$$HTtiK!;xa1}a3QMuL0VOui<1k`kWY~O>D~yqmak2)FG9%MwA08g&%|-kj FA^>eN9V-9; diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php b/DialogflowCx/metadata/V3/CodeBlock.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php rename to DialogflowCx/metadata/V3/CodeBlock.php diff --git a/DialogflowCx/metadata/V3/DataStoreConnection.php b/DialogflowCx/metadata/V3/DataStoreConnection.php index 7eb8a0a721a5426a137f748c2e5bdc02a20ef742..fbc544844bdc9920069107a8227b796ecba3131a 100644 GIT binary patch delta 179 zcmca2b4_*wCzEoFdw`Q~YDr>BVo73*dwza;PHId*QGQ8&QfXRDa7j^Va>?Y+jIK;` zB_>-jMJY?kq=VJy7eLkM7lYO4f%!@&8M%ZfA7mAtyoPBj%UK~VDIiB`b3OBHX2!C~ z((K;)LYiD0xlrpQSQQvGxQ)d1AVxxr09vaDu~sU9OJVX`7KO>T+3Yu;WbbAJ04Nka AX#fBK delta 62 zcmca6dqrjgC(~pnCViGG;#`&!y)7rNW0Gf8I?2c-JozA}@MLD@tt^X#xTJs_sm<4z SXEQT;PcCBj-u#079UA~!Tocd$ diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Example.php b/DialogflowCx/metadata/V3/Example.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Example.php rename to DialogflowCx/metadata/V3/Example.php diff --git a/DialogflowCx/metadata/V3/Flow.php b/DialogflowCx/metadata/V3/Flow.php index 5ad10bc49de49630b770b7f6c17b0ac50f8cebc9..ac2c0521444252d738b89d14463a2b3371430d33 100644 GIT binary patch delta 226 zcmbPd{mOR39A@Ew#G=I9)RNR9m(;Y(yv&l!{JhB*8MP)aU=rUvhq;N7X@k*b1y)l= zMvKV@Smi_tV9MiD;OaN~u}x%RTFbHdA%{GZdQ1$LbY@;bX-PabwZ#%r3d|bZMn;nl ja>+YjvD}IIfg__(ESF4vX$fvaq!ET-^TFm{TuX!i^mI_i delta 43 zcmV+`0M!5LJ)S$ToCCA)1A+kqxiAWoe+D13lm!(5v*QMe0s`;`vu_C>0<%mEo)T{= B4=(@! diff --git a/DialogflowCx/metadata/V3/GenerativeSettings.php b/DialogflowCx/metadata/V3/GenerativeSettings.php index 4c1c57bb2fbf..26db1a820696 100644 --- a/DialogflowCx/metadata/V3/GenerativeSettings.php +++ b/DialogflowCx/metadata/V3/GenerativeSettings.php @@ -18,14 +18,16 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SafetySettings::initOnce(); $pool->internalAddGeneratedFile( ' -Ð -7google/cloud/dialogflow/cx/v3/generative_settings.protogoogle.cloud.dialogflow.cx.v33google/cloud/dialogflow/cx/v3/safety_settings.proto"û +Õ + +7google/cloud/dialogflow/cx/v3/generative_settings.protogoogle.cloud.dialogflow.cx.v33google/cloud/dialogflow/cx/v3/safety_settings.proto"È GenerativeSettings name ( ] fallback_settings ( 2B.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsQ generative_safety_settings ( 2-.google.cloud.dialogflow.cx.v3.SafetySettingsr knowledge_connector_settings ( 2L.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - language_code ( å + language_code ( K +llm_model_settings ( 2/.google.cloud.dialogflow.cx.v3.LlmModelSettingså FallbackSettings selected_prompt ( k prompt_templates ( 2Q.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplateK @@ -40,7 +42,10 @@ public static function initOnce() { business_description (  agent_scope ( # disable_data_store_fallback (:êA~ -1dialogflow.googleapis.com/AgentGenerativeSettingsIprojects/{project}/locations/{location}/agents/{agent}/generativeSettingsBº +1dialogflow.googleapis.com/AgentGenerativeSettingsIprojects/{project}/locations/{location}/agents/{agent}/generativeSettings"6 +LlmModelSettings +model (  + prompt_text ( Bº !com.google.cloud.dialogflow.cx.v3BGenerativeSettingsProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' , true); diff --git a/DialogflowCx/metadata/V3/Generator.php b/DialogflowCx/metadata/V3/Generator.php index aab6a4c9bd6596f31b27c0e0871c06f9db9d2e0c..694ef91bbf394b2a911187132db32ddf8a0e45b2 100644 GIT binary patch delta 127 zcmdldH(g=FDyE6k#e`$rQ}a@b5=%16QiD@VN;31(izhcQ?O{3~G1-oJ38VRB2WC|s zpk#b8O!hXj8`Bon$;vFpWxctCa&mIxbMsSDbKnXjI29N*xQ+BDf8>%E@X5*b1{c3i>t;$p8QV diff --git a/DialogflowCx/metadata/V3/Page.php b/DialogflowCx/metadata/V3/Page.php index 0b9d8a96b0fe976c1abf532cc0ae55d4e5bcb271..79d044246d23328e5bc6303f72d6e8d7a1b7f313 100644 GIT binary patch delta 71 zcmcbvJ4bIr3=89r&9N+x*cgvYcHsW5DCES&Uy@jqo>~%Lkds)Ml%Jn1!LGol!RZvE W{>xE?OKGwpuQWSUX0s{JA}#=i-xr7g delta 25 hcmbQEcU^Zw3=89y&9N+x*ccloJ8*yBT*I?~3jl(R3CjQg diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php b/DialogflowCx/metadata/V3/ParameterDefinition.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php rename to DialogflowCx/metadata/V3/ParameterDefinition.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Playbook.php b/DialogflowCx/metadata/V3/Playbook.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Playbook.php rename to DialogflowCx/metadata/V3/Playbook.php diff --git a/DialogflowCx/metadata/V3/ResponseMessage.php b/DialogflowCx/metadata/V3/ResponseMessage.php index 16d6e85a182b4e15b18dd44839c72829eed8883c..3043afcba424ee272ea898206b94a12bdd21b15f 100644 GIT binary patch delta 105 zcmca1+AqFAglXbDG0vEf{QMl}#GIVTuNdo?rU_2YVhUr_ot(oY$6o@JiBASf=@k^^ um*h|0&m_;Zo^SI5rebDM8!k?`w1k)fqXxH8jQV6oW_b>nd7A^+I#>WwAt8+b delta 40 wcmeAdzahFoglTdtQwYmS0WOn?-X@b@GAT^9V3uS0$h$d$xtMt~7keuU00Q_71^@s6 diff --git a/DialogflowCx/metadata/V3/SafetySettings.php b/DialogflowCx/metadata/V3/SafetySettings.php index 1a14fd5d3ef0adf0acec649614d8531d9c593ac5..f18a27eda7a7c0667da0a9af4c60949a99b97317 100644 GIT binary patch delta 917 zcmZuv&2G~`5XN?ZFiC^6KxG1`C4j^MS`;Cn9yn~Ab#2wLEw4ixE-N>6(ug#T92b;R zuG}MWM&in$5*Ho2Vwn_HVGVe_WPM{X1?XWm(O2{;?Lr2TWr<80+guV4WbDR zqNqRYjZp+okAkj$Hi+1vKO6=}Y;+v@}-W zK7cX`Pftb>_vxI4{b+J!m`}J3Zn#}ZFf@ZKS%M?H``an#dr!n*xI z6og|%+LU+zJr1BPV7Jr^s3o{0Pvy4&rR6$$5Ba&IA|&%mq-u*&={n{_iI delta 58 zcmZ1@xR_&uE)&yw=E?d@p+eIcx%h$;(^5++gHuaNGV{`lC-X4-O|E0H<<7A%M%9x diff --git a/DialogflowCx/metadata/V3/Session.php b/DialogflowCx/metadata/V3/Session.php index 0d904253c5c6b8d3ef6e48d96e0af47bfcf3caf2..5aea7c5a187314ed98b761d82f978a5f5860f410 100644 GIT binary patch delta 634 zcmZ3S)nBmTGqaF;YF=tlVo7FMYH(^vNoHPp@#F_ATAS}M>oHEg!z|7blAoXBoS2id z`2kBDBh#zI%?@k@jEv@!H?qqKr^EHe7sE8KWIw~G3zFq50qTrT25HUXc*Vrjz`Qw% zTbof*D42`4D7CmCKd(47zAQ7fT!K@9QG?IOd~%_T{N%qne3KXOvhjrhC7hTaI5H~r zF>{GbHq;f_JddZ6k>waOm(1h|x}uv6_@c0xC4gxbC)}*fUHpsLm_D;l)))IOAKbuayl%eR6VrK^$1Hf_<~uTB3lBX&Lk8 zwQ}Z+Ql4A_@IZne2{B!fWKd`YkZieYj}L9UvPk{v!|P< ztBU}GkP4RqKE-aKK0X4BLaJPf_*6ML275XSFlhHJb9y@@aAG3F~-gJcqcKkd}QL1nfy^ieDZ!h*3A?6gBdql2rg!0I>a{l zuK4%Kxhevi|4OhiZk{cb&&G6{X)}+aIpgF$B{fFQ&0Cei8GVGgxXV+MGV=4Y<18JNornlCQwRRfqC*rVL4F| bE*_XQYIJ1*_X3t8kg%dwa;GTjl`9LlQ3$kZe-xt1*`F@Z~^I5oK_wIseQ zwWv5VKQBHlzbL-6IJGD*F*h~7AhEc(JijPKLRf)OgVV|Afg|HDM;$ILh@RZUyu|d> zBE9td{PdjE#DdIXz2y8{{a~-T$$6YkaWOGm3aDm+11UKtGZp9! zh>Qd)%odU(Vm+s^r3J`G;NWpY_p*=-7e89iLA?YFT&BqnIW0tIGIFV)1PCZPCO_p= Y6iDD=EdvFM1QTWe;|#;iB3z|n02<2aMgRZ+ delta 76 zcmV-S0JHy?M~OkO`~w8PI0`G1p#&bY9t1T30?rPzRRtyi0`v)!eFjpKF$ZUpDhTYe ilL<=!0dtc`3qq6W3o-*W3KNr|3?Y+F4HB~_4RIE=dKX#% diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/create_example.php b/DialogflowCx/samples/V3/ExamplesClient/create_example.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/create_example.php rename to DialogflowCx/samples/V3/ExamplesClient/create_example.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/delete_example.php b/DialogflowCx/samples/V3/ExamplesClient/delete_example.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/delete_example.php rename to DialogflowCx/samples/V3/ExamplesClient/delete_example.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_example.php b/DialogflowCx/samples/V3/ExamplesClient/get_example.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_example.php rename to DialogflowCx/samples/V3/ExamplesClient/get_example.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_location.php b/DialogflowCx/samples/V3/ExamplesClient/get_location.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/get_location.php rename to DialogflowCx/samples/V3/ExamplesClient/get_location.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_examples.php b/DialogflowCx/samples/V3/ExamplesClient/list_examples.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_examples.php rename to DialogflowCx/samples/V3/ExamplesClient/list_examples.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_locations.php b/DialogflowCx/samples/V3/ExamplesClient/list_locations.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/list_locations.php rename to DialogflowCx/samples/V3/ExamplesClient/list_locations.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/update_example.php b/DialogflowCx/samples/V3/ExamplesClient/update_example.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ExamplesClient/update_example.php rename to DialogflowCx/samples/V3/ExamplesClient/update_example.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook.php b/DialogflowCx/samples/V3/PlaybooksClient/create_playbook.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook.php rename to DialogflowCx/samples/V3/PlaybooksClient/create_playbook.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook_version.php b/DialogflowCx/samples/V3/PlaybooksClient/create_playbook_version.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/create_playbook_version.php rename to DialogflowCx/samples/V3/PlaybooksClient/create_playbook_version.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook.php b/DialogflowCx/samples/V3/PlaybooksClient/delete_playbook.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook.php rename to DialogflowCx/samples/V3/PlaybooksClient/delete_playbook.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook_version.php b/DialogflowCx/samples/V3/PlaybooksClient/delete_playbook_version.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/delete_playbook_version.php rename to DialogflowCx/samples/V3/PlaybooksClient/delete_playbook_version.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/export_playbook.php b/DialogflowCx/samples/V3/PlaybooksClient/export_playbook.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/export_playbook.php rename to DialogflowCx/samples/V3/PlaybooksClient/export_playbook.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_location.php b/DialogflowCx/samples/V3/PlaybooksClient/get_location.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_location.php rename to DialogflowCx/samples/V3/PlaybooksClient/get_location.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook.php b/DialogflowCx/samples/V3/PlaybooksClient/get_playbook.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook.php rename to DialogflowCx/samples/V3/PlaybooksClient/get_playbook.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook_version.php b/DialogflowCx/samples/V3/PlaybooksClient/get_playbook_version.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/get_playbook_version.php rename to DialogflowCx/samples/V3/PlaybooksClient/get_playbook_version.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/import_playbook.php b/DialogflowCx/samples/V3/PlaybooksClient/import_playbook.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/import_playbook.php rename to DialogflowCx/samples/V3/PlaybooksClient/import_playbook.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_locations.php b/DialogflowCx/samples/V3/PlaybooksClient/list_locations.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_locations.php rename to DialogflowCx/samples/V3/PlaybooksClient/list_locations.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbook_versions.php b/DialogflowCx/samples/V3/PlaybooksClient/list_playbook_versions.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbook_versions.php rename to DialogflowCx/samples/V3/PlaybooksClient/list_playbook_versions.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbooks.php b/DialogflowCx/samples/V3/PlaybooksClient/list_playbooks.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/list_playbooks.php rename to DialogflowCx/samples/V3/PlaybooksClient/list_playbooks.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/restore_playbook_version.php b/DialogflowCx/samples/V3/PlaybooksClient/restore_playbook_version.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/restore_playbook_version.php rename to DialogflowCx/samples/V3/PlaybooksClient/restore_playbook_version.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/update_playbook.php b/DialogflowCx/samples/V3/PlaybooksClient/update_playbook.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/PlaybooksClient/update_playbook.php rename to DialogflowCx/samples/V3/PlaybooksClient/update_playbook.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool.php b/DialogflowCx/samples/V3/ToolsClient/create_tool.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool.php rename to DialogflowCx/samples/V3/ToolsClient/create_tool.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool_version.php b/DialogflowCx/samples/V3/ToolsClient/create_tool_version.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/create_tool_version.php rename to DialogflowCx/samples/V3/ToolsClient/create_tool_version.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool.php b/DialogflowCx/samples/V3/ToolsClient/delete_tool.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool.php rename to DialogflowCx/samples/V3/ToolsClient/delete_tool.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool_version.php b/DialogflowCx/samples/V3/ToolsClient/delete_tool_version.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/delete_tool_version.php rename to DialogflowCx/samples/V3/ToolsClient/delete_tool_version.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_location.php b/DialogflowCx/samples/V3/ToolsClient/get_location.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_location.php rename to DialogflowCx/samples/V3/ToolsClient/get_location.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool.php b/DialogflowCx/samples/V3/ToolsClient/get_tool.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool.php rename to DialogflowCx/samples/V3/ToolsClient/get_tool.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool_version.php b/DialogflowCx/samples/V3/ToolsClient/get_tool_version.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/get_tool_version.php rename to DialogflowCx/samples/V3/ToolsClient/get_tool_version.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_locations.php b/DialogflowCx/samples/V3/ToolsClient/list_locations.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_locations.php rename to DialogflowCx/samples/V3/ToolsClient/list_locations.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tool_versions.php b/DialogflowCx/samples/V3/ToolsClient/list_tool_versions.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tool_versions.php rename to DialogflowCx/samples/V3/ToolsClient/list_tool_versions.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tools.php b/DialogflowCx/samples/V3/ToolsClient/list_tools.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/list_tools.php rename to DialogflowCx/samples/V3/ToolsClient/list_tools.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/restore_tool_version.php b/DialogflowCx/samples/V3/ToolsClient/restore_tool_version.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/restore_tool_version.php rename to DialogflowCx/samples/V3/ToolsClient/restore_tool_version.php diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/update_tool.php b/DialogflowCx/samples/V3/ToolsClient/update_tool.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/samples/V3/ToolsClient/update_tool.php rename to DialogflowCx/samples/V3/ToolsClient/update_tool.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Action.php b/DialogflowCx/src/V3/Action.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Action.php rename to DialogflowCx/src/V3/Action.php diff --git a/DialogflowCx/src/V3/Agent.php b/DialogflowCx/src/V3/Agent.php index 1cc74a783853..8bcccac73104 100644 --- a/DialogflowCx/src/V3/Agent.php +++ b/DialogflowCx/src/V3/Agent.php @@ -93,15 +93,6 @@ class Agent extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechToTextSettings speech_to_text_settings = 13; */ protected $speech_to_text_settings = null; - /** - * Immutable. Name of the start flow in this agent. A start flow will be - * automatically created when the agent is created, and can only be deleted by - * deleting the agent. Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $start_flow = ''; /** * Name of the * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] @@ -200,6 +191,7 @@ class Agent extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional bool satisfies_pzi = 46 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $satisfies_pzi = null; + protected $session_entry_resource; /** * Constructor. @@ -243,10 +235,22 @@ class Agent extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Dialogflow\Cx\V3\SpeechToTextSettings $speech_to_text_settings * Speech recognition related settings. * @type string $start_flow - * Immutable. Name of the start flow in this agent. A start flow will be - * automatically created when the agent is created, and can only be deleted by - * deleting the agent. Format: + * Name of the start flow in this agent. A start flow will be automatically + * created when the agent is created, and can only be deleted by deleting + * the agent. + * Format: * `projects//locations//agents//flows/`. + * Currently only the default start flow with id + * "00000000-0000-0000-0000-000000000000" is allowed. + * @type string $start_playbook + * Name of the start playbook in this agent. A start playbook will be + * automatically created when the agent is created, and can only be deleted + * by deleting the agent. + * Format: + * `projects//locations//agents//playbooks/`. + * Currently only the + * default playbook with id + * "00000000-0000-0000-0000-000000000000" is allowed. * @type string $security_settings * Name of the * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] @@ -552,33 +556,89 @@ public function setSpeechToTextSettings($var) } /** - * Immutable. Name of the start flow in this agent. A start flow will be - * automatically created when the agent is created, and can only be deleted by - * deleting the agent. Format: + * Name of the start flow in this agent. A start flow will be automatically + * created when the agent is created, and can only be deleted by deleting + * the agent. + * Format: * `projects//locations//agents//flows/`. + * Currently only the default start flow with id + * "00000000-0000-0000-0000-000000000000" is allowed. * - * Generated from protobuf field string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * Generated from protobuf field string start_flow = 16 [(.google.api.resource_reference) = { * @return string */ public function getStartFlow() { - return $this->start_flow; + return $this->readOneof(16); + } + + public function hasStartFlow() + { + return $this->hasOneof(16); } /** - * Immutable. Name of the start flow in this agent. A start flow will be - * automatically created when the agent is created, and can only be deleted by - * deleting the agent. Format: + * Name of the start flow in this agent. A start flow will be automatically + * created when the agent is created, and can only be deleted by deleting + * the agent. + * Format: * `projects//locations//agents//flows/`. + * Currently only the default start flow with id + * "00000000-0000-0000-0000-000000000000" is allowed. * - * Generated from protobuf field string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * Generated from protobuf field string start_flow = 16 [(.google.api.resource_reference) = { * @param string $var * @return $this */ public function setStartFlow($var) { GPBUtil::checkString($var, True); - $this->start_flow = $var; + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Name of the start playbook in this agent. A start playbook will be + * automatically created when the agent is created, and can only be deleted + * by deleting the agent. + * Format: + * `projects//locations//agents//playbooks/`. + * Currently only the + * default playbook with id + * "00000000-0000-0000-0000-000000000000" is allowed. + * + * Generated from protobuf field string start_playbook = 39 [(.google.api.resource_reference) = { + * @return string + */ + public function getStartPlaybook() + { + return $this->readOneof(39); + } + + public function hasStartPlaybook() + { + return $this->hasOneof(39); + } + + /** + * Name of the start playbook in this agent. A start playbook will be + * automatically created when the agent is created, and can only be deleted + * by deleting the agent. + * Format: + * `projects//locations//agents//playbooks/`. + * Currently only the + * default playbook with id + * "00000000-0000-0000-0000-000000000000" is allowed. + * + * Generated from protobuf field string start_playbook = 39 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStartPlaybook($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(39, $var); return $this; } @@ -1069,5 +1129,13 @@ public function setSatisfiesPzi($var) return $this; } + /** + * @return string + */ + public function getSessionEntryResource() + { + return $this->whichOneof("session_entry_resource"); + } + } diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentUtterance.php b/DialogflowCx/src/V3/AgentUtterance.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentUtterance.php rename to DialogflowCx/src/V3/AgentUtterance.php diff --git a/DialogflowCx/src/V3/AudioEncoding.php b/DialogflowCx/src/V3/AudioEncoding.php index 8d8ca43f7a10..570bd291f896 100644 --- a/DialogflowCx/src/V3/AudioEncoding.php +++ b/DialogflowCx/src/V3/AudioEncoding.php @@ -25,6 +25,7 @@ class AudioEncoding const AUDIO_ENCODING_UNSPECIFIED = 0; /** * Uncompressed 16-bit signed little-endian samples (Linear PCM). + * LINT: LEGACY_NAMES * * Generated from protobuf enum AUDIO_ENCODING_LINEAR_16 = 1; */ diff --git a/DialogflowCx/src/V3/Client/AgentsClient.php b/DialogflowCx/src/V3/Client/AgentsClient.php index ad294c99c9e1..9bde0787cebd 100644 --- a/DialogflowCx/src/V3/Client/AgentsClient.php +++ b/DialogflowCx/src/V3/Client/AgentsClient.php @@ -303,6 +303,27 @@ public static function locationName(string $project, string $location): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * secret_version resource. @@ -351,6 +372,7 @@ public static function securitySettingsName(string $project, string $location, s * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} * - location: projects/{project}/locations/{location} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} * - securitySettings: projects/{project}/locations/{location}/securitySettings/{security_settings} * diff --git a/DialogflowCx/src/V3/Client/EnvironmentsClient.php b/DialogflowCx/src/V3/Client/EnvironmentsClient.php index ffcbb8b49fbe..87e8c7ea1fbf 100644 --- a/DialogflowCx/src/V3/Client/EnvironmentsClient.php +++ b/DialogflowCx/src/V3/Client/EnvironmentsClient.php @@ -225,6 +225,25 @@ public static function environmentName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a service * resource. @@ -322,6 +341,7 @@ public static function webhookName(string $project, string $location, string $ag * Template: Pattern * - agent: projects/{project}/locations/{location}/agents/{agent} * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} * - testCase: projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case} * - version: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExamplesClient.php b/DialogflowCx/src/V3/Client/ExamplesClient.php similarity index 99% rename from owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExamplesClient.php rename to DialogflowCx/src/V3/Client/ExamplesClient.php index 76b8dd343d84..bf12f6adae26 100644 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExamplesClient.php +++ b/DialogflowCx/src/V3/Client/ExamplesClient.php @@ -126,8 +126,13 @@ private static function getClientDefaults() * * @return string The formatted example resource. */ - public static function exampleName(string $project, string $location, string $agent, string $playbook, string $example): string - { + public static function exampleName( + string $project, + string $location, + string $agent, + string $playbook, + string $example + ): string { return self::getPathTemplate('example')->render([ 'project' => $project, 'location' => $location, diff --git a/DialogflowCx/src/V3/Client/FlowsClient.php b/DialogflowCx/src/V3/Client/FlowsClient.php index 6cc86c08b614..c2f1b8c66642 100644 --- a/DialogflowCx/src/V3/Client/FlowsClient.php +++ b/DialogflowCx/src/V3/Client/FlowsClient.php @@ -316,6 +316,27 @@ public static function pageName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_agent_flow_transition_route_group resource. @@ -369,6 +390,27 @@ public static function projectLocationAgentTransitionRouteGroupName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * transition_route_group resource. @@ -428,8 +470,10 @@ public static function webhookName(string $project, string $location, string $ag * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} * diff --git a/DialogflowCx/src/V3/Client/PagesClient.php b/DialogflowCx/src/V3/Client/PagesClient.php index 914e2fd25fb6..19475607c20d 100644 --- a/DialogflowCx/src/V3/Client/PagesClient.php +++ b/DialogflowCx/src/V3/Client/PagesClient.php @@ -226,6 +226,27 @@ public static function pageName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_agent_flow_transition_route_group resource. @@ -279,6 +300,27 @@ public static function projectLocationAgentTransitionRouteGroupName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * transition_route_group resource. @@ -337,8 +379,10 @@ public static function webhookName(string $project, string $location, string $ag * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} * diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PlaybooksClient.php b/DialogflowCx/src/V3/Client/PlaybooksClient.php similarity index 97% rename from owl-bot-staging/DialogflowCx/v3/src/V3/Client/PlaybooksClient.php rename to DialogflowCx/src/V3/Client/PlaybooksClient.php index 77f5b59d4249..e8e210e9d8f9 100644 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PlaybooksClient.php +++ b/DialogflowCx/src/V3/Client/PlaybooksClient.php @@ -216,8 +216,13 @@ public static function agentName(string $project, string $location, string $agen * * @return string The formatted example resource. */ - public static function exampleName(string $project, string $location, string $agent, string $playbook, string $example): string - { + public static function exampleName( + string $project, + string $location, + string $agent, + string $playbook, + string $example + ): string { return self::getPathTemplate('example')->render([ 'project' => $project, 'location' => $location, @@ -302,8 +307,13 @@ public static function playbookName(string $project, string $location, string $a * * @return string The formatted playbook_version resource. */ - public static function playbookVersionName(string $project, string $location, string $agent, string $playbook, string $version): string - { + public static function playbookVersionName( + string $project, + string $location, + string $agent, + string $playbook, + string $version + ): string { return self::getPathTemplate('playbookVersion')->render([ 'project' => $project, 'location' => $location, @@ -519,8 +529,10 @@ public function createPlaybook(CreatePlaybookRequest $request, array $callOption * * @throws ApiException Thrown if the API call fails. */ - public function createPlaybookVersion(CreatePlaybookVersionRequest $request, array $callOptions = []): PlaybookVersion - { + public function createPlaybookVersion( + CreatePlaybookVersionRequest $request, + array $callOptions = [] + ): PlaybookVersion { return $this->startApiCall('CreatePlaybookVersion', $request, $callOptions)->wait(); } @@ -700,8 +712,10 @@ public function importPlaybook(ImportPlaybookRequest $request, array $callOption * * @throws ApiException Thrown if the API call fails. */ - public function listPlaybookVersions(ListPlaybookVersionsRequest $request, array $callOptions = []): PagedListResponse - { + public function listPlaybookVersions( + ListPlaybookVersionsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListPlaybookVersions', $request, $callOptions); } @@ -753,8 +767,10 @@ public function listPlaybooks(ListPlaybooksRequest $request, array $callOptions * * @throws ApiException Thrown if the API call fails. */ - public function restorePlaybookVersion(RestorePlaybookVersionRequest $request, array $callOptions = []): RestorePlaybookVersionResponse - { + public function restorePlaybookVersion( + RestorePlaybookVersionRequest $request, + array $callOptions = [] + ): RestorePlaybookVersionResponse { return $this->startApiCall('RestorePlaybookVersion', $request, $callOptions)->wait(); } diff --git a/DialogflowCx/src/V3/Client/SessionsClient.php b/DialogflowCx/src/V3/Client/SessionsClient.php index e555685d32e9..4559d0912a42 100644 --- a/DialogflowCx/src/V3/Client/SessionsClient.php +++ b/DialogflowCx/src/V3/Client/SessionsClient.php @@ -228,6 +228,27 @@ public static function pageName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_agent_environment_session resource. @@ -433,6 +454,27 @@ public static function sessionEntityTypeName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a version * resource. @@ -470,6 +512,7 @@ public static function versionName( * - entityType: projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type} * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} * - projectLocationAgentEnvironmentSession: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session} * - projectLocationAgentEnvironmentSessionEntityType: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type} * - projectLocationAgentSession: projects/{project}/locations/{location}/agents/{agent}/sessions/{session} @@ -478,6 +521,7 @@ public static function versionName( * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} * - session: projects/{project}/locations/{location}/agents/{agent}/sessions/{session} * - sessionEntityType: projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} * - version: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version} * * The optional $template argument can be supplied to specify a particular pattern, diff --git a/DialogflowCx/src/V3/Client/TestCasesClient.php b/DialogflowCx/src/V3/Client/TestCasesClient.php index 6446b0d01ba8..b196238f6976 100644 --- a/DialogflowCx/src/V3/Client/TestCasesClient.php +++ b/DialogflowCx/src/V3/Client/TestCasesClient.php @@ -348,6 +348,27 @@ public static function pageName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a playbook + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $playbook + * + * @return string The formatted playbook resource. + */ + public static function playbookName(string $project, string $location, string $agent, string $playbook): string + { + return self::getPathTemplate('playbook')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'playbook' => $playbook, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_agent_flow_transition_route_group resource. @@ -450,6 +471,27 @@ public static function testCaseResultName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * transition_route_group resource. @@ -510,10 +552,12 @@ public static function webhookName(string $project, string $location, string $ag * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} + * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} * - testCase: projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case} * - testCaseResult: projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} * diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ToolsClient.php b/DialogflowCx/src/V3/Client/ToolsClient.php similarity index 98% rename from owl-bot-staging/DialogflowCx/v3/src/V3/Client/ToolsClient.php rename to DialogflowCx/src/V3/Client/ToolsClient.php index 838b519e52f1..33eb3255f970 100644 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ToolsClient.php +++ b/DialogflowCx/src/V3/Client/ToolsClient.php @@ -218,8 +218,13 @@ public static function toolName(string $project, string $location, string $agent * * @return string The formatted tool_version resource. */ - public static function toolVersionName(string $project, string $location, string $agent, string $tool, string $version): string - { + public static function toolVersionName( + string $project, + string $location, + string $agent, + string $tool, + string $version + ): string { return self::getPathTemplate('toolVersion')->render([ 'project' => $project, 'location' => $location, @@ -573,8 +578,10 @@ public function listTools(ListToolsRequest $request, array $callOptions = []): P * * @throws ApiException Thrown if the API call fails. */ - public function restoreToolVersion(RestoreToolVersionRequest $request, array $callOptions = []): RestoreToolVersionResponse - { + public function restoreToolVersion( + RestoreToolVersionRequest $request, + array $callOptions = [] + ): RestoreToolVersionResponse { return $this->startApiCall('RestoreToolVersion', $request, $callOptions)->wait(); } diff --git a/DialogflowCx/src/V3/Client/TransitionRouteGroupsClient.php b/DialogflowCx/src/V3/Client/TransitionRouteGroupsClient.php index 4f8b1527bf93..e59900ce028c 100644 --- a/DialogflowCx/src/V3/Client/TransitionRouteGroupsClient.php +++ b/DialogflowCx/src/V3/Client/TransitionRouteGroupsClient.php @@ -278,6 +278,27 @@ public static function projectLocationAgentTransitionRouteGroupName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a tool + * resource. + * + * @param string $project + * @param string $location + * @param string $agent + * @param string $tool + * + * @return string The formatted tool resource. + */ + public static function toolName(string $project, string $location, string $agent, string $tool): string + { + return self::getPathTemplate('tool')->render([ + 'project' => $project, + 'location' => $location, + 'agent' => $agent, + 'tool' => $tool, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * transition_route_group resource. @@ -338,6 +359,7 @@ public static function webhookName(string $project, string $location, string $ag * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} + * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} * diff --git a/DialogflowCx/src/V3/Client/WebhooksClient.php b/DialogflowCx/src/V3/Client/WebhooksClient.php index 4ac5c13254f8..de7e7f4443e1 100644 --- a/DialogflowCx/src/V3/Client/WebhooksClient.php +++ b/DialogflowCx/src/V3/Client/WebhooksClient.php @@ -133,6 +133,25 @@ public static function agentName(string $project, string $location, string $agen ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a service * resource. @@ -180,6 +199,7 @@ public static function webhookName(string $project, string $location, string $ag * The following name formats are supported: * Template: Pattern * - agent: projects/{project}/locations/{location}/agents/{agent} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} * diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php b/DialogflowCx/src/V3/CodeBlock.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CodeBlock.php rename to DialogflowCx/src/V3/CodeBlock.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExampleRequest.php b/DialogflowCx/src/V3/CreateExampleRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExampleRequest.php rename to DialogflowCx/src/V3/CreateExampleRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookRequest.php b/DialogflowCx/src/V3/CreatePlaybookRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookRequest.php rename to DialogflowCx/src/V3/CreatePlaybookRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookVersionRequest.php b/DialogflowCx/src/V3/CreatePlaybookVersionRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePlaybookVersionRequest.php rename to DialogflowCx/src/V3/CreatePlaybookVersionRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolRequest.php b/DialogflowCx/src/V3/CreateToolRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolRequest.php rename to DialogflowCx/src/V3/CreateToolRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolVersionRequest.php b/DialogflowCx/src/V3/CreateToolVersionRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateToolVersionRequest.php rename to DialogflowCx/src/V3/CreateToolVersionRequest.php diff --git a/DialogflowCx/src/V3/DataStoreConnectionSignals/SearchSnippet.php b/DialogflowCx/src/V3/DataStoreConnectionSignals/SearchSnippet.php index c4405d9227da..ff30426a2dbf 100644 --- a/DialogflowCx/src/V3/DataStoreConnectionSignals/SearchSnippet.php +++ b/DialogflowCx/src/V3/DataStoreConnectionSignals/SearchSnippet.php @@ -33,6 +33,12 @@ class SearchSnippet extends \Google\Protobuf\Internal\Message * Generated from protobuf field string text = 3; */ protected $text = ''; + /** + * Metadata associated with the document. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 5; + */ + protected $metadata = null; /** * Constructor. @@ -46,6 +52,8 @@ class SearchSnippet extends \Google\Protobuf\Internal\Message * Uri for the document. Present if specified for the document. * @type string $text * Text included in the prompt. + * @type \Google\Protobuf\Struct $metadata + * Metadata associated with the document. * } */ public function __construct($data = NULL) { @@ -131,6 +139,42 @@ public function setText($var) return $this; } + /** + * Metadata associated with the document. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 5; + * @return \Google\Protobuf\Struct|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Metadata associated with the document. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 5; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->metadata = $var; + + return $this; + } + } diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataType.php b/DialogflowCx/src/V3/DataType.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataType.php rename to DialogflowCx/src/V3/DataType.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExampleRequest.php b/DialogflowCx/src/V3/DeleteExampleRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExampleRequest.php rename to DialogflowCx/src/V3/DeleteExampleRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookRequest.php b/DialogflowCx/src/V3/DeletePlaybookRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookRequest.php rename to DialogflowCx/src/V3/DeletePlaybookRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookVersionRequest.php b/DialogflowCx/src/V3/DeletePlaybookVersionRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePlaybookVersionRequest.php rename to DialogflowCx/src/V3/DeletePlaybookVersionRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolRequest.php b/DialogflowCx/src/V3/DeleteToolRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolRequest.php rename to DialogflowCx/src/V3/DeleteToolRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolVersionRequest.php b/DialogflowCx/src/V3/DeleteToolVersionRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteToolVersionRequest.php rename to DialogflowCx/src/V3/DeleteToolVersionRequest.php diff --git a/DialogflowCx/src/V3/DetectIntentRequest.php b/DialogflowCx/src/V3/DetectIntentRequest.php index 315fa48ec970..7bf17368cf56 100644 --- a/DialogflowCx/src/V3/DetectIntentRequest.php +++ b/DialogflowCx/src/V3/DetectIntentRequest.php @@ -53,6 +53,14 @@ class DetectIntentRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; */ protected $output_audio_config = null; + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $response_view = 0; /** * Constructor. @@ -82,6 +90,10 @@ class DetectIntentRequest extends \Google\Protobuf\Internal\Message * Required. The input specification. * @type \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $output_audio_config * Instructs the speech synthesizer how to generate the output audio. + * @type int $response_view + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. * } */ public function __construct($data = NULL) { @@ -251,5 +263,35 @@ public function setOutputAudioConfig($var) return $this; } + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponseView::class); + $this->response_view = $var; + + return $this; + } + } diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponseView.php b/DialogflowCx/src/V3/DetectIntentResponseView.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponseView.php rename to DialogflowCx/src/V3/DetectIntentResponseView.php diff --git a/DialogflowCx/src/V3/Environment/VersionConfig.php b/DialogflowCx/src/V3/Environment/VersionConfig.php index e0000ec78bc0..bd163a6bf6a3 100644 --- a/DialogflowCx/src/V3/Environment/VersionConfig.php +++ b/DialogflowCx/src/V3/Environment/VersionConfig.php @@ -16,11 +16,13 @@ class VersionConfig extends \Google\Protobuf\Internal\Message { /** - * Required. Both flow and playbook versions are supported. + * Required. Flow, playbook and tool versions are supported. * Format for flow version: * projects//locations//agents//flows//versions/. * Format for playbook version: * projects//locations//agents//playbooks//versions/. + * Format for tool version: + * projects//locations//agents//tools//versions/. * * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -33,11 +35,13 @@ class VersionConfig extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $version - * Required. Both flow and playbook versions are supported. + * Required. Flow, playbook and tool versions are supported. * Format for flow version: * projects//locations//agents//flows//versions/. * Format for playbook version: * projects//locations//agents//playbooks//versions/. + * Format for tool version: + * projects//locations//agents//tools//versions/. * } */ public function __construct($data = NULL) { @@ -46,11 +50,13 @@ public function __construct($data = NULL) { } /** - * Required. Both flow and playbook versions are supported. + * Required. Flow, playbook and tool versions are supported. * Format for flow version: * projects//locations//agents//flows//versions/. * Format for playbook version: * projects//locations//agents//playbooks//versions/. + * Format for tool version: + * projects//locations//agents//tools//versions/. * * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -61,11 +67,13 @@ public function getVersion() } /** - * Required. Both flow and playbook versions are supported. + * Required. Flow, playbook and tool versions are supported. * Format for flow version: * projects//locations//agents//flows//versions/. * Format for playbook version: * projects//locations//agents//playbooks//versions/. + * Format for tool version: + * projects//locations//agents//tools//versions/. * * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/DialogflowCx/src/V3/EventHandler.php b/DialogflowCx/src/V3/EventHandler.php index 32c60215e66b..69dc1970bcfc 100644 --- a/DialogflowCx/src/V3/EventHandler.php +++ b/DialogflowCx/src/V3/EventHandler.php @@ -75,6 +75,10 @@ class EventHandler extends \Google\Protobuf\Internal\Message * The target flow to transition to. * Format: * `projects//locations//agents//flows/`. + * @type string $target_playbook + * The target playbook to transition to. + * Format: + * `projects//locations//agents//playbooks/`. * } */ public function __construct($data = NULL) { @@ -246,6 +250,41 @@ public function setTargetFlow($var) return $this; } + /** + * The target playbook to transition to. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string target_playbook = 7 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetPlaybook() + { + return $this->readOneof(7); + } + + public function hasTargetPlaybook() + { + return $this->hasOneof(7); + } + + /** + * The target playbook to transition to. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string target_playbook = 7 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetPlaybook($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(7, $var); + + return $this; + } + /** * @return string */ diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Example.php b/DialogflowCx/src/V3/Example.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Example.php rename to DialogflowCx/src/V3/Example.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest.php b/DialogflowCx/src/V3/ExportPlaybookRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest.php rename to DialogflowCx/src/V3/ExportPlaybookRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest/DataFormat.php b/DialogflowCx/src/V3/ExportPlaybookRequest/DataFormat.php similarity index 89% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest/DataFormat.php rename to DialogflowCx/src/V3/ExportPlaybookRequest/DataFormat.php index 3581edf75805..9f7cb410ec05 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookRequest/DataFormat.php +++ b/DialogflowCx/src/V3/ExportPlaybookRequest/DataFormat.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataFormat::class, \Google\Cloud\Dialogflow\Cx\V3\ExportPlaybookRequest_DataFormat::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookResponse.php b/DialogflowCx/src/V3/ExportPlaybookResponse.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportPlaybookResponse.php rename to DialogflowCx/src/V3/ExportPlaybookResponse.php diff --git a/DialogflowCx/src/V3/Flow.php b/DialogflowCx/src/V3/Flow.php index cf97dba80ab6..f2e0f44fc815 100644 --- a/DialogflowCx/src/V3/Flow.php +++ b/DialogflowCx/src/V3/Flow.php @@ -115,6 +115,18 @@ class Flow extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; */ protected $knowledge_connector_settings = null; + /** + * Optional. Defined structured input parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $input_parameter_definitions; + /** + * Optional. Defined structured output parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $output_parameter_definitions; /** * Optional. Multi-lingual agent settings for this flow. * @@ -188,6 +200,10 @@ class Flow extends \Google\Protobuf\Internal\Message * lower level overrides the settings exposed at the higher level. * @type \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings $knowledge_connector_settings * Optional. Knowledge connector configuration. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $input_parameter_definitions + * Optional. Defined structured input parameters for this flow. + * @type array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $output_parameter_definitions + * Optional. Defined structured output parameters for this flow. * @type \Google\Cloud\Dialogflow\Cx\V3\Flow\MultiLanguageSettings $multi_language_settings * Optional. Multi-lingual agent settings for this flow. * @type bool $locked @@ -534,6 +550,58 @@ public function setKnowledgeConnectorSettings($var) return $this; } + /** + * Optional. Defined structured input parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputParameterDefinitions() + { + return $this->input_parameter_definitions; + } + + /** + * Optional. Defined structured input parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputParameterDefinitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::class); + $this->input_parameter_definitions = $arr; + + return $this; + } + + /** + * Optional. Defined structured output parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOutputParameterDefinitions() + { + return $this->output_parameter_definitions; + } + + /** + * Optional. Defined structured output parameters for this flow. + * + * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOutputParameterDefinitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::class); + $this->output_parameter_definitions = $arr; + + return $this; + } + /** * Optional. Multi-lingual agent settings for this flow. * diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowInvocation.php b/DialogflowCx/src/V3/FlowInvocation.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowInvocation.php rename to DialogflowCx/src/V3/FlowInvocation.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowTransition.php b/DialogflowCx/src/V3/FlowTransition.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowTransition.php rename to DialogflowCx/src/V3/FlowTransition.php diff --git a/DialogflowCx/src/V3/GenerativeSettings.php b/DialogflowCx/src/V3/GenerativeSettings.php index bfb64503e0b8..6d92099d4244 100644 --- a/DialogflowCx/src/V3/GenerativeSettings.php +++ b/DialogflowCx/src/V3/GenerativeSettings.php @@ -46,6 +46,12 @@ class GenerativeSettings extends \Google\Protobuf\Internal\Message * Generated from protobuf field string language_code = 4; */ protected $language_code = ''; + /** + * LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + protected $llm_model_settings = null; /** * Constructor. @@ -64,6 +70,8 @@ class GenerativeSettings extends \Google\Protobuf\Internal\Message * Settings for knowledge connector. * @type string $language_code * Language for this settings. + * @type \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $llm_model_settings + * LLM model settings. * } */ public function __construct($data = NULL) { @@ -233,5 +241,41 @@ public function setLanguageCode($var) return $this; } + /** + * LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + * @return \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings|null + */ + public function getLlmModelSettings() + { + return $this->llm_model_settings; + } + + public function hasLlmModelSettings() + { + return isset($this->llm_model_settings); + } + + public function clearLlmModelSettings() + { + unset($this->llm_model_settings); + } + + /** + * LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + * @param \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $var + * @return $this + */ + public function setLlmModelSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings::class); + $this->llm_model_settings = $var; + + return $this; + } + } diff --git a/DialogflowCx/src/V3/Generator.php b/DialogflowCx/src/V3/Generator.php index 7068ad70c839..4dbfcbb0f94e 100644 --- a/DialogflowCx/src/V3/Generator.php +++ b/DialogflowCx/src/V3/Generator.php @@ -50,6 +50,12 @@ class Generator extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $placeholders; + /** + * The LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + protected $llm_model_settings = null; /** * Parameters passed to the LLM to configure its behavior. * @@ -79,6 +85,8 @@ class Generator extends \Google\Protobuf\Internal\Message * Required. Prompt for the LLM model. * @type array<\Google\Cloud\Dialogflow\Cx\V3\Generator\Placeholder>|\Google\Protobuf\Internal\RepeatedField $placeholders * Optional. List of custom placeholders in the prompt text. + * @type \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $llm_model_settings + * The LLM model settings. * @type \Google\Cloud\Dialogflow\Cx\V3\Generator\ModelParameter $model_parameter * Parameters passed to the LLM to configure its behavior. * } @@ -218,6 +226,42 @@ public function setPlaceholders($var) return $this; } + /** + * The LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + * @return \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings|null + */ + public function getLlmModelSettings() + { + return $this->llm_model_settings; + } + + public function hasLlmModelSettings() + { + return isset($this->llm_model_settings); + } + + public function clearLlmModelSettings() + { + unset($this->llm_model_settings); + } + + /** + * The LLM model settings. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + * @param \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $var + * @return $this + */ + public function setLlmModelSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings::class); + $this->llm_model_settings = $var; + + return $this; + } + /** * Parameters passed to the LLM to configure its behavior. * diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExampleRequest.php b/DialogflowCx/src/V3/GetExampleRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExampleRequest.php rename to DialogflowCx/src/V3/GetExampleRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookRequest.php b/DialogflowCx/src/V3/GetPlaybookRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookRequest.php rename to DialogflowCx/src/V3/GetPlaybookRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookVersionRequest.php b/DialogflowCx/src/V3/GetPlaybookVersionRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPlaybookVersionRequest.php rename to DialogflowCx/src/V3/GetPlaybookVersionRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolRequest.php b/DialogflowCx/src/V3/GetToolRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolRequest.php rename to DialogflowCx/src/V3/GetToolRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolVersionRequest.php b/DialogflowCx/src/V3/GetToolVersionRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetToolVersionRequest.php rename to DialogflowCx/src/V3/GetToolVersionRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler.php b/DialogflowCx/src/V3/Handler.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler.php rename to DialogflowCx/src/V3/Handler.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/EventHandler.php b/DialogflowCx/src/V3/Handler/EventHandler.php similarity index 96% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/EventHandler.php rename to DialogflowCx/src/V3/Handler/EventHandler.php index a4ff5fae9a4e..00145eec21e9 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/EventHandler.php +++ b/DialogflowCx/src/V3/Handler/EventHandler.php @@ -144,6 +144,4 @@ public function setFulfillment($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventHandler::class, \Google\Cloud\Dialogflow\Cx\V3\Handler_EventHandler::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/LifecycleHandler.php b/DialogflowCx/src/V3/Handler/LifecycleHandler.php similarity index 96% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/LifecycleHandler.php rename to DialogflowCx/src/V3/Handler/LifecycleHandler.php index 464e97b7a89c..5472b599794c 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Handler/LifecycleHandler.php +++ b/DialogflowCx/src/V3/Handler/LifecycleHandler.php @@ -161,6 +161,4 @@ public function setFulfillment($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LifecycleHandler::class, \Google\Cloud\Dialogflow\Cx\V3\Handler_LifecycleHandler::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookRequest.php b/DialogflowCx/src/V3/ImportPlaybookRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookRequest.php rename to DialogflowCx/src/V3/ImportPlaybookRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse.php b/DialogflowCx/src/V3/ImportPlaybookResponse.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse.php rename to DialogflowCx/src/V3/ImportPlaybookResponse.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse/ConflictingResources.php b/DialogflowCx/src/V3/ImportPlaybookResponse/ConflictingResources.php similarity index 95% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse/ConflictingResources.php rename to DialogflowCx/src/V3/ImportPlaybookResponse/ConflictingResources.php index 1db61ac62412..788e58593217 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportPlaybookResponse/ConflictingResources.php +++ b/DialogflowCx/src/V3/ImportPlaybookResponse/ConflictingResources.php @@ -135,6 +135,4 @@ public function setToolDisplayNames($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConflictingResources::class, \Google\Cloud\Dialogflow\Cx\V3\ImportPlaybookResponse_ConflictingResources::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSchema.php b/DialogflowCx/src/V3/InlineSchema.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSchema.php rename to DialogflowCx/src/V3/InlineSchema.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesRequest.php b/DialogflowCx/src/V3/ListExamplesRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesRequest.php rename to DialogflowCx/src/V3/ListExamplesRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesResponse.php b/DialogflowCx/src/V3/ListExamplesResponse.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExamplesResponse.php rename to DialogflowCx/src/V3/ListExamplesResponse.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsRequest.php b/DialogflowCx/src/V3/ListPlaybookVersionsRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsRequest.php rename to DialogflowCx/src/V3/ListPlaybookVersionsRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsResponse.php b/DialogflowCx/src/V3/ListPlaybookVersionsResponse.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybookVersionsResponse.php rename to DialogflowCx/src/V3/ListPlaybookVersionsResponse.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksRequest.php b/DialogflowCx/src/V3/ListPlaybooksRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksRequest.php rename to DialogflowCx/src/V3/ListPlaybooksRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksResponse.php b/DialogflowCx/src/V3/ListPlaybooksResponse.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPlaybooksResponse.php rename to DialogflowCx/src/V3/ListPlaybooksResponse.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsRequest.php b/DialogflowCx/src/V3/ListToolVersionsRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsRequest.php rename to DialogflowCx/src/V3/ListToolVersionsRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsResponse.php b/DialogflowCx/src/V3/ListToolVersionsResponse.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolVersionsResponse.php rename to DialogflowCx/src/V3/ListToolVersionsResponse.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsRequest.php b/DialogflowCx/src/V3/ListToolsRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsRequest.php rename to DialogflowCx/src/V3/ListToolsRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsResponse.php b/DialogflowCx/src/V3/ListToolsResponse.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListToolsResponse.php rename to DialogflowCx/src/V3/ListToolsResponse.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LlmModelSettings.php b/DialogflowCx/src/V3/LlmModelSettings.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LlmModelSettings.php rename to DialogflowCx/src/V3/LlmModelSettings.php diff --git a/DialogflowCx/src/V3/OutputAudioEncoding.php b/DialogflowCx/src/V3/OutputAudioEncoding.php index c12c52eb1ef7..996795c8626d 100644 --- a/DialogflowCx/src/V3/OutputAudioEncoding.php +++ b/DialogflowCx/src/V3/OutputAudioEncoding.php @@ -22,6 +22,7 @@ class OutputAudioEncoding /** * Uncompressed 16-bit signed little-endian samples (Linear PCM). * Audio content returned as LINEAR16 also contains a WAV header. + * LINT: LEGACY_NAMES * * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; */ @@ -34,6 +35,7 @@ class OutputAudioEncoding const OUTPUT_AUDIO_ENCODING_MP3 = 2; /** * MP3 audio at 64kbps. + * LINT: LEGACY_NAMES * * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; */ diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputState.php b/DialogflowCx/src/V3/OutputState.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputState.php rename to DialogflowCx/src/V3/OutputState.php diff --git a/DialogflowCx/src/V3/PBMatch/MatchType.php b/DialogflowCx/src/V3/PBMatch/MatchType.php index 57b29485c28e..50c3dcec3419 100644 --- a/DialogflowCx/src/V3/PBMatch/MatchType.php +++ b/DialogflowCx/src/V3/PBMatch/MatchType.php @@ -62,7 +62,8 @@ class MatchType */ const KNOWLEDGE_CONNECTOR = 8; /** - * The query was handled by a [`Playbook`][Playbook]. + * The query was handled by a + * [`Playbook`][google.cloud.dialogflow.cx.v3.Playbook]. * * Generated from protobuf enum PLAYBOOK = 9; */ diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php b/DialogflowCx/src/V3/ParameterDefinition.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition.php rename to DialogflowCx/src/V3/ParameterDefinition.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition/ParameterType.php b/DialogflowCx/src/V3/ParameterDefinition/ParameterType.php similarity index 93% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition/ParameterType.php rename to DialogflowCx/src/V3/ParameterDefinition/ParameterType.php index 74b61b956f03..0df601d5ca15 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ParameterDefinition/ParameterType.php +++ b/DialogflowCx/src/V3/ParameterDefinition/ParameterType.php @@ -93,6 +93,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ParameterType::class, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition_ParameterType::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook.php b/DialogflowCx/src/V3/Playbook.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook.php rename to DialogflowCx/src/V3/Playbook.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Instruction.php b/DialogflowCx/src/V3/Playbook/Instruction.php similarity index 95% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Instruction.php rename to DialogflowCx/src/V3/Playbook/Instruction.php index f643a6ec1f67..ae44c9ae360a 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Instruction.php +++ b/DialogflowCx/src/V3/Playbook/Instruction.php @@ -111,6 +111,4 @@ public function setSteps($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Instruction::class, \Google\Cloud\Dialogflow\Cx\V3\Playbook_Instruction::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/PlaybookType.php b/DialogflowCx/src/V3/Playbook/PlaybookType.php similarity index 89% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/PlaybookType.php rename to DialogflowCx/src/V3/Playbook/PlaybookType.php index 9e840b77293c..15f33de9c458 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/PlaybookType.php +++ b/DialogflowCx/src/V3/Playbook/PlaybookType.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PlaybookType::class, \Google\Cloud\Dialogflow\Cx\V3\Playbook_PlaybookType::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Step.php b/DialogflowCx/src/V3/Playbook/Step.php similarity index 94% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Step.php rename to DialogflowCx/src/V3/Playbook/Step.php index 38fbeebb8a3c..4d82d5d9ddc9 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Playbook/Step.php +++ b/DialogflowCx/src/V3/Playbook/Step.php @@ -107,6 +107,4 @@ public function getInstruction() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Step::class, \Google\Cloud\Dialogflow\Cx\V3\Playbook_Step::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookImportStrategy.php b/DialogflowCx/src/V3/PlaybookImportStrategy.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookImportStrategy.php rename to DialogflowCx/src/V3/PlaybookImportStrategy.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInput.php b/DialogflowCx/src/V3/PlaybookInput.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInput.php rename to DialogflowCx/src/V3/PlaybookInput.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInvocation.php b/DialogflowCx/src/V3/PlaybookInvocation.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookInvocation.php rename to DialogflowCx/src/V3/PlaybookInvocation.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookOutput.php b/DialogflowCx/src/V3/PlaybookOutput.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookOutput.php rename to DialogflowCx/src/V3/PlaybookOutput.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookTransition.php b/DialogflowCx/src/V3/PlaybookTransition.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookTransition.php rename to DialogflowCx/src/V3/PlaybookTransition.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookVersion.php b/DialogflowCx/src/V3/PlaybookVersion.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PlaybookVersion.php rename to DialogflowCx/src/V3/PlaybookVersion.php diff --git a/DialogflowCx/src/V3/QueryInput.php b/DialogflowCx/src/V3/QueryInput.php index 6863f4af9a54..3e09b697faa5 100644 --- a/DialogflowCx/src/V3/QueryInput.php +++ b/DialogflowCx/src/V3/QueryInput.php @@ -48,6 +48,8 @@ class QueryInput extends \Google\Protobuf\Internal\Message * The event to be triggered. * @type \Google\Cloud\Dialogflow\Cx\V3\DtmfInput $dtmf * The DTMF event to be handled. + * @type \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult $tool_call_result + * The results of a tool executed by the client. * @type string $language_code * Required. The language of the input. See [Language * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) @@ -215,6 +217,37 @@ public function setDtmf($var) return $this; } + /** + * The results of a tool executed by the client. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + * @return \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult|null + */ + public function getToolCallResult() + { + return $this->readOneof(11); + } + + public function hasToolCallResult() + { + return $this->hasOneof(11); + } + + /** + * The results of a tool executed by the client. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + * @param \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult $var + * @return $this + */ + public function setToolCallResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult::class); + $this->writeOneof(11, $var); + + return $this; + } + /** * Required. The language of the input. See [Language * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) diff --git a/DialogflowCx/src/V3/QueryParameters.php b/DialogflowCx/src/V3/QueryParameters.php index 96d3113703c4..1bbcaa1d5f73 100644 --- a/DialogflowCx/src/V3/QueryParameters.php +++ b/DialogflowCx/src/V3/QueryParameters.php @@ -78,6 +78,16 @@ class QueryParameters extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Struct parameters = 5; */ protected $parameters = null; + /** + * Scope for the parameters. If not specified, parameters will be treated as + * session parameters. Parameters with custom scope will not be put into + * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * You can reference the parameters with custom scope in the agent with the + * following format: $parameter-scope.params.parameter-id. + * + * Generated from protobuf field string parameter_scope = 12; + */ + protected $parameter_scope = ''; /** * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to * override the [current page][QueryResult.current_page] in the session. @@ -133,6 +143,23 @@ class QueryParameters extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated string flow_versions = 14 [(.google.api.resource_reference) = { */ private $flow_versions; + /** + * Optional. The unique identifier of the + * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the + * session with. If `current_playbook` is specified, the previous state of the + * session will be ignored by Dialogflow. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $current_playbook = ''; + /** + * Optional. Use the specified LLM model settings for processing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $llm_model_settings = null; /** * The channel which this query is for. * If specified, only the @@ -243,6 +270,12 @@ class QueryParameters extends \Google\Protobuf\Internal\Message * * MapValue value: If parameter's entity type is a composite entity then use * map from composite entity property names to property values, otherwise, * use parameter value. + * @type string $parameter_scope + * Scope for the parameters. If not specified, parameters will be treated as + * session parameters. Parameters with custom scope will not be put into + * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * You can reference the parameters with custom scope in the agent with the + * following format: $parameter-scope.params.parameter-id. * @type string $current_page * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to * override the [current page][QueryResult.current_page] in the session. @@ -278,6 +311,15 @@ class QueryParameters extends \Google\Protobuf\Internal\Message * flow X will go through version 1 regardless of the version configuration in * the environment. Each flow can have at most one version specified in this * list. + * @type string $current_playbook + * Optional. The unique identifier of the + * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the + * session with. If `current_playbook` is specified, the previous state of the + * session will be ignored by Dialogflow. + * Format: + * `projects//locations//agents//playbooks/`. + * @type \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $llm_model_settings + * Optional. Use the specified LLM model settings for processing the request. * @type string $channel * The channel which this query is for. * If specified, only the @@ -550,6 +592,40 @@ public function setParameters($var) return $this; } + /** + * Scope for the parameters. If not specified, parameters will be treated as + * session parameters. Parameters with custom scope will not be put into + * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * You can reference the parameters with custom scope in the agent with the + * following format: $parameter-scope.params.parameter-id. + * + * Generated from protobuf field string parameter_scope = 12; + * @return string + */ + public function getParameterScope() + { + return $this->parameter_scope; + } + + /** + * Scope for the parameters. If not specified, parameters will be treated as + * session parameters. Parameters with custom scope will not be put into + * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + * You can reference the parameters with custom scope in the agent with the + * following format: $parameter-scope.params.parameter-id. + * + * Generated from protobuf field string parameter_scope = 12; + * @param string $var + * @return $this + */ + public function setParameterScope($var) + { + GPBUtil::checkString($var, True); + $this->parameter_scope = $var; + + return $this; + } + /** * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to * override the [current page][QueryResult.current_page] in the session. @@ -730,6 +806,78 @@ public function setFlowVersions($var) return $this; } + /** + * Optional. The unique identifier of the + * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the + * session with. If `current_playbook` is specified, the previous state of the + * session will be ignored by Dialogflow. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getCurrentPlaybook() + { + return $this->current_playbook; + } + + /** + * Optional. The unique identifier of the + * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the + * session with. If `current_playbook` is specified, the previous state of the + * session will be ignored by Dialogflow. + * Format: + * `projects//locations//agents//playbooks/`. + * + * Generated from protobuf field string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCurrentPlaybook($var) + { + GPBUtil::checkString($var, True); + $this->current_playbook = $var; + + return $this; + } + + /** + * Optional. Use the specified LLM model settings for processing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings|null + */ + public function getLlmModelSettings() + { + return $this->llm_model_settings; + } + + public function hasLlmModelSettings() + { + return isset($this->llm_model_settings); + } + + public function clearLlmModelSettings() + { + unset($this->llm_model_settings); + } + + /** + * Optional. Use the specified LLM model settings for processing the request. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $var + * @return $this + */ + public function setLlmModelSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings::class); + $this->llm_model_settings = $var; + + return $this; + } + /** * The channel which this query is for. * If specified, only the diff --git a/DialogflowCx/src/V3/QueryResult.php b/DialogflowCx/src/V3/QueryResult.php index 0f7e300577b3..128462621172 100644 --- a/DialogflowCx/src/V3/QueryResult.php +++ b/DialogflowCx/src/V3/QueryResult.php @@ -50,30 +50,6 @@ class QueryResult extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ private $response_messages; - /** - * The list of webhook ids in the order of call sequence. - * - * Generated from protobuf field repeated string webhook_ids = 25; - */ - private $webhook_ids; - /** - * The list of webhook display names in the order of call sequence. - * - * Generated from protobuf field repeated string webhook_display_names = 26; - */ - private $webhook_display_names; - /** - * The list of webhook latencies in the order of call sequence. - * - * Generated from protobuf field repeated .google.protobuf.Duration webhook_latencies = 27; - */ - private $webhook_latencies; - /** - * The list of webhook tags in the order of call sequence. - * - * Generated from protobuf field repeated string webhook_tags = 29; - */ - private $webhook_tags; /** * The list of webhook call status in the order of call sequence. * @@ -240,14 +216,6 @@ class QueryResult extends \Google\Protobuf\Internal\Message * The list of rich messages returned to the client. Responses vary from * simple text messages to more sophisticated, structured payloads used * to drive complex logic. - * @type array|\Google\Protobuf\Internal\RepeatedField $webhook_ids - * The list of webhook ids in the order of call sequence. - * @type array|\Google\Protobuf\Internal\RepeatedField $webhook_display_names - * The list of webhook display names in the order of call sequence. - * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $webhook_latencies - * The list of webhook latencies in the order of call sequence. - * @type array|\Google\Protobuf\Internal\RepeatedField $webhook_tags - * The list of webhook tags in the order of call sequence. * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $webhook_statuses * The list of webhook call status in the order of call sequence. * @type array<\Google\Protobuf\Struct>|\Google\Protobuf\Internal\RepeatedField $webhook_payloads @@ -615,110 +583,6 @@ public function setResponseMessages($var) return $this; } - /** - * The list of webhook ids in the order of call sequence. - * - * Generated from protobuf field repeated string webhook_ids = 25; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebhookIds() - { - return $this->webhook_ids; - } - - /** - * The list of webhook ids in the order of call sequence. - * - * Generated from protobuf field repeated string webhook_ids = 25; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebhookIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->webhook_ids = $arr; - - return $this; - } - - /** - * The list of webhook display names in the order of call sequence. - * - * Generated from protobuf field repeated string webhook_display_names = 26; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebhookDisplayNames() - { - return $this->webhook_display_names; - } - - /** - * The list of webhook display names in the order of call sequence. - * - * Generated from protobuf field repeated string webhook_display_names = 26; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebhookDisplayNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->webhook_display_names = $arr; - - return $this; - } - - /** - * The list of webhook latencies in the order of call sequence. - * - * Generated from protobuf field repeated .google.protobuf.Duration webhook_latencies = 27; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebhookLatencies() - { - return $this->webhook_latencies; - } - - /** - * The list of webhook latencies in the order of call sequence. - * - * Generated from protobuf field repeated .google.protobuf.Duration webhook_latencies = 27; - * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebhookLatencies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->webhook_latencies = $arr; - - return $this; - } - - /** - * The list of webhook tags in the order of call sequence. - * - * Generated from protobuf field repeated string webhook_tags = 29; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebhookTags() - { - return $this->webhook_tags; - } - - /** - * The list of webhook tags in the order of call sequence. - * - * Generated from protobuf field repeated string webhook_tags = 29; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebhookTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->webhook_tags = $arr; - - return $this; - } - /** * The list of webhook call status in the order of call sequence. * diff --git a/DialogflowCx/src/V3/ResponseMessage.php b/DialogflowCx/src/V3/ResponseMessage.php index d580b0250e4d..927621442c9b 100644 --- a/DialogflowCx/src/V3/ResponseMessage.php +++ b/DialogflowCx/src/V3/ResponseMessage.php @@ -86,6 +86,9 @@ class ResponseMessage extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\KnowledgeInfoCard $knowledge_info_card * Represents info card for knowledge answers, to be better rendered in * Dialogflow Messenger. + * @type \Google\Cloud\Dialogflow\Cx\V3\ToolCall $tool_call + * Returns the definition of a tool call that should be executed by the + * client. * @type int $response_type * Response type. * @type string $channel @@ -440,6 +443,39 @@ public function setKnowledgeInfoCard($var) return $this; } + /** + * Returns the definition of a tool call that should be executed by the + * client. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + * @return \Google\Cloud\Dialogflow\Cx\V3\ToolCall|null + */ + public function getToolCall() + { + return $this->readOneof(22); + } + + public function hasToolCall() + { + return $this->hasOneof(22); + } + + /** + * Returns the definition of a tool call that should be executed by the + * client. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + * @param \Google\Cloud\Dialogflow\Cx\V3\ToolCall $var + * @return $this + */ + public function setToolCall($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ToolCall::class); + $this->writeOneof(22, $var); + + return $this; + } + /** * Response type. * diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionRequest.php b/DialogflowCx/src/V3/RestorePlaybookVersionRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionRequest.php rename to DialogflowCx/src/V3/RestorePlaybookVersionRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionResponse.php b/DialogflowCx/src/V3/RestorePlaybookVersionResponse.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestorePlaybookVersionResponse.php rename to DialogflowCx/src/V3/RestorePlaybookVersionResponse.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionRequest.php b/DialogflowCx/src/V3/RestoreToolVersionRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionRequest.php rename to DialogflowCx/src/V3/RestoreToolVersionRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionResponse.php b/DialogflowCx/src/V3/RestoreToolVersionResponse.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreToolVersionResponse.php rename to DialogflowCx/src/V3/RestoreToolVersionResponse.php diff --git a/DialogflowCx/src/V3/SafetySettings.php b/DialogflowCx/src/V3/SafetySettings.php index 0f5f366bfe5d..b3870547e05a 100644 --- a/DialogflowCx/src/V3/SafetySettings.php +++ b/DialogflowCx/src/V3/SafetySettings.php @@ -15,12 +15,38 @@ */ class SafetySettings extends \Google\Protobuf\Internal\Message { + /** + * Optional. Default phrase match strategy for banned phrases. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_banned_phrase_match_strategy = 0; /** * Banned phrases for generated text. * * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; */ private $banned_phrases; + /** + * Optional. Settings for Responsible AI checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rai_settings = null; + /** + * Optional. Immutable. Default RAI settings to be annotated on the agent, so + * that users will be able to restore their RAI configurations to the default + * settings. Read-only field for the API proto only. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $default_rai_settings = null; + /** + * Optional. Settings for prompt security checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $prompt_security_settings = null; /** * Constructor. @@ -28,8 +54,18 @@ class SafetySettings extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * + * @type int $default_banned_phrase_match_strategy + * Optional. Default phrase match strategy for banned phrases. * @type array<\Google\Cloud\Dialogflow\Cx\V3\SafetySettings\Phrase>|\Google\Protobuf\Internal\RepeatedField $banned_phrases * Banned phrases for generated text. + * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $rai_settings + * Optional. Settings for Responsible AI checks. + * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $default_rai_settings + * Optional. Immutable. Default RAI settings to be annotated on the agent, so + * that users will be able to restore their RAI configurations to the default + * settings. Read-only field for the API proto only. + * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings $prompt_security_settings + * Optional. Settings for prompt security checks. * } */ public function __construct($data = NULL) { @@ -37,6 +73,32 @@ public function __construct($data = NULL) { parent::__construct($data); } + /** + * Optional. Default phrase match strategy for banned phrases. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDefaultBannedPhraseMatchStrategy() + { + return $this->default_banned_phrase_match_strategy; + } + + /** + * Optional. Default phrase match strategy for banned phrases. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDefaultBannedPhraseMatchStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PhraseMatchStrategy::class); + $this->default_banned_phrase_match_strategy = $var; + + return $this; + } + /** * Banned phrases for generated text. * @@ -63,5 +125,117 @@ public function setBannedPhrases($var) return $this; } + /** + * Optional. Settings for Responsible AI checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings|null + */ + public function getRaiSettings() + { + return $this->rai_settings; + } + + public function hasRaiSettings() + { + return isset($this->rai_settings); + } + + public function clearRaiSettings() + { + unset($this->rai_settings); + } + + /** + * Optional. Settings for Responsible AI checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $var + * @return $this + */ + public function setRaiSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings::class); + $this->rai_settings = $var; + + return $this; + } + + /** + * Optional. Immutable. Default RAI settings to be annotated on the agent, so + * that users will be able to restore their RAI configurations to the default + * settings. Read-only field for the API proto only. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings|null + */ + public function getDefaultRaiSettings() + { + return $this->default_rai_settings; + } + + public function hasDefaultRaiSettings() + { + return isset($this->default_rai_settings); + } + + public function clearDefaultRaiSettings() + { + unset($this->default_rai_settings); + } + + /** + * Optional. Immutable. Default RAI settings to be annotated on the agent, so + * that users will be able to restore their RAI configurations to the default + * settings. Read-only field for the API proto only. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $var + * @return $this + */ + public function setDefaultRaiSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings::class); + $this->default_rai_settings = $var; + + return $this; + } + + /** + * Optional. Settings for prompt security checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings|null + */ + public function getPromptSecuritySettings() + { + return $this->prompt_security_settings; + } + + public function hasPromptSecuritySettings() + { + return isset($this->prompt_security_settings); + } + + public function clearPromptSecuritySettings() + { + unset($this->prompt_security_settings); + } + + /** + * Optional. Settings for prompt security checks. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings $var + * @return $this + */ + public function setPromptSecuritySettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings::class); + $this->prompt_security_settings = $var; + + return $this; + } + } diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PhraseMatchStrategy.php b/DialogflowCx/src/V3/SafetySettings/PhraseMatchStrategy.php similarity index 90% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PhraseMatchStrategy.php rename to DialogflowCx/src/V3/SafetySettings/PhraseMatchStrategy.php index ed071d1aefb7..0d2be5dad709 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PhraseMatchStrategy.php +++ b/DialogflowCx/src/V3/SafetySettings/PhraseMatchStrategy.php @@ -61,6 +61,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PhraseMatchStrategy::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_PhraseMatchStrategy::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PromptSecuritySettings.php b/DialogflowCx/src/V3/SafetySettings/PromptSecuritySettings.php similarity index 90% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PromptSecuritySettings.php rename to DialogflowCx/src/V3/SafetySettings/PromptSecuritySettings.php index f4521571ecca..403eabe7212f 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/PromptSecuritySettings.php +++ b/DialogflowCx/src/V3/SafetySettings/PromptSecuritySettings.php @@ -65,6 +65,4 @@ public function setEnablePromptSecurity($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PromptSecuritySettings::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_PromptSecuritySettings::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings.php b/DialogflowCx/src/V3/SafetySettings/RaiSettings.php similarity index 93% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings.php rename to DialogflowCx/src/V3/SafetySettings/RaiSettings.php index ca7f48416892..023fe6af2045 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings.php +++ b/DialogflowCx/src/V3/SafetySettings/RaiSettings.php @@ -65,6 +65,4 @@ public function setCategoryFilters($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RaiSettings::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_RaiSettings::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/CategoryFilter.php b/DialogflowCx/src/V3/SafetySettings/RaiSettings/CategoryFilter.php similarity index 94% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/CategoryFilter.php rename to DialogflowCx/src/V3/SafetySettings/RaiSettings/CategoryFilter.php index 4ed89eb58ae3..d4444039cd68 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/CategoryFilter.php +++ b/DialogflowCx/src/V3/SafetySettings/RaiSettings/CategoryFilter.php @@ -99,6 +99,4 @@ public function setFilterLevel($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CategoryFilter::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_RaiSettings_CategoryFilter::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyCategory.php b/DialogflowCx/src/V3/SafetySettings/RaiSettings/SafetyCategory.php similarity index 91% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyCategory.php rename to DialogflowCx/src/V3/SafetySettings/RaiSettings/SafetyCategory.php index ca65f38cd1ef..7a3a23c5ec4d 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyCategory.php +++ b/DialogflowCx/src/V3/SafetySettings/RaiSettings/SafetyCategory.php @@ -73,6 +73,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SafetyCategory::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_RaiSettings_SafetyCategory::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php b/DialogflowCx/src/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php similarity index 91% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php rename to DialogflowCx/src/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php index daf098e17429..a2d5b714370a 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php +++ b/DialogflowCx/src/V3/SafetySettings/RaiSettings/SafetyFilterLevel.php @@ -73,6 +73,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SafetyFilterLevel::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_RaiSettings_SafetyFilterLevel::class); diff --git a/DialogflowCx/src/V3/SecuritySettings/AudioExportSettings.php b/DialogflowCx/src/V3/SecuritySettings/AudioExportSettings.php index a9f833bc172e..fbe4942c4d9d 100644 --- a/DialogflowCx/src/V3/SecuritySettings/AudioExportSettings.php +++ b/DialogflowCx/src/V3/SecuritySettings/AudioExportSettings.php @@ -27,6 +27,9 @@ class AudioExportSettings extends \Google\Protobuf\Internal\Message protected $gcs_bucket = ''; /** * Filename pattern for exported audio. + * {conversation} and {timestamp} are placeholders that will be replaced + * with the conversation ID and epoch micros of the conversation. + * For example, "{conversation}/recording_{timestamp}.mulaw". * * Generated from protobuf field string audio_export_pattern = 2; */ @@ -68,6 +71,9 @@ class AudioExportSettings extends \Google\Protobuf\Internal\Message * storage.buckets.setIamPolicy. * @type string $audio_export_pattern * Filename pattern for exported audio. + * {conversation} and {timestamp} are placeholders that will be replaced + * with the conversation ID and epoch micros of the conversation. + * For example, "{conversation}/recording_{timestamp}.mulaw". * @type bool $enable_audio_redaction * Enable audio redaction if it is true. * Note that this only redacts end-user audio data; @@ -121,6 +127,9 @@ public function setGcsBucket($var) /** * Filename pattern for exported audio. + * {conversation} and {timestamp} are placeholders that will be replaced + * with the conversation ID and epoch micros of the conversation. + * For example, "{conversation}/recording_{timestamp}.mulaw". * * Generated from protobuf field string audio_export_pattern = 2; * @return string @@ -132,6 +141,9 @@ public function getAudioExportPattern() /** * Filename pattern for exported audio. + * {conversation} and {timestamp} are placeholders that will be replaced + * with the conversation ID and epoch micros of the conversation. + * For example, "{conversation}/recording_{timestamp}.mulaw". * * Generated from protobuf field string audio_export_pattern = 2; * @param string $var diff --git a/DialogflowCx/src/V3/StreamingDetectIntentRequest.php b/DialogflowCx/src/V3/StreamingDetectIntentRequest.php index 019691f7ff2e..5a2b556d4590 100644 --- a/DialogflowCx/src/V3/StreamingDetectIntentRequest.php +++ b/DialogflowCx/src/V3/StreamingDetectIntentRequest.php @@ -95,6 +95,14 @@ class StreamingDetectIntentRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool enable_debugging_info = 8; */ protected $enable_debugging_info = false; + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $response_view = 0; /** * Constructor. @@ -132,6 +140,10 @@ class StreamingDetectIntentRequest extends \Google\Protobuf\Internal\Message * responses. * @type bool $enable_debugging_info * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + * @type int $response_view + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. * } */ public function __construct($data = NULL) { @@ -361,5 +373,35 @@ public function setEnableDebuggingInfo($var) return $this; } + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * Optional. Specifies which fields in the + * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponseView::class); + $this->response_view = $var; + + return $this; + } + } diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool.php b/DialogflowCx/src/V3/Tool.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool.php rename to DialogflowCx/src/V3/Tool.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication.php b/DialogflowCx/src/V3/Tool/Authentication.php similarity index 97% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication.php rename to DialogflowCx/src/V3/Tool/Authentication.php index 757c06b6751d..09ba832f4b24 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication.php +++ b/DialogflowCx/src/V3/Tool/Authentication.php @@ -211,6 +211,4 @@ public function getAuthConfig() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Authentication::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ApiKeyConfig.php b/DialogflowCx/src/V3/Tool/Authentication/ApiKeyConfig.php similarity index 97% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ApiKeyConfig.php rename to DialogflowCx/src/V3/Tool/Authentication/ApiKeyConfig.php index 16506f067080..36e5f40f4532 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ApiKeyConfig.php +++ b/DialogflowCx/src/V3/Tool/Authentication/ApiKeyConfig.php @@ -187,6 +187,4 @@ public function setRequestLocation($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ApiKeyConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_ApiKeyConfig::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/BearerTokenConfig.php b/DialogflowCx/src/V3/Tool/Authentication/BearerTokenConfig.php similarity index 96% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/BearerTokenConfig.php rename to DialogflowCx/src/V3/Tool/Authentication/BearerTokenConfig.php index 6fac6fb413a6..689288a28ee7 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/BearerTokenConfig.php +++ b/DialogflowCx/src/V3/Tool/Authentication/BearerTokenConfig.php @@ -131,6 +131,4 @@ public function setSecretVersionForToken($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BearerTokenConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_BearerTokenConfig::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig.php b/DialogflowCx/src/V3/Tool/Authentication/OAuthConfig.php similarity index 97% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig.php rename to DialogflowCx/src/V3/Tool/Authentication/OAuthConfig.php index 4fcf1617a0b1..61d759333bf5 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig.php +++ b/DialogflowCx/src/V3/Tool/Authentication/OAuthConfig.php @@ -259,6 +259,4 @@ public function setScopes($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OAuthConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_OAuthConfig::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php b/DialogflowCx/src/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php similarity index 89% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php rename to DialogflowCx/src/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php index 820fc6e6810c..425722c3ebe1 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php +++ b/DialogflowCx/src/V3/Tool/Authentication/OAuthConfig/OauthGrantType.php @@ -55,6 +55,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OauthGrantType::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_OAuthConfig_OauthGrantType::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/RequestLocation.php b/DialogflowCx/src/V3/Tool/Authentication/RequestLocation.php similarity index 89% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/RequestLocation.php rename to DialogflowCx/src/V3/Tool/Authentication/RequestLocation.php index b0e48b72ddeb..63fa297c6d61 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/RequestLocation.php +++ b/DialogflowCx/src/V3/Tool/Authentication/RequestLocation.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RequestLocation::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_RequestLocation::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAccountAuthConfig.php b/DialogflowCx/src/V3/Tool/Authentication/ServiceAccountAuthConfig.php similarity index 94% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAccountAuthConfig.php rename to DialogflowCx/src/V3/Tool/Authentication/ServiceAccountAuthConfig.php index fb2af67f8989..78dd97be7735 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAccountAuthConfig.php +++ b/DialogflowCx/src/V3/Tool/Authentication/ServiceAccountAuthConfig.php @@ -93,6 +93,4 @@ public function setServiceAccount($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceAccountAuthConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_ServiceAccountAuthConfig::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig.php b/DialogflowCx/src/V3/Tool/Authentication/ServiceAgentAuthConfig.php similarity index 93% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig.php rename to DialogflowCx/src/V3/Tool/Authentication/ServiceAgentAuthConfig.php index 07eef078163e..53eef730c08d 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig.php +++ b/DialogflowCx/src/V3/Tool/Authentication/ServiceAgentAuthConfig.php @@ -78,6 +78,4 @@ public function setServiceAgentAuth($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceAgentAuthConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_ServiceAgentAuthConfig::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php b/DialogflowCx/src/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php similarity index 91% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php rename to DialogflowCx/src/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php index 86fed1a3692b..d84accc84a36 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php +++ b/DialogflowCx/src/V3/Tool/Authentication/ServiceAgentAuthConfig/ServiceAgentAuth.php @@ -68,6 +68,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceAgentAuth::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_Authentication_ServiceAgentAuthConfig_ServiceAgentAuth::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool.php b/DialogflowCx/src/V3/Tool/DataStoreTool.php similarity index 95% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool.php rename to DialogflowCx/src/V3/Tool/DataStoreTool.php index 4c6054d6e513..145b24f9abc4 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool.php +++ b/DialogflowCx/src/V3/Tool/DataStoreTool.php @@ -110,6 +110,4 @@ public function setFallbackPrompt($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataStoreTool::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_DataStoreTool::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool/FallbackPrompt.php b/DialogflowCx/src/V3/Tool/DataStoreTool/FallbackPrompt.php similarity index 82% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool/FallbackPrompt.php rename to DialogflowCx/src/V3/Tool/DataStoreTool/FallbackPrompt.php index 54445e297eb0..e42bb7772baa 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/DataStoreTool/FallbackPrompt.php +++ b/DialogflowCx/src/V3/Tool/DataStoreTool/FallbackPrompt.php @@ -32,6 +32,4 @@ public function __construct($data = NULL) { } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FallbackPrompt::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_DataStoreTool_FallbackPrompt::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/FunctionTool.php b/DialogflowCx/src/V3/Tool/FunctionTool.php similarity index 96% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/FunctionTool.php rename to DialogflowCx/src/V3/Tool/FunctionTool.php index ce3ffcadf0f0..26ff9d8cd0b2 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/FunctionTool.php +++ b/DialogflowCx/src/V3/Tool/FunctionTool.php @@ -143,6 +143,4 @@ public function setOutputSchema($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FunctionTool::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_FunctionTool::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/OpenApiTool.php b/DialogflowCx/src/V3/Tool/OpenApiTool.php similarity index 97% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/OpenApiTool.php rename to DialogflowCx/src/V3/Tool/OpenApiTool.php index 8ba3ce3a1719..7fa103f43e17 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/OpenApiTool.php +++ b/DialogflowCx/src/V3/Tool/OpenApiTool.php @@ -206,6 +206,4 @@ public function getSchema() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OpenApiTool::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_OpenApiTool::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ServiceDirectoryConfig.php b/DialogflowCx/src/V3/Tool/ServiceDirectoryConfig.php similarity index 94% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ServiceDirectoryConfig.php rename to DialogflowCx/src/V3/Tool/ServiceDirectoryConfig.php index 172b4aebd82e..13cef5c46d80 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ServiceDirectoryConfig.php +++ b/DialogflowCx/src/V3/Tool/ServiceDirectoryConfig.php @@ -85,6 +85,4 @@ public function setService($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceDirectoryConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_ServiceDirectoryConfig::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig.php b/DialogflowCx/src/V3/Tool/TLSConfig.php similarity index 93% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig.php rename to DialogflowCx/src/V3/Tool/TLSConfig.php index 9fd02fa68b89..b051d4e00469 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig.php +++ b/DialogflowCx/src/V3/Tool/TLSConfig.php @@ -69,6 +69,4 @@ public function setCaCerts($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TLSConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_TLSConfig::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig/CACert.php b/DialogflowCx/src/V3/Tool/TLSConfig/CACert.php similarity index 97% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig/CACert.php rename to DialogflowCx/src/V3/Tool/TLSConfig/CACert.php index 13087402fb0c..5f4577b7b412 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/TLSConfig/CACert.php +++ b/DialogflowCx/src/V3/Tool/TLSConfig/CACert.php @@ -147,6 +147,4 @@ public function setCert($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CACert::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_TLSConfig_CACert::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ToolType.php b/DialogflowCx/src/V3/Tool/ToolType.php similarity index 91% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ToolType.php rename to DialogflowCx/src/V3/Tool/ToolType.php index 7974dec15d58..bc870c581911 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Tool/ToolType.php +++ b/DialogflowCx/src/V3/Tool/ToolType.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ToolType::class, \Google\Cloud\Dialogflow\Cx\V3\Tool_ToolType::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCall.php b/DialogflowCx/src/V3/ToolCall.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCall.php rename to DialogflowCx/src/V3/ToolCall.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult.php b/DialogflowCx/src/V3/ToolCallResult.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult.php rename to DialogflowCx/src/V3/ToolCallResult.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult/Error.php b/DialogflowCx/src/V3/ToolCallResult/Error.php similarity index 91% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult/Error.php rename to DialogflowCx/src/V3/ToolCallResult/Error.php index 508eb805654b..69d499303800 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolCallResult/Error.php +++ b/DialogflowCx/src/V3/ToolCallResult/Error.php @@ -65,6 +65,4 @@ public function setMessage($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Error::class, \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult_Error::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolUse.php b/DialogflowCx/src/V3/ToolUse.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolUse.php rename to DialogflowCx/src/V3/ToolUse.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolVersion.php b/DialogflowCx/src/V3/ToolVersion.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ToolVersion.php rename to DialogflowCx/src/V3/ToolVersion.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema.php b/DialogflowCx/src/V3/TypeSchema.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema.php rename to DialogflowCx/src/V3/TypeSchema.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema/SchemaReference.php b/DialogflowCx/src/V3/TypeSchema/SchemaReference.php similarity index 93% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema/SchemaReference.php rename to DialogflowCx/src/V3/TypeSchema/SchemaReference.php index 4ff7f6aac6a4..e81997d6888c 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TypeSchema/SchemaReference.php +++ b/DialogflowCx/src/V3/TypeSchema/SchemaReference.php @@ -107,6 +107,4 @@ public function setSchema($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SchemaReference::class, \Google\Cloud\Dialogflow\Cx\V3\TypeSchema_SchemaReference::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExampleRequest.php b/DialogflowCx/src/V3/UpdateExampleRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExampleRequest.php rename to DialogflowCx/src/V3/UpdateExampleRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePlaybookRequest.php b/DialogflowCx/src/V3/UpdatePlaybookRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePlaybookRequest.php rename to DialogflowCx/src/V3/UpdatePlaybookRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateToolRequest.php b/DialogflowCx/src/V3/UpdateToolRequest.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateToolRequest.php rename to DialogflowCx/src/V3/UpdateToolRequest.php diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UserUtterance.php b/DialogflowCx/src/V3/UserUtterance.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UserUtterance.php rename to DialogflowCx/src/V3/UserUtterance.php diff --git a/DialogflowCx/src/V3/Webhook/GenericWebService.php b/DialogflowCx/src/V3/Webhook/GenericWebService.php index f71d6cb331c9..05a8eed29cbd 100644 --- a/DialogflowCx/src/V3/Webhook/GenericWebService.php +++ b/DialogflowCx/src/V3/Webhook/GenericWebService.php @@ -36,12 +36,30 @@ class GenericWebService extends \Google\Protobuf\Internal\Message * @deprecated */ protected $password = ''; + /** + * Optional. The SecretManager secret version resource storing the + * username:password pair for HTTP Basic authentication. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $secret_version_for_username_password = ''; /** * The HTTP request headers to send together with webhook requests. * * Generated from protobuf field map request_headers = 4; */ private $request_headers; + /** + * Optional. The HTTP request headers to send together with webhook + * requests. Header values are stored in SecretManager secret versions. + * When the same header name is specified in both `request_headers` and + * `secret_versions_for_request_headers`, the value in + * `secret_versions_for_request_headers` will be used. + * + * Generated from protobuf field map secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $secret_versions_for_request_headers; /** * Optional. Specifies a list of allowed custom CA certificates (in DER * format) for HTTPS verification. This overrides the default SSL trust @@ -76,6 +94,12 @@ class GenericWebService extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL]; */ protected $service_agent_auth = 0; + /** + * Optional. Configuration for service account authentication. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account_auth_config = null; /** * Optional. Type of the webhook. * @@ -119,8 +143,18 @@ class GenericWebService extends \Google\Protobuf\Internal\Message * The user name for HTTP Basic authentication. * @type string $password * The password for HTTP Basic authentication. + * @type string $secret_version_for_username_password + * Optional. The SecretManager secret version resource storing the + * username:password pair for HTTP Basic authentication. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` * @type array|\Google\Protobuf\Internal\MapField $request_headers * The HTTP request headers to send together with webhook requests. + * @type array|\Google\Protobuf\Internal\MapField $secret_versions_for_request_headers + * Optional. The HTTP request headers to send together with webhook + * requests. Header values are stored in SecretManager secret versions. + * When the same header name is specified in both `request_headers` and + * `secret_versions_for_request_headers`, the value in + * `secret_versions_for_request_headers` will be used. * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_ca_certs * Optional. Specifies a list of allowed custom CA certificates (in DER * format) for HTTPS verification. This overrides the default SSL trust @@ -143,6 +177,8 @@ class GenericWebService extends \Google\Protobuf\Internal\Message * service * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). * The generated token is sent in the Authorization header. + * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig $service_account_auth_config + * Optional. Configuration for service account authentication. * @type int $webhook_type * Optional. Type of the webhook. * @type int $http_method @@ -255,6 +291,36 @@ public function setPassword($var) return $this; } + /** + * Optional. The SecretManager secret version resource storing the + * username:password pair for HTTP Basic authentication. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getSecretVersionForUsernamePassword() + { + return $this->secret_version_for_username_password; + } + + /** + * Optional. The SecretManager secret version resource storing the + * username:password pair for HTTP Basic authentication. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecretVersionForUsernamePassword($var) + { + GPBUtil::checkString($var, True); + $this->secret_version_for_username_password = $var; + + return $this; + } + /** * The HTTP request headers to send together with webhook requests. * @@ -281,6 +347,40 @@ public function setRequestHeaders($var) return $this; } + /** + * Optional. The HTTP request headers to send together with webhook + * requests. Header values are stored in SecretManager secret versions. + * When the same header name is specified in both `request_headers` and + * `secret_versions_for_request_headers`, the value in + * `secret_versions_for_request_headers` will be used. + * + * Generated from protobuf field map secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSecretVersionsForRequestHeaders() + { + return $this->secret_versions_for_request_headers; + } + + /** + * Optional. The HTTP request headers to send together with webhook + * requests. Header values are stored in SecretManager secret versions. + * When the same header name is specified in both `request_headers` and + * `secret_versions_for_request_headers`, the value in + * `secret_versions_for_request_headers` will be used. + * + * Generated from protobuf field map secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSecretVersionsForRequestHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\SecretVersionHeaderValue::class); + $this->secret_versions_for_request_headers = $arr; + + return $this; + } + /** * Optional. Specifies a list of allowed custom CA certificates (in DER * format) for HTTPS verification. This overrides the default SSL trust @@ -401,6 +501,42 @@ public function setServiceAgentAuth($var) return $this; } + /** + * Optional. Configuration for service account authentication. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig|null + */ + public function getServiceAccountAuthConfig() + { + return $this->service_account_auth_config; + } + + public function hasServiceAccountAuthConfig() + { + return isset($this->service_account_auth_config); + } + + public function clearServiceAccountAuthConfig() + { + unset($this->service_account_auth_config); + } + + /** + * Optional. Configuration for service account authentication. + * + * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig $var + * @return $this + */ + public function setServiceAccountAuthConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig::class); + $this->service_account_auth_config = $var; + + return $this; + } + /** * Optional. Type of the webhook. * diff --git a/DialogflowCx/src/V3/Webhook/GenericWebService/OAuthConfig.php b/DialogflowCx/src/V3/Webhook/GenericWebService/OAuthConfig.php index f7e825aad80d..3ab5ec93d7a7 100644 --- a/DialogflowCx/src/V3/Webhook/GenericWebService/OAuthConfig.php +++ b/DialogflowCx/src/V3/Webhook/GenericWebService/OAuthConfig.php @@ -28,6 +28,15 @@ class OAuthConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; */ protected $client_secret = ''; + /** + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $secret_version_for_client_secret = ''; /** * Required. The token endpoint provided by the 3rd party platform to * exchange an access token. @@ -52,6 +61,11 @@ class OAuthConfig extends \Google\Protobuf\Internal\Message * Required. The client ID provided by the 3rd party platform. * @type string $client_secret * Optional. The client secret provided by the 3rd party platform. + * @type string $secret_version_for_client_secret + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` * @type string $token_endpoint * Required. The token endpoint provided by the 3rd party platform to * exchange an access token. @@ -116,6 +130,38 @@ public function setClientSecret($var) return $this; } + /** + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getSecretVersionForClientSecret() + { + return $this->secret_version_for_client_secret; + } + + /** + * Optional. The name of the SecretManager secret version resource storing + * the client secret. If this field is set, the `client_secret` field will + * be ignored. Format: + * `projects/{project}/secrets/{secret}/versions/{version}` + * + * Generated from protobuf field string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecretVersionForClientSecret($var) + { + GPBUtil::checkString($var, True); + $this->secret_version_for_client_secret = $var; + + return $this; + } + /** * Required. The token endpoint provided by the 3rd party platform to * exchange an access token. diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php b/DialogflowCx/src/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php similarity index 91% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php rename to DialogflowCx/src/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php index 992da3b33e3b..6ae5c3b091a1 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php +++ b/DialogflowCx/src/V3/Webhook/GenericWebService/SecretVersionHeaderValue.php @@ -70,6 +70,4 @@ public function setSecretVersion($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecretVersionHeaderValue::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_SecretVersionHeaderValue::class); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php b/DialogflowCx/src/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php similarity index 94% rename from owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php rename to DialogflowCx/src/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php index 8e98c66d61ce..318bc9d0ab0f 100644 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php +++ b/DialogflowCx/src/V3/Webhook/GenericWebService/ServiceAccountAuthConfig.php @@ -93,6 +93,4 @@ public function setServiceAccount($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceAccountAuthConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_ServiceAccountAuthConfig::class); diff --git a/DialogflowCx/src/V3/gapic_metadata.json b/DialogflowCx/src/V3/gapic_metadata.json index cc8b0dd9326f..dcab1052a7c5 100644 --- a/DialogflowCx/src/V3/gapic_metadata.json +++ b/DialogflowCx/src/V3/gapic_metadata.json @@ -682,6 +682,50 @@ } } }, + "Examples": { + "clients": { + "grpc": { + "libraryClient": "ExamplesGapicClient", + "rpcs": { + "CreateExample": { + "methods": [ + "createExample" + ] + }, + "DeleteExample": { + "methods": [ + "deleteExample" + ] + }, + "GetExample": { + "methods": [ + "getExample" + ] + }, + "ListExamples": { + "methods": [ + "listExamples" + ] + }, + "UpdateExample": { + "methods": [ + "updateExample" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, "Experiments": { "clients": { "grpc": { @@ -780,6 +824,85 @@ } } }, + "Playbooks": { + "clients": { + "grpc": { + "libraryClient": "PlaybooksGapicClient", + "rpcs": { + "CreatePlaybook": { + "methods": [ + "createPlaybook" + ] + }, + "CreatePlaybookVersion": { + "methods": [ + "createPlaybookVersion" + ] + }, + "DeletePlaybook": { + "methods": [ + "deletePlaybook" + ] + }, + "DeletePlaybookVersion": { + "methods": [ + "deletePlaybookVersion" + ] + }, + "ExportPlaybook": { + "methods": [ + "exportPlaybook" + ] + }, + "GetPlaybook": { + "methods": [ + "getPlaybook" + ] + }, + "GetPlaybookVersion": { + "methods": [ + "getPlaybookVersion" + ] + }, + "ImportPlaybook": { + "methods": [ + "importPlaybook" + ] + }, + "ListPlaybookVersions": { + "methods": [ + "listPlaybookVersions" + ] + }, + "ListPlaybooks": { + "methods": [ + "listPlaybooks" + ] + }, + "RestorePlaybookVersion": { + "methods": [ + "restorePlaybookVersion" + ] + }, + "UpdatePlaybook": { + "methods": [ + "updatePlaybook" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, "SecuritySettingsService": { "clients": { "grpc": { @@ -824,6 +947,75 @@ } } }, + "Tools": { + "clients": { + "grpc": { + "libraryClient": "ToolsGapicClient", + "rpcs": { + "CreateTool": { + "methods": [ + "createTool" + ] + }, + "CreateToolVersion": { + "methods": [ + "createToolVersion" + ] + }, + "DeleteTool": { + "methods": [ + "deleteTool" + ] + }, + "DeleteToolVersion": { + "methods": [ + "deleteToolVersion" + ] + }, + "GetTool": { + "methods": [ + "getTool" + ] + }, + "GetToolVersion": { + "methods": [ + "getToolVersion" + ] + }, + "ListToolVersions": { + "methods": [ + "listToolVersions" + ] + }, + "ListTools": { + "methods": [ + "listTools" + ] + }, + "RestoreToolVersion": { + "methods": [ + "restoreToolVersion" + ] + }, + "UpdateTool": { + "methods": [ + "updateTool" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, "Versions": { "clients": { "grpc": { diff --git a/DialogflowCx/src/V3/resources/agents_descriptor_config.php b/DialogflowCx/src/V3/resources/agents_descriptor_config.php index 416b02eee63b..3e25043037b2 100644 --- a/DialogflowCx/src/V3/resources/agents_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/agents_descriptor_config.php @@ -220,6 +220,7 @@ 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', 'location' => 'projects/{project}/locations/{location}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', 'securitySettings' => 'projects/{project}/locations/{location}/securitySettings/{security_settings}', ], diff --git a/DialogflowCx/src/V3/resources/environments_descriptor_config.php b/DialogflowCx/src/V3/resources/environments_descriptor_config.php index 32c276badbdc..45165e73da6a 100644 --- a/DialogflowCx/src/V3/resources/environments_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/environments_descriptor_config.php @@ -221,6 +221,7 @@ 'templateMap' => [ 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', 'testCase' => 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}', 'version' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}', diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_client_config.json b/DialogflowCx/src/V3/resources/examples_client_config.json similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_client_config.json rename to DialogflowCx/src/V3/resources/examples_client_config.json diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_descriptor_config.php b/DialogflowCx/src/V3/resources/examples_descriptor_config.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_descriptor_config.php rename to DialogflowCx/src/V3/resources/examples_descriptor_config.php diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_rest_client_config.php b/DialogflowCx/src/V3/resources/examples_rest_client_config.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/src/V3/resources/examples_rest_client_config.php rename to DialogflowCx/src/V3/resources/examples_rest_client_config.php diff --git a/DialogflowCx/src/V3/resources/flows_descriptor_config.php b/DialogflowCx/src/V3/resources/flows_descriptor_config.php index 49e6a2600d0a..32284f82dbe7 100644 --- a/DialogflowCx/src/V3/resources/flows_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/flows_descriptor_config.php @@ -214,8 +214,10 @@ 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', ], diff --git a/DialogflowCx/src/V3/resources/pages_descriptor_config.php b/DialogflowCx/src/V3/resources/pages_descriptor_config.php index a23ca148dc19..f92092c34e32 100644 --- a/DialogflowCx/src/V3/resources/pages_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/pages_descriptor_config.php @@ -132,8 +132,10 @@ 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', ], diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_client_config.json b/DialogflowCx/src/V3/resources/playbooks_client_config.json similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_client_config.json rename to DialogflowCx/src/V3/resources/playbooks_client_config.json diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_descriptor_config.php b/DialogflowCx/src/V3/resources/playbooks_descriptor_config.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_descriptor_config.php rename to DialogflowCx/src/V3/resources/playbooks_descriptor_config.php diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_rest_client_config.php b/DialogflowCx/src/V3/resources/playbooks_rest_client_config.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/src/V3/resources/playbooks_rest_client_config.php rename to DialogflowCx/src/V3/resources/playbooks_rest_client_config.php diff --git a/DialogflowCx/src/V3/resources/sessions_descriptor_config.php b/DialogflowCx/src/V3/resources/sessions_descriptor_config.php index 4908acbc03d5..9db999493258 100644 --- a/DialogflowCx/src/V3/resources/sessions_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/sessions_descriptor_config.php @@ -134,6 +134,7 @@ 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', 'projectLocationAgentEnvironmentSession' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}', 'projectLocationAgentEnvironmentSessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}', 'projectLocationAgentSession' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}', @@ -142,6 +143,7 @@ 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', 'session' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}', 'sessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', 'version' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}', ], ], diff --git a/DialogflowCx/src/V3/resources/test_cases_descriptor_config.php b/DialogflowCx/src/V3/resources/test_cases_descriptor_config.php index 5cd58387f0fe..796db661b9e7 100644 --- a/DialogflowCx/src/V3/resources/test_cases_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/test_cases_descriptor_config.php @@ -254,10 +254,12 @@ 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', + 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', 'testCase' => 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}', 'testCaseResult' => 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', ], diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_client_config.json b/DialogflowCx/src/V3/resources/tools_client_config.json similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_client_config.json rename to DialogflowCx/src/V3/resources/tools_client_config.json diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_descriptor_config.php b/DialogflowCx/src/V3/resources/tools_descriptor_config.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_descriptor_config.php rename to DialogflowCx/src/V3/resources/tools_descriptor_config.php diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_rest_client_config.php b/DialogflowCx/src/V3/resources/tools_rest_client_config.php similarity index 100% rename from owl-bot-staging/DialogflowCx/v3/src/V3/resources/tools_rest_client_config.php rename to DialogflowCx/src/V3/resources/tools_rest_client_config.php diff --git a/DialogflowCx/src/V3/resources/transition_route_groups_descriptor_config.php b/DialogflowCx/src/V3/resources/transition_route_groups_descriptor_config.php index 461005434f5d..21a6ad39a39a 100644 --- a/DialogflowCx/src/V3/resources/transition_route_groups_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/transition_route_groups_descriptor_config.php @@ -134,6 +134,7 @@ 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', + 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', ], diff --git a/DialogflowCx/src/V3/resources/webhooks_descriptor_config.php b/DialogflowCx/src/V3/resources/webhooks_descriptor_config.php index ef3fcadb9034..13e787cc1b99 100644 --- a/DialogflowCx/src/V3/resources/webhooks_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/webhooks_descriptor_config.php @@ -128,6 +128,7 @@ ], 'templateMap' => [ 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', ], diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExamplesClientTest.php b/DialogflowCx/tests/Unit/V3/Client/ExamplesClientTest.php similarity index 88% rename from owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExamplesClientTest.php rename to DialogflowCx/tests/Unit/V3/Client/ExamplesClientTest.php index bdd0ea772087..d3e65afd4f81 100644 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExamplesClientTest.php +++ b/DialogflowCx/tests/Unit/V3/Client/ExamplesClientTest.php @@ -59,7 +59,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return ExamplesClient */ @@ -101,9 +103,7 @@ public function createExampleTest() $example->setDisplayName($exampleDisplayName); $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; $example->setConversationState($exampleConversationState); - $request = (new CreateExampleRequest()) - ->setParent($formattedParent) - ->setExample($example); + $request = (new CreateExampleRequest())->setParent($formattedParent)->setExample($example); $response = $gapicClient->createExample($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -129,12 +129,15 @@ public function createExampleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); @@ -145,9 +148,7 @@ public function createExampleExceptionTest() $example->setDisplayName($exampleDisplayName); $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; $example->setConversationState($exampleConversationState); - $request = (new CreateExampleRequest()) - ->setParent($formattedParent) - ->setExample($example); + $request = (new CreateExampleRequest())->setParent($formattedParent)->setExample($example); try { $gapicClient->createExample($request); // If the $gapicClient method call did not throw, fail the test @@ -174,8 +175,7 @@ public function deleteExampleTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->exampleName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[EXAMPLE]'); - $request = (new DeleteExampleRequest()) - ->setName($formattedName); + $request = (new DeleteExampleRequest())->setName($formattedName); $gapicClient->deleteExample($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -198,17 +198,19 @@ public function deleteExampleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->exampleName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[EXAMPLE]'); - $request = (new DeleteExampleRequest()) - ->setName($formattedName); + $request = (new DeleteExampleRequest())->setName($formattedName); try { $gapicClient->deleteExample($request); // If the $gapicClient method call did not throw, fail the test @@ -245,8 +247,7 @@ public function getExampleTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->exampleName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[EXAMPLE]'); - $request = (new GetExampleRequest()) - ->setName($formattedName); + $request = (new GetExampleRequest())->setName($formattedName); $response = $gapicClient->getExample($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -270,17 +271,19 @@ public function getExampleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->exampleName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[EXAMPLE]'); - $request = (new GetExampleRequest()) - ->setName($formattedName); + $request = (new GetExampleRequest())->setName($formattedName); try { $gapicClient->getExample($request); // If the $gapicClient method call did not throw, fail the test @@ -305,17 +308,14 @@ public function listExamplesTest() // Mock response $nextPageToken = ''; $examplesElement = new Example(); - $examples = [ - $examplesElement, - ]; + $examples = [$examplesElement]; $expectedResponse = new ListExamplesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setExamples($examples); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); - $request = (new ListExamplesRequest()) - ->setParent($formattedParent); + $request = (new ListExamplesRequest())->setParent($formattedParent); $response = $gapicClient->listExamples($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -342,17 +342,19 @@ public function listExamplesExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); - $request = (new ListExamplesRequest()) - ->setParent($formattedParent); + $request = (new ListExamplesRequest())->setParent($formattedParent); try { $gapicClient->listExamples($request); // If the $gapicClient method call did not throw, fail the test @@ -395,8 +397,7 @@ public function updateExampleTest() $example->setDisplayName($exampleDisplayName); $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; $example->setConversationState($exampleConversationState); - $request = (new UpdateExampleRequest()) - ->setExample($example); + $request = (new UpdateExampleRequest())->setExample($example); $response = $gapicClient->updateExample($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -420,12 +421,15 @@ public function updateExampleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $example = new Example(); @@ -435,8 +439,7 @@ public function updateExampleExceptionTest() $example->setDisplayName($exampleDisplayName); $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; $example->setConversationState($exampleConversationState); - $request = (new UpdateExampleRequest()) - ->setExample($example); + $request = (new UpdateExampleRequest())->setExample($example); try { $gapicClient->updateExample($request); // If the $gapicClient method call did not throw, fail the test @@ -489,12 +492,15 @@ public function getLocationExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new GetLocationRequest(); try { @@ -521,9 +527,7 @@ public function listLocationsTest() // Mock response $nextPageToken = ''; $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; + $locations = [$locationsElement]; $expectedResponse = new ListLocationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setLocations($locations); @@ -553,12 +557,15 @@ public function listLocationsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new ListLocationsRequest(); try { @@ -604,9 +611,7 @@ public function createExampleAsyncTest() $example->setDisplayName($exampleDisplayName); $exampleConversationState = OutputState::OUTPUT_STATE_UNSPECIFIED; $example->setConversationState($exampleConversationState); - $request = (new CreateExampleRequest()) - ->setParent($formattedParent) - ->setExample($example); + $request = (new CreateExampleRequest())->setParent($formattedParent)->setExample($example); $response = $gapicClient->createExampleAsync($request)->wait(); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PlaybooksClientTest.php b/DialogflowCx/tests/Unit/V3/Client/PlaybooksClientTest.php similarity index 86% rename from owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PlaybooksClientTest.php rename to DialogflowCx/tests/Unit/V3/Client/PlaybooksClientTest.php index b384d0adf1ad..299fa9878cba 100644 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PlaybooksClientTest.php +++ b/DialogflowCx/tests/Unit/V3/Client/PlaybooksClientTest.php @@ -74,7 +74,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return PlaybooksClient */ @@ -112,9 +114,7 @@ public function createPlaybookTest() $playbook->setDisplayName($playbookDisplayName); $playbookGoal = 'playbookGoal1238804688'; $playbook->setGoal($playbookGoal); - $request = (new CreatePlaybookRequest()) - ->setParent($formattedParent) - ->setPlaybook($playbook); + $request = (new CreatePlaybookRequest())->setParent($formattedParent)->setPlaybook($playbook); $response = $gapicClient->createPlaybook($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -140,12 +140,15 @@ public function createPlaybookExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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]', '[LOCATION]', '[AGENT]'); @@ -154,9 +157,7 @@ public function createPlaybookExceptionTest() $playbook->setDisplayName($playbookDisplayName); $playbookGoal = 'playbookGoal1238804688'; $playbook->setGoal($playbookGoal); - $request = (new CreatePlaybookRequest()) - ->setParent($formattedParent) - ->setPlaybook($playbook); + $request = (new CreatePlaybookRequest())->setParent($formattedParent)->setPlaybook($playbook); try { $gapicClient->createPlaybook($request); // If the $gapicClient method call did not throw, fail the test @@ -216,12 +217,15 @@ public function createPlaybookVersionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); @@ -255,8 +259,7 @@ public function deletePlaybookTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); - $request = (new DeletePlaybookRequest()) - ->setName($formattedName); + $request = (new DeletePlaybookRequest())->setName($formattedName); $gapicClient->deletePlaybook($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -279,17 +282,19 @@ public function deletePlaybookExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); - $request = (new DeletePlaybookRequest()) - ->setName($formattedName); + $request = (new DeletePlaybookRequest())->setName($formattedName); try { $gapicClient->deletePlaybook($request); // If the $gapicClient method call did not throw, fail the test @@ -315,9 +320,14 @@ public function deletePlaybookVersionTest() $expectedResponse = new GPBEmpty(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); - $request = (new DeletePlaybookVersionRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->playbookVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[VERSION]' + ); + $request = (new DeletePlaybookVersionRequest())->setName($formattedName); $gapicClient->deletePlaybookVersion($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -340,17 +350,25 @@ public function deletePlaybookVersionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); - $request = (new DeletePlaybookVersionRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->playbookVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[VERSION]' + ); + $request = (new DeletePlaybookVersionRequest())->setName($formattedName); try { $gapicClient->deletePlaybookVersion($request); // If the $gapicClient method call did not throw, fail the test @@ -397,8 +415,7 @@ public function exportPlaybookTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); - $request = (new ExportPlaybookRequest()) - ->setName($formattedName); + $request = (new ExportPlaybookRequest())->setName($formattedName); $response = $gapicClient->exportPlaybook($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -454,17 +471,19 @@ public function exportPlaybookExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); - $request = (new ExportPlaybookRequest()) - ->setName($formattedName); + $request = (new ExportPlaybookRequest())->setName($formattedName); $response = $gapicClient->exportPlaybook($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -508,8 +527,7 @@ public function getPlaybookTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); - $request = (new GetPlaybookRequest()) - ->setName($formattedName); + $request = (new GetPlaybookRequest())->setName($formattedName); $response = $gapicClient->getPlaybook($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -533,17 +551,19 @@ public function getPlaybookExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); - $request = (new GetPlaybookRequest()) - ->setName($formattedName); + $request = (new GetPlaybookRequest())->setName($formattedName); try { $gapicClient->getPlaybook($request); // If the $gapicClient method call did not throw, fail the test @@ -573,9 +593,14 @@ public function getPlaybookVersionTest() $expectedResponse->setDescription($description); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); - $request = (new GetPlaybookVersionRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->playbookVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[VERSION]' + ); + $request = (new GetPlaybookVersionRequest())->setName($formattedName); $response = $gapicClient->getPlaybookVersion($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -599,17 +624,25 @@ public function getPlaybookVersionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); - $request = (new GetPlaybookVersionRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->playbookVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[VERSION]' + ); + $request = (new GetPlaybookVersionRequest())->setName($formattedName); try { $gapicClient->getPlaybookVersion($request); // If the $gapicClient method call did not throw, fail the test @@ -656,8 +689,7 @@ public function importPlaybookTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ImportPlaybookRequest()) - ->setParent($formattedParent); + $request = (new ImportPlaybookRequest())->setParent($formattedParent); $response = $gapicClient->importPlaybook($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -713,17 +745,19 @@ public function importPlaybookExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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]', '[LOCATION]', '[AGENT]'); - $request = (new ImportPlaybookRequest()) - ->setParent($formattedParent); + $request = (new ImportPlaybookRequest())->setParent($formattedParent); $response = $gapicClient->importPlaybook($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -757,17 +791,14 @@ public function listPlaybookVersionsTest() // Mock response $nextPageToken = ''; $playbookVersionsElement = new PlaybookVersion(); - $playbookVersions = [ - $playbookVersionsElement, - ]; + $playbookVersions = [$playbookVersionsElement]; $expectedResponse = new ListPlaybookVersionsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setPlaybookVersions($playbookVersions); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); - $request = (new ListPlaybookVersionsRequest()) - ->setParent($formattedParent); + $request = (new ListPlaybookVersionsRequest())->setParent($formattedParent); $response = $gapicClient->listPlaybookVersions($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -794,17 +825,19 @@ public function listPlaybookVersionsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->playbookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]'); - $request = (new ListPlaybookVersionsRequest()) - ->setParent($formattedParent); + $request = (new ListPlaybookVersionsRequest())->setParent($formattedParent); try { $gapicClient->listPlaybookVersions($request); // If the $gapicClient method call did not throw, fail the test @@ -829,17 +862,14 @@ public function listPlaybooksTest() // Mock response $nextPageToken = ''; $playbooksElement = new Playbook(); - $playbooks = [ - $playbooksElement, - ]; + $playbooks = [$playbooksElement]; $expectedResponse = new ListPlaybooksResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setPlaybooks($playbooks); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ListPlaybooksRequest()) - ->setParent($formattedParent); + $request = (new ListPlaybooksRequest())->setParent($formattedParent); $response = $gapicClient->listPlaybooks($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -866,17 +896,19 @@ public function listPlaybooksExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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]', '[LOCATION]', '[AGENT]'); - $request = (new ListPlaybooksRequest()) - ->setParent($formattedParent); + $request = (new ListPlaybooksRequest())->setParent($formattedParent); try { $gapicClient->listPlaybooks($request); // If the $gapicClient method call did not throw, fail the test @@ -902,9 +934,14 @@ public function restorePlaybookVersionTest() $expectedResponse = new RestorePlaybookVersionResponse(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); - $request = (new RestorePlaybookVersionRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->playbookVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[VERSION]' + ); + $request = (new RestorePlaybookVersionRequest())->setName($formattedName); $response = $gapicClient->restorePlaybookVersion($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -928,17 +965,25 @@ public function restorePlaybookVersionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->playbookVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[PLAYBOOK]', '[VERSION]'); - $request = (new RestorePlaybookVersionRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->playbookVersionName( + '[PROJECT]', + '[LOCATION]', + '[AGENT]', + '[PLAYBOOK]', + '[VERSION]' + ); + $request = (new RestorePlaybookVersionRequest())->setName($formattedName); try { $gapicClient->restorePlaybookVersion($request); // If the $gapicClient method call did not throw, fail the test @@ -977,8 +1022,7 @@ public function updatePlaybookTest() $playbook->setDisplayName($playbookDisplayName); $playbookGoal = 'playbookGoal1238804688'; $playbook->setGoal($playbookGoal); - $request = (new UpdatePlaybookRequest()) - ->setPlaybook($playbook); + $request = (new UpdatePlaybookRequest())->setPlaybook($playbook); $response = $gapicClient->updatePlaybook($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1002,12 +1046,15 @@ public function updatePlaybookExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $playbook = new Playbook(); @@ -1015,8 +1062,7 @@ public function updatePlaybookExceptionTest() $playbook->setDisplayName($playbookDisplayName); $playbookGoal = 'playbookGoal1238804688'; $playbook->setGoal($playbookGoal); - $request = (new UpdatePlaybookRequest()) - ->setPlaybook($playbook); + $request = (new UpdatePlaybookRequest())->setPlaybook($playbook); try { $gapicClient->updatePlaybook($request); // If the $gapicClient method call did not throw, fail the test @@ -1069,12 +1115,15 @@ public function getLocationExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new GetLocationRequest(); try { @@ -1101,9 +1150,7 @@ public function listLocationsTest() // Mock response $nextPageToken = ''; $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; + $locations = [$locationsElement]; $expectedResponse = new ListLocationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setLocations($locations); @@ -1133,12 +1180,15 @@ public function listLocationsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new ListLocationsRequest(); try { @@ -1180,9 +1230,7 @@ public function createPlaybookAsyncTest() $playbook->setDisplayName($playbookDisplayName); $playbookGoal = 'playbookGoal1238804688'; $playbook->setGoal($playbookGoal); - $request = (new CreatePlaybookRequest()) - ->setParent($formattedParent) - ->setPlaybook($playbook); + $request = (new CreatePlaybookRequest())->setParent($formattedParent)->setPlaybook($playbook); $response = $gapicClient->createPlaybookAsync($request)->wait(); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ToolsClientTest.php b/DialogflowCx/tests/Unit/V3/Client/ToolsClientTest.php similarity index 87% rename from owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ToolsClientTest.php rename to DialogflowCx/tests/Unit/V3/Client/ToolsClientTest.php index eceeaf6cb17b..f3c0620d148f 100644 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ToolsClientTest.php +++ b/DialogflowCx/tests/Unit/V3/Client/ToolsClientTest.php @@ -66,7 +66,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return ToolsClient */ @@ -102,9 +104,7 @@ public function createToolTest() $tool->setDisplayName($toolDisplayName); $toolDescription = 'toolDescription1291277124'; $tool->setDescription($toolDescription); - $request = (new CreateToolRequest()) - ->setParent($formattedParent) - ->setTool($tool); + $request = (new CreateToolRequest())->setParent($formattedParent)->setTool($tool); $response = $gapicClient->createTool($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -130,12 +130,15 @@ public function createToolExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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]', '[LOCATION]', '[AGENT]'); @@ -144,9 +147,7 @@ public function createToolExceptionTest() $tool->setDisplayName($toolDisplayName); $toolDescription = 'toolDescription1291277124'; $tool->setDescription($toolDescription); - $request = (new CreateToolRequest()) - ->setParent($formattedParent) - ->setTool($tool); + $request = (new CreateToolRequest())->setParent($formattedParent)->setTool($tool); try { $gapicClient->createTool($request); // If the $gapicClient method call did not throw, fail the test @@ -186,9 +187,7 @@ public function createToolVersionTest() $toolDescription = 'toolDescription1291277124'; $toolVersionTool->setDescription($toolDescription); $toolVersion->setTool($toolVersionTool); - $request = (new CreateToolVersionRequest()) - ->setParent($formattedParent) - ->setToolVersion($toolVersion); + $request = (new CreateToolVersionRequest())->setParent($formattedParent)->setToolVersion($toolVersion); $response = $gapicClient->createToolVersion($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -214,12 +213,15 @@ public function createToolVersionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); @@ -232,9 +234,7 @@ public function createToolVersionExceptionTest() $toolDescription = 'toolDescription1291277124'; $toolVersionTool->setDescription($toolDescription); $toolVersion->setTool($toolVersionTool); - $request = (new CreateToolVersionRequest()) - ->setParent($formattedParent) - ->setToolVersion($toolVersion); + $request = (new CreateToolVersionRequest())->setParent($formattedParent)->setToolVersion($toolVersion); try { $gapicClient->createToolVersion($request); // If the $gapicClient method call did not throw, fail the test @@ -261,8 +261,7 @@ public function deleteToolTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); - $request = (new DeleteToolRequest()) - ->setName($formattedName); + $request = (new DeleteToolRequest())->setName($formattedName); $gapicClient->deleteTool($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -285,17 +284,19 @@ public function deleteToolExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); - $request = (new DeleteToolRequest()) - ->setName($formattedName); + $request = (new DeleteToolRequest())->setName($formattedName); try { $gapicClient->deleteTool($request); // If the $gapicClient method call did not throw, fail the test @@ -322,8 +323,7 @@ public function deleteToolVersionTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); - $request = (new DeleteToolVersionRequest()) - ->setName($formattedName); + $request = (new DeleteToolVersionRequest())->setName($formattedName); $gapicClient->deleteToolVersion($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -346,17 +346,19 @@ public function deleteToolVersionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); - $request = (new DeleteToolVersionRequest()) - ->setName($formattedName); + $request = (new DeleteToolVersionRequest())->setName($formattedName); try { $gapicClient->deleteToolVersion($request); // If the $gapicClient method call did not throw, fail the test @@ -389,8 +391,7 @@ public function getToolTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); - $request = (new GetToolRequest()) - ->setName($formattedName); + $request = (new GetToolRequest())->setName($formattedName); $response = $gapicClient->getTool($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -414,17 +415,19 @@ public function getToolExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); - $request = (new GetToolRequest()) - ->setName($formattedName); + $request = (new GetToolRequest())->setName($formattedName); try { $gapicClient->getTool($request); // If the $gapicClient method call did not throw, fail the test @@ -455,8 +458,7 @@ public function getToolVersionTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); - $request = (new GetToolVersionRequest()) - ->setName($formattedName); + $request = (new GetToolVersionRequest())->setName($formattedName); $response = $gapicClient->getToolVersion($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -480,17 +482,19 @@ public function getToolVersionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); - $request = (new GetToolVersionRequest()) - ->setName($formattedName); + $request = (new GetToolVersionRequest())->setName($formattedName); try { $gapicClient->getToolVersion($request); // If the $gapicClient method call did not throw, fail the test @@ -515,17 +519,14 @@ public function listToolVersionsTest() // Mock response $nextPageToken = ''; $toolVersionsElement = new ToolVersion(); - $toolVersions = [ - $toolVersionsElement, - ]; + $toolVersions = [$toolVersionsElement]; $expectedResponse = new ListToolVersionsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setToolVersions($toolVersions); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); - $request = (new ListToolVersionsRequest()) - ->setParent($formattedParent); + $request = (new ListToolVersionsRequest())->setParent($formattedParent); $response = $gapicClient->listToolVersions($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -552,17 +553,19 @@ public function listToolVersionsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->toolName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]'); - $request = (new ListToolVersionsRequest()) - ->setParent($formattedParent); + $request = (new ListToolVersionsRequest())->setParent($formattedParent); try { $gapicClient->listToolVersions($request); // If the $gapicClient method call did not throw, fail the test @@ -587,17 +590,14 @@ public function listToolsTest() // Mock response $nextPageToken = ''; $toolsElement = new Tool(); - $tools = [ - $toolsElement, - ]; + $tools = [$toolsElement]; $expectedResponse = new ListToolsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setTools($tools); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ListToolsRequest()) - ->setParent($formattedParent); + $request = (new ListToolsRequest())->setParent($formattedParent); $response = $gapicClient->listTools($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -624,17 +624,19 @@ public function listToolsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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]', '[LOCATION]', '[AGENT]'); - $request = (new ListToolsRequest()) - ->setParent($formattedParent); + $request = (new ListToolsRequest())->setParent($formattedParent); try { $gapicClient->listTools($request); // If the $gapicClient method call did not throw, fail the test @@ -661,8 +663,7 @@ public function restoreToolVersionTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); - $request = (new RestoreToolVersionRequest()) - ->setName($formattedName); + $request = (new RestoreToolVersionRequest())->setName($formattedName); $response = $gapicClient->restoreToolVersion($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -686,17 +687,19 @@ public function restoreToolVersionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $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->toolVersionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TOOL]', '[VERSION]'); - $request = (new RestoreToolVersionRequest()) - ->setName($formattedName); + $request = (new RestoreToolVersionRequest())->setName($formattedName); try { $gapicClient->restoreToolVersion($request); // If the $gapicClient method call did not throw, fail the test @@ -733,8 +736,7 @@ public function updateToolTest() $tool->setDisplayName($toolDisplayName); $toolDescription = 'toolDescription1291277124'; $tool->setDescription($toolDescription); - $request = (new UpdateToolRequest()) - ->setTool($tool); + $request = (new UpdateToolRequest())->setTool($tool); $response = $gapicClient->updateTool($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -758,12 +760,15 @@ public function updateToolExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $tool = new Tool(); @@ -771,8 +776,7 @@ public function updateToolExceptionTest() $tool->setDisplayName($toolDisplayName); $toolDescription = 'toolDescription1291277124'; $tool->setDescription($toolDescription); - $request = (new UpdateToolRequest()) - ->setTool($tool); + $request = (new UpdateToolRequest())->setTool($tool); try { $gapicClient->updateTool($request); // If the $gapicClient method call did not throw, fail the test @@ -825,12 +829,15 @@ public function getLocationExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new GetLocationRequest(); try { @@ -857,9 +864,7 @@ public function listLocationsTest() // Mock response $nextPageToken = ''; $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; + $locations = [$locationsElement]; $expectedResponse = new ListLocationsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setLocations($locations); @@ -889,12 +894,15 @@ public function listLocationsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new ListLocationsRequest(); try { @@ -934,9 +942,7 @@ public function createToolAsyncTest() $tool->setDisplayName($toolDisplayName); $toolDescription = 'toolDescription1291277124'; $tool->setDescription($toolDescription); - $request = (new CreateToolRequest()) - ->setParent($formattedParent) - ->setTool($tool); + $request = (new CreateToolRequest())->setParent($formattedParent)->setTool($tool); $response = $gapicClient->createToolAsync($request)->wait(); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php deleted file mode 100644 index 46561e2d32ff..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings.php +++ /dev/null @@ -1,55 +0,0 @@ -internalAddGeneratedFile( - ' -Á - -5google/cloud/dialogflow/cx/v3/advanced_settings.protogoogle.cloud.dialogflow.cx.v3\'google/cloud/dialogflow/cx/v3/gcs.protogoogle/protobuf/duration.proto"Ü -AdvancedSettingsS -audio_export_gcs_destination ( 2-.google.cloud.dialogflow.cx.v3.GcsDestinationW -speech_settings ( 2>.google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettingsS - dtmf_settings ( 2<.google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettingsY -logging_settings ( 2?.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings˜ -SpeechSettings -endpointer_sensitivity (4 -no_speech_timeout ( 2.google.protobuf.Duration% -use_timeout_based_endpointing (Z -models ( 2J.google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettings.ModelsEntry- - ModelsEntry -key (  -value ( :8Ê - DtmfSettings -enabled ( - -max_digits ( - finish_digit ( > -interdigit_timeout_duration ( 2.google.protobuf.Duration? -endpointing_timeout_duration ( 2.google.protobuf.Duration -LoggingSettings" -enable_stackdriver_logging (" -enable_interaction_logging (& -enable_consent_based_redaction (B¸ -!com.google.cloud.dialogflow.cx.v3BAdvancedSettingsProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Agent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Agent.php deleted file mode 100644 index 724675fd9bcedbbf4dfffc4e5627acd37acd6232..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9210 zcmbta&2tpj5ocB)i84NaDZiAzkc2Q zx_|w9Z|0*r-i`;Cv{mX*-wbIZdhrd0qQ# zeM`$P-`%>1QvPGHU8k!|DGz+U-L1Bq0C@jYc3QGrthYPm>tcn=~n$8r#GtlslS1nd-OAA6X z#D6Z^fnhs#h%@b{=*gnCZB_z`GuvgitBw`guA{LD>yAZd-qnOoCVSa)(ep(uGHHVa z0|QaG>x9&I%t~RI29|Goq3ds;Xf|7>VH`sCWaeGDEK_H1Ycs;eY_`qFMJ@EJv~hJ! z^J!T1o!i`Qrl1!8Ds%{#?%4(1aaek%b5?9xDdp&nxo^Av zU{fDZnJ#@B**P5wdTHOpZ7XfkFtnZW0A6=fSS{J^lIv{S<^EmjqH6{7{>gt7Cf0=2B`bMxUj5jX zrKp!mapkQbLe0dr!Ybzq{BsfB?HiiNTS7E#F%U}EQ7mm8r1uw+Q&N-Z*$8y3as;F$ zryB;gS$P;mSszm1T!Vlwi$D&2Acy#x9gtIIx)I1!m(#BGn8xziuy{ht88fe*!O&Vt z-gvbnLNL#%ecEc&B{{KDPr!^DC!o}RUJCJUfUugOEXCwt)JNh$5zakKBq{M`>-2zU zix^Gagfp8SrPj`tyG0MesCI}3Ds{|a1x@C|1~wf}K&Gl_%FIaWPp9A*?=EBvjZUd4Q3@TUosKAs!;QBRP!;cSU+o7GBaR7|H_#V&^-FHv=f%M7E;kNPpT zc2M;^*T)9iEEuRqwV|2gWD<^t_8v8!x(-#3)fYGoqb1pDu!7ZLHbMx1xsM&wH>$p^ zzQLbu!IbnXbd3-lk9S5rfdZrR3uzIyE~%aF7_?ge*tq=AV7Z}AaJw$O)HS%!P#Qun zmPC+7mXKlKw|0c+FfOLDz!hD0S1nxO^9xsA>X#waUBQN&fJ*McseoGOW%#7-&nd1Z z^HQIK+3s34<-9ln-hpJ40HJB^mV883-$0g9MwCKP_P-h&HLU=KImu5W1Qo7j3$*$h{P8KRJJ7_PY1E-k6&`DFCSY%OSY5{E|TGd*^w zwdIjtfLgXgk`IyO&C=r1>dKwNaLWJT(T)?k&d5DQd7ndH|AnCy~H6i#Bc?o^9)2N>>-&fn|HfzDc4?xM=bnYAOyuVB3S89CE} z-)vQexZ^(c+`vW-|AYf6$8|CVC$WyLU94lH=p)D65n#^Ln3hF@zzE%4>L744H4`u* zq-cP+jZmH&hcWasb}~5!XOW<^=PEf3!_-0Wk$r}Dl;k2zc1}BT2__}%v?RA^Upy_7 zk6@}xMv*&kF6vd(DH+uO>tj!zy|{|e`Kf3pqUM_xL`>*@uE4pjX+++HlR%c;wkL9qgaJv?1;%2;?~U5bFdxAXx$M@EGXr z_+}8bS=6Hps3%(}{G@*g)7|@rU;-avBz}eHA7q}%U$qS4x!}{8XVK4^INzcadfjP59f?-0GOMAaiggY+n(5|08ZVvgOJ-7JfOd>(jX)^VAwN# zTuKJLaD~VABI)VjDLC$-(MEu0X1*`S7{B0;M4odhld^y`t{QlF(xl{l80HQKxa<&? z^5rOjI`ii=H=320!x&1#B0M2dYjARv3eO_PK4_$3xyY@a8<+Z>0%Xajm~ec}NZsM% zbQ6woS9y&3^pxj*>MJ0hdw9dqY)Pz7fM8#d6Sb6q(JI$xFj6e-Nk);6OE*4$r9J_& zOe?g-fWt=i4@ZII4;YzkitHiPG3LwTT8ChcHsm2PU*x#Pw(IYiA;;kH`CdJ>-LCX9 zDp}z=gx(yCQfJ@xU1yJ#i{RQUNYeMP zLE#l#fRPtioXP{#BSp@`)Uv*%8!PJ%KGnC3&p+GT$S>Vpxtm{}I6_9?Xzu=cZbHH4 zH+FAx{WD`jU;0E}%}*Rn72$M~ixMYJH*PXF1j+proDe&Yht!bm1p|RG95{n_eZt0I z#}wUn?MUtoS%9hUhTt^bBVpfeuBgLiV3Tnih&ma^V2~O20D!l5e(NcBy;oXxu$B>* zO|AoVe!;j1cgS!(c2&dEa=d3YbksnA z`o`8>+~T$r_#~g-z!VsRkrn;^{Tyb%M54Y&B{=gCnQ81bOq045#r~Y8psXa7Oz9YHA^es;HcKBjdU^Kr2=O=PiVeFz_S!PLL2)cD2x~Q z+{^&8o^{S%XDN27ZZ#@f`$>N~xGSrN<20GN?IOad-zxAXh9B9jybX$Icoh59rr6)& zv0s4e-7%JjvRxlZcHDjjeu>my6qpwMwS8h_$R?ad&eeKnC0XzF9+=&(mM@ItXRtoZ zv3mY{0>j+Rfc#YfsFNykt%n_TQR!B)m*tH!1QMriztAO9{LR1r_f2As%(AyL&jfi~ zj5A}lf#uFd?3Vmdfsv@*NVxItm-kPjq*KS>Gi-`AZjr>i4(FV## zdPS!}b}$>)Ug%>YU~?v>Rmg2!NDUCltl*O5A82v|H|%M0gX~}?Z@$n^aa-pas3W)g z*8DY|0em#wSEM8Bzd`F8h-FXf8)PHvC!-{aX)Ax-(2@qTBD8%ONB)IYHE@ugRyD{* zR=pKj)o_iSj^CrCD$n(+oq5irykm{M5$9(f=nqrZd7%69A}iQlR+%L~C@?0wGsg`w zA6eIhV>Sx+>5=0TpjE|S}Qd)C&~YvjMk zY0%2{wnuthCwH6`Io1n~+t*7ydZ80mE^|%XkMG_cve>_m2+}PKrAEF>fZB~V^xVX5 z6JNvEuay`2bluSSoYw}}JM%y1o_CP#3%)b;i4k9`WjoQMUEMk0<-Nf^&e%{MT^Dc| zz2(9;QDwJ*=Ckim&^#nN)`3^N&Hnm6kyu{&bK!(F*FCzD4Hy%rWdY)z_jkT~?)mB)ch7|fVwpI^(-|?v z&Y{Tmi0FEhQG?oIC+K#GCmOWxS~l?{Q7qNOYON_MCAGPPralckgXF~?r9GSE44VdK z&a`x!_PREGlQRx-`|CM9FfFPX)ahD1i8}{y^gi)j-5_GQUZ@bJn>y3mW$ve44E?lA zLqF}}L3?NY1%P4ezAwt5zan=B??A*KH|W@wA^J>b_~)VJYnEd%w71@3Sue$|Zu|IOQS=B4Jm&?^J9Ka~{A!PZO?IvJhDB_% zK=$-~i+cI|aaG4o&NJO6aXUZSY6wRuKms9(;{$ROpM7n`n8~I&glGeKwLB~;Eb%e? zGY_BsS3(JQBMXUBP&%fdWE@EQ>x&DqL*2DY1w3rNRtcc!S@Wl$cn)BIIBOo9Z!*cDp`dnFO9ruPsP%Mgzan03_iV0CCKL zdUBGwfV>aMZW5$t<^rlGv+rQGpnE-{I?+84zJPg$YMt;5xvvdsn4HWi%rVMz``Bbs zLfQ8zNUM$;uoD+iP+=~*=a?lmEvLsr&#gTj;4r>368E9RHigt*a#C1;YrfuhZK8!^ zN!ueHdz%Tfni4XQCXU`gQP=>iv`aIyD7h@m!;HJ<=|1Ws(R{=yg}s@DsXjG{owI zRTNB5MB;QqS73>{$f9zFHb__^@zZL?648LQd8vgdFEr8lQ)+ILtd-4B*a( zu8ACYcs$;EUMFaG?9pwilschf1PwlE@*E8FP{ zIL>aIJ=b;%=_%nh+!_(p%4MxqZ#B{vg%x--BE?a14zTy2g3g!QxO-D*8#)}DW+eOstEkS$rbH{Q#T87bjD+#atJQE@8d{&)pWi;IPylCXqZ z{f94qA${U~=c`^l@%?J_j1RUg+Rydq$i|O57B2n9f!lcz{`xJMEN%Rryj$kGy~KBW z>3Fx7iU-op`rpZ=NS@Dgg?#>41CL(i^Qa@Y;IKZH+6 z?p^$Kl(VV9H&Z+td>-ZaGm0nt?@{L>YBRe2c({i?jaKm!oBO$2JJ*bM>mxV<_!nul BEAs#V diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Changelog.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Changelog.php deleted file mode 100644 index d67179b838c3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Changelog.php +++ /dev/null @@ -1,60 +0,0 @@ -internalAddGeneratedFile( - ' -’ --google/cloud/dialogflow/cx/v3/changelog.protogoogle.cloud.dialogflow.cx.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/timestamp.proto"‹ -ListChangelogsRequest; -parent ( B+àAúA%#dialogflow.googleapis.com/Changelog -filter (  - page_size ( - -page_token ( "o -ListChangelogsResponse< - -changelogs ( 2(.google.cloud.dialogflow.cx.v3.Changelog -next_page_token ( "P -GetChangelogRequest9 -name ( B+àAúA% -#dialogflow.googleapis.com/Changelog"´ - Changelog -name (  - -user_email (  - display_name (  -action (  -type (  -resource ( / - create_time ( 2.google.protobuf.Timestamp - language_code ( :wêAt -#dialogflow.googleapis.com/ChangelogMprojects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog}2‡ - -ChangelogsÇ -ListChangelogs4.google.cloud.dialogflow.cx.v3.ListChangelogsRequest5.google.cloud.dialogflow.cx.v3.ListChangelogsResponse"HÚAparent‚Óä“97/v3/{parent=projects/*/locations/*/agents/*}/changelogs´ - GetChangelog2.google.cloud.dialogflow.cx.v3.GetChangelogRequest(.google.cloud.dialogflow.cx.v3.Changelog"FÚAname‚Óä“97/v3/{name=projects/*/locations/*/agents/*/changelogs/*}xÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB± -!com.google.cloud.dialogflow.cx.v3BChangelogProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php deleted file mode 100644 index fbc544844bdc9920069107a8227b796ecba3131a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3798 zcmcInU31$+6vcLuCO02-)i2j1R82F~?G$B524-+6j4dgS+xi2`PMeMyp~!1nAWK48 zrAeW$yz$KNzzdK31%3e!`~+rr=2vjFl4Zwn+nEIN;Mm%`=bXLw?A7k4pF4dAZu2E# z5m%$6!yg>;v`=`)wW+P!CV${}yTs*nd*B!*aRr{2YJ9cUzek9P5o%|aC@_(QBC!z?GjbDEsN;Xuq}bH09e|9c#ftMzEm$( z2-Sk)+JwoFI2TyW$BiaDY=<>NxV?KXM9m*ls>QTGa?-+SGVq3X0I_^ocARAADv+YcF&<@ltotFu7P< zAoULXl7Uao>=bS-oGLJr2_usU`jK$Bon4KPnXRxQn;sJ$+HC!g1YDlt7EXqXWA3EK z4#_0=L~dp4zVJpmAqH#W9F7AR!DNz%u)sZqOvl#!0kNoxqIBYUhSgICc86qU7{^C% z# z2w!MK;DHuXMCfRsnEJbr;8x*c$WDo+e(MwWI7~-4O5mbLG*|Ddo@F==pM_Y(Fh< zS70gF*rsax)bVN50+wNxJw=ma*|UeRe8Q~UHCTyT1U0A`HXnu-KlfcDLR*3vN{(m< z#@&VaLG-p{u3Fr>KFs&91qxyB&VB{_+kAS?m3<5lG6e49hC+i*y1-?D^L)p#T^d-# zK&N0c!zHD1v)LaKur%%|PQ?ohdLTt4NI2{1c${IPR<_jtgG>nsioX60q3Z*< z6sw9wtiyYyMy*wq%GHu8$zoY4*Q#o(s?_oOPFa@H?{GKZYC#m`dQ+Cv;=UTkrxU?Y zLw+QSr-qX2FX2i|HztF7AJ$_8RS|0qSuM82$8vLmbqVJ8n&c_s*X06VO8VE6(U4Tt3k7 z+>1S*MR0Vy^e0A>>pvyn(rJyi;byT=t)h?WyN!Y(tCd1i+?^;q0#6I7 z)~YhnuEC9IqhGYpE9oT1!|Jr*hOE?URYgvx?j68#e4b**In0ApXcknZ8F;a|UzaBY ztpLEEgESj0vDs?i4oPwtG4?xk?@PEQO+C(WIoObDVyhxon`*sL z6JO|qh;hmi`BqVL7sR`s!xP8NSpz%9I{z1d5}OuWodd&0vdwd;xJABG)m zc~BtDyKOH-sbcp=iou`@oO?E?fjNpE3vzp!0u|o=&mM+N5bCrKgnC+cs|bp q^7&B&K6;kV?`X&7E15;xa?dP^})%2A-E zBgcAYP9$8m=bZfTxLia1A zbh|-8DnQ{(03iqT8TxGriL-H6c!LOkk8`PI-<)dc&<-3`kMpSyBQJU! zx^~CM&KGzT5wLxLF6g@50}Pbd7zIxt{YL_!urGwWXr6c2N({#`3&L}Bmp5bknAi?b zVA;f~UZ4bLEm@fZwfD9pAFnC-i(wSv9#<1SM@h(L zV6c^WFtE7w(d`WYO+Zf&5rPP8*5+BSBwQ=0v6V3-Vn7UG1KlBJ*ON}(B%S&xhLXOc zI$91#Rht3N+Fs}mAUOw^ZJsMxl$nlM6I6<-LwtLAgvih$HiT_5ANKWg-HGOL(4>e~i6VzK>n!G%T9%8UTGwH0DUB{?kY@sOAk7>2&-!lGHvV1yb(sNFwI3 zZc~$I3Wt$@qsaJ&HzB~I^ay?MQg>MB-PtAI3;;u*Y|>I~j+#s1!p6T!9Doz90WP#6 zJU|N;gw=N70&rnZ2mpwC#OT+=bg8_Mw$bt>_l^a#lK|-#!$7_2FK(@mId^sIN2o6> zqa~9JSv%s>?Yi_XdRQfqjK>Mf(T*Lbd%Kct{W^~p!|Wa5EQXdYBqn@vL+lsi{jgG> z&Z_3&mwt7o_yzp#pZ|V{*MutH15Uk~<^zglBh<={8I_&nQg(ts!k;m8ZvsIfcSDR5 z(&NN#U(58tnc_~k)tU*eCe?rJBxtDRU1Ry(mc6c2K5m-3SjOLyN bH~5CPGDS8leoyJz72B07>1{zHG(zZq`MbM` diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/EntityType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/EntityType.php deleted file mode 100644 index 90c91229fb6432cb567475c9ab257f38dc31fe18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6225 zcmcIoOLH4p6^`V`*hfyR^d#dKsdPFi#xb52*u^l_nUHEpZAD|tQrSw#P%66Gtt+`n zySwRbC3aliz#pIrRxF1q7O;a2dv?PPR%FG3Raj7LS#j>|hgvTrdj>Bo>E3hBJ&*4^ z?)~(MbL_x8H6@+c{$ShJU8|XATjWYye9;A)ce@ zgfG?d72<16&DRHrZN2a0kp0D}% z@xbs@!!mqiH{PI8kNK8ndIZ@AXMdInM;rO;&LsCg<6F>GQU0Ht^9!td;Eq*=FQIZCfe9Zf9ha^wud6)Pd z*LuYCrUEYFZ;c^dlO3ZWTb50|U|XIfb#3a37{ypH4UE#|cyj8!Et66|?T>BW)dGwE>T7y zN+hF#BDg%vVYIOJ5pQ{hpIXmseS30ofv(&EWXY*+cABKAI>)Z&p{!XZ>yt~!3MJH- z0PZd<5lcHViQ4MCd2@!A`>w_+@A7+S^&EEtW?j<6rR910dvzOTLv=Wqd8L`1FfxGy zZ^N8-X4%%+iMO0a)q>EhK7boa@3}*mh0kD`hJw2V+1>JfQGK?5SW^n+ow8EQUPBzr zvDJ!P%ci*NFwcJNl@IILG`9#D_VYj~DKBc-DdBUtIT(cda94g-uc}BQ?;n<{`)Z|H zRQk@j3v0uOipq}sY_Fb8N$2n6Q+SZb%>Zbalb(nTIoCxNS3{KlnCQNjI}g8I>mkr>ERvRw?Vff4mOyh9 zA(Xb!fD9cf)Ryg@Xg;O`&DZ=m2#+vYETX6#CW#%ut-^Ivv)UbWrK;2HokjV9qJjd@ zCFj;)sVLWFb*Fkzk?Vahn1kv3UNw(U%fiBEhlrJ$T-cRMN_HlH9SuN#8x{+s@I?w% zhQ!2ku-OyTXV7=7mZ2+ZaBG;`Fm+NBREVI(;-nL4^7LAM32tNYLU>?}NQxHLhUgfL zcfvmrRppca3#x{h&x$shzdOQwTER10-x`C6!2Clt=%TP6!NLh~G3d5KM~ARz7sd%0 zVYOJHvZ_o}P}-gX=WDp;C;iI6J5LiWg^4yQ*pqW_cN{z-; zZ}kUoYuGw>4^|TRSCd177ubZ3kFu|Kmo+Y$Fau7C6XusG_+ZcQzWyS7yT5v|T;XoQ zyh96`hZiSSd1p9809*3ymn1;@yx_sofL8w_teLHcV}hZ?H#%+!7A>3()Wo4oH^G2g zC6e$&)QzO%;1>0w$x?(H?grrxDOf7F1h2$h#iHZBTJtMFCIOcas*`&sntu9P4=rT# z!f#OPXAZW!AzJsHOB=&wqB7##05mzsbl9;fovs;dGFz)r#G?URjBh? zN-(d(47PfmFt5&S{c8a--SBzbA5(C>2SD6*q~q{wkk~^V#(#D4UmPFelg^XHd_mDJ4^Ydxy65qjs!q{R~&I&3h~3l_VZ{Hxm$M1|Dt|S-cW7;uT`o zYwYjP*na4bHMXB2GWLTA0C9@32Z=t|ZCo98e@?+-U!CW^8yz|#XZq+PUB`iSfGubz zLiw#6-ZgrX=nAOg{+)uG1LHIIy)pI-a6}f}i5L@a6k`0MB>XJ(rTp=bSr{jZU|t^_ z<)g08EG-I882qkasT54+Qfh;`r2$Z*no{TubzG>uZ+Ak z|3&`%*!LYz%H>|aejSD|zEb0(%yICB{SiL>`1InqIgY%0RQ~rVxQ93M2pGdNB)`~g zN;UePTuc4%I{|6*l7yH0w%zxNjyhuZ&`+JCNA%wp>2z`Dx9K}2_Fyg+=!3afj33O! z!m0Rt`(658urEoBK$5x?xb#Ajo^Kz`vg)z@Vf?DN89YQM-mOQzSu@JuZTSK&0R9X6 C|2(+> diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Environment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Environment.php deleted file mode 100644 index 7605482be85b5089a9c8a534c5e407fbf49edcf8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7377 zcmcIp&2JmW74K4xVhxMRTXDNQXh>H(;_9O1yN#24ykQc zyW8ERK4K7UgBB>#Ly;5+dMHq!#~zYH554r*Q!WMCn@=s!lmCMnMbS62v&-d|$(2(d zEMoV)H}7kH?>DpGxoaQV=!UpOOyX!BX^6Em(K{rf?O2{ww+yk?ZZ?S{)~zF3H;5yP zV*Z}^?!B^D$nTUFK-IO{PMs)X%d%Pq$<__4-N-g{&9GWc!#c^ ze|EcO=ylQcG!OpV)ZMCX>K^FpA3#*=VpB6*0{Vlp&9+(hbjuW}!acK2GPgzFCY8Nu zTablyF>tI%69Y-9?3f;LOwFj|iCcGc+q0Y^h$>2pcwsu}lgw?tEH$S$#f zE_zOzL{}F@hj?wrTw{Jy1D)_!Wk}joTd%05Y0)fLrmHC3n7SrLDdr3v$`em#Qzu4a zgB)tdy5+=E-6OnpCU$aoQ&h^t^>Ug^CSQJpp$DXPXj$)1ZfDmrTTa_Fb+c8uXVV=N zFY945K`9GIws$u9(xED=z&n~7!|hPF1pQWzQSnf*ti#^*v?F`C!)((mzp3*rqBa`g zj@Seg$%H*jJNg#-PZnik!Uw+YE65CQ$u@APSjF zcpl9(bk{btvnqRyYKqCz- z8?x`_h|;qSZA)e(H(!UbWm426DPIWT@Ca0i)m0M5Ln@AdMFff9zqnC)O)eJ)8^>njs zwcRS9V~TddMJ%Eee{DOYL2Sc1qildl(2ls6-a{|+1dLTQ8>G;JKph>rh`E(qd38)> zxFMzUSp5LKGTQq{GvWKtAwMK_&&@vMzdBjNs{5dxeHi@gWVIGJ4pQuIC(3Q$A?Z?+ zj`U+Rx2wBeWEFRh{HP5;f!EQrtvO(b*KV2Bu5t@c=#2$Ip z`-E>Zsf|*D9=JA;1A^Z|GZAlt)Gm%mZ6p{xhpw39)T>68W&2(#qnEZwH0~hmwJ2z8 z1VK+&BI$PmO642^TRh@LVES1znn%e1Ucz)t!UT-;|UG{nWeB`9*nUm}8Y z6x_L^gE$v51K+U+D3vD$8JfChtIE#>^ztqcr?wplc^mrPa?XO{Jkttz!e$3@Jlc={ zf7Acs0(ud!nqwaYM&P(@!|R)r@1bcR7Vw-^?()j^m<>0~q^!1D4r$RNTV$Q>$SAA& zYq&6ODUL5cQ5R8WG!O0p0_b5uG&FAnwRRV1lfTYH5qwOq(o z%Y{<8x>qRe@0P3k@0N;%+|K4sA%FENfLqf=wN!%N0{y+I?(D+vgz_ihvHC{=Md@AN zI2)E5{1f3zNAhfUrgifTXy1KY^(g)GlirbjfKq#Hv)?-(`8RrThS8_kNNA(^Aq(&x zFQIG09b>a5xw3kWj+6F>tQZ{I@f&Cw2DIe_LnJe11)9VHRggXwVABFt^yi9hkZ@RT z_6^HBY*@aA<95b`IP!^r7M|i0&vF^f4bO6rg!80%^ho`UfM)ZIH*LbbN`R|hMl<2N zXolX^R0B5YbN9*Fq@*Jpb&V(J?qH+Gns$`XbeSSU%S%!zx>VSI>nO?g-}#zw~yi0nBqSR=yES5!>^C=t5-aTCI%ytwjZhNjM(EoJsys8zL!)lcJRNU`v;gG z9+%kxjUb5YLFke5wj5sJNWT=mP+#di?Ox-jQph^H0F?d9lSeA{%dr&Ujx5}5>HO7F zqD&Njlt8lslyYqB0~!;?{@WO_&qab>;%9HlNm&BQD+SiB5gGYBweL;FXAB1WcMw|ff&!Bw=xXRdy4QK=*kJ-APLi^qsLREm+`lsGO-V{s`*0m2LKL?SnjSE(a z(@*^rVG)0rK=UI>1s+?-F%&8N*0@d>ZGg8zt#{g#@ckImrXR3}6K4ER0iiBaz^{#Q zx+^+i^?wT0&qNtQSoR1(>8W>7db=N`V%OUzDU_B$q0^^dsPiKaT7Of&cj$Sxt7Nk$ zCnr4o@ODmXdx!ofv}L$S^_rG*v@}k=D>LBz#LdB4<2;-@-HF?y8LB<4o^;5RAsHCtp6;RiNMcCr;5bnaim0yG*GbKk ztBR^}9<(APBvwc)7>Nb!SdN5*Sg_y^AhF}I%8CVIF+TvIVZ*uiR+Y<6f|GP-5!?5k z^WF14=T?3Ak$q^xJJK38siS$cDea$1-XWE2$MUR(Wk~y-R*O1P!)n{QK^<9=idCsn ztxKh1x&8oIU900XXihq?tOJ8)8-~?sW}CWZSO+b`I?gsuvPUafdSX*YZ&TBgIW&N& zwW(`s4Jxf|mpHE=Bf>w5^WW@N~-;(1pj6z+|)!Z3}JiR0`zU zVrD^;?3GQAI;Ljq6{*{BblbC>EhNq54yYFzldUW~_K#(7dP`amGUjp@gnTM_PKQQM zmn4UJ9mjmaB>cr$#eR549uR za&E?2qkiCATgcG%#SVrlDtP?^Lsm3escn0ww_xSEZffqQx8SW~rT*62{ua-7%$aP{_nW`}X8%5Ap7A$>auPC&)7xl&pCS+~ zr0@bG3xdpllK|a9K_+3Cm7G*eiY-i#`!LzmUE9!3RlXW$tNEdSC~@)zB$|FwW00kW zIQ=siVTnsq!}xQ0IqN&%3WLhsbLDNuM%DqEw8e`OVvZn4V)^~+gA_wvQiN&8GO#{+ zYQr*H`ax=%qb&_Us|lt8=OKBR3Q&YzGaTfr*8>qcy$y2#MoZI;jzd+4YA))RM6e0+ zZ5YLn=onsVl!Je50C>b`SRIg$WFgT&NRO(_xv4P@lMY}4&&y$Y5g7p0aXdjkK9GJ1 z#;Ms9)Dr`#--jf&A5ZPr*sFY*;2K=BH0)QZLCpj2FqPnJ_b;dt)HV#5ACIlwsIAwM7A%UVd_8#RW_qAxH%WAv_twoB^_GGQFI;F<^l~ zaJ-ow_15nYT;K=rau>se7w|^JG`v%x#kl5)<-#qF#>&-W{QMY3*s%#uRcywwXWa|w0}ReLMA9&)Jk8_8HO(e*#F7pgmWV*TT-QlIE4xLdE*l?^8Drcy7gtDF>tMPRX0->Fsn z)i^;DD7&Q^YM@5ehca~-5pClh%x>3F-M(`sV5C@6R_h3yfU(+6rBbe}CF5iqhM8K) zAwpofR^8aB?$p&)rM!WL9nSqS_J#6`7(Bc>6uK3Je1aY06WZ|H>`VXKS=O)`Vp`6= z48ERawF4Z1kcxkvWvO|jJC@0AFSr=_g!kctED$o4d(=*9xq&RR^jk&gqiGN=T;9Kt7G#V9?$%W z$=lmG$YqUzwTxRd2G+`>ZF69Wj&_pFPvbDvJHJ$;^9!|ucJi$O_Ur+X{a@Q2wK2J7 z(ImlG<@ZM>C7TszgZTz6=Wp?`Fx`ek6y$E-R4MxFJj?_R!S>L=DB|82L7PmrbyE%I zV!xVRJrrbKz+`wFn<{apby0Xx6fr+=_@OpleVg=zgN^hJL<6m!IfJ-q(F;SM?)557=GQTpFYw8= zD?xz!YKFwT=$e6BGO>JpEASgm<};LThtIGVrR&8P*?vQOoXLV*XZJN<$cy7xc%v3l z?ZAAI8q}i~g?bfN)L{<$j`NxwybbrZJ|~I^`x$Pbk9Drh3P&u_ zaPr{F?POk;n{ttAL;j75_ScPpiuNR#

F&yarN`~TWkDPk6d7{dgNmGsz)xI z$h#|F#2<+LT#ggua$O2sdY;SeuI!KU3|e_Nd_KM;UZF(ZxL~;88=*_yws1=ER^$xM G0R9I(zY<>n diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Flow.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Flow.php deleted file mode 100644 index ac2c0521444252d738b89d14463a2b3371430d33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7914 zcmb_hOK{uP6%FZ6#V5s)o@1Mqe=wXjiYkLK<+=$SC4opvW~~oLrag9t859B^Dbx^v z5`Zk%)uxNK(``0sSDh|9=}bFace?j7UDd00rYkSI%&PZ&@DV=(Y1<1+0`9%HOFPddN!w2)e}_nJ*YO?0v83&w-6mbhaCTkOB3(t2Dx1>AW<#o0 zYK^O)>N!EzASJ2eI30@=49f{xg_fyXPN!`-PYT9nj8J6yO(hAr?&yWQF++f=>4axI$AAY=NdYWmQ zJ}8<$hd7p`wr+U@6#He{fo=GvV@p(F(>BQ52NJhQW#4lhhSRJVu#%g9a+ zMnh9=?dedq);;3;rrjAM>LCVeyROsq@A-uA4IZ|cVTi3nEqbDNL zh2jRr7+8-K8zzh^U*B~HFUrQn^-oPP9Mo1TnguH`G3TQ0rM>(<`b!bbjXEmvB`&EL zbSNtEP*se5Wp8ozoG_%jCd^&h%6!DmUP-)Y(|*;qMZ*e#^9g~j=t}YG2jUf5vwx85 zqV+US^qx>#JX+0U4W@ab!-P^wCR_lhko@Rq^R6y>MQcUPA~bIut+^L~=f zp~(#^2&W*vgV3(iB9`VqbxA%WW#Zz_C^AsA8;`pP<0Zh$V9P@e6#X4^Daqig;S z;AF?KTKQvOH;W&k(_*cz4%5l*X!Otgakl6uV=pRMJ&i_WfZR;p`S<59h; z-QT!Zua;{owQ6PhEqo50PQ1I-R%JTV^FpmWP&dk;aZG-OX1M9ZdiWZ;BFt>5 zwT;@wsz(3pS?emgG)PFj-`HGN8?`d5dKt|Q5?NO_?yGClS^3Ws=s4vscnTe-9EepY zhtH#_mg%{c{#0X6vyj5v^09xbS$rBzwglIJVaqa~!!uT;pQ*Ao_P(O+YKz=)GXcZ1TaYB^jsV%J+wEJb!uWw zSU8-XQ|P4S7>`LSe;Mpe%m(PpKxw>yt`J+_wusi_Pz&f3WB#o5CU{yDbkz%7%Ku19 zgCXYvjV5sr28<*xpJhmoChb|ldvPbW0QT_*x(Can9X_l3v_Cguu#KDUoD4y0dVtQ0)+0nK=}`qDTD&0 z2%`nSp-@1R0W+pi5+jf_8zL#>DN01sai3R|Jmlm%Xc~sTX}>mfp!{JPv5rpnb6GyPCW{}2 zH5z=9P-0)ixe&*trmU0o{A97e)bZiyx0#pfuQEsN^8uIpR)>o zvdN5q)pyxy!gP3y%Aa5jd?Up;%>g$DhhTQY!FE2milz>&atWQUt=BiV8ro*PQQO?; zp};_2?^dgIV7gOiVntnBTUN_=r?bl^`NkseAl$za-a=`9Y4a zBFrDt^`PWz%f>gv21o7YmaoB{n6~rCzlQNx-KTp$x5RhYSDhX`DB<+tyC`qkh8463 zkPEmE^Y|YbG$jZEBUw1@1ez2MBU}t4 z9Kt|WAoDQ`5!?6*E6(Tg?N@MLZ~{Uj_)i9%8$#i5+Ri*g@3rFEN>-cYTncL)Gk={}V|X0eU8518z-m==x(6>p2FLB*nD1(j42 z8}BGVjn__u(F_P`cK^A0e(3eVH|nDu-*>%Iq44C%6VWu$Rhb_6JNy&tb+|C};ncjl zkR~24wfuDkU4-E-KLnU8TIQJXn00y~^L0N=%?siY4ID!&2$N;`T{4>K5ORKA|k| V&!vg4t3$u6GD-dg^Z*?o^nd8Lgj@gs diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php deleted file mode 100644 index 334d4e678cc85bf9c75a33d39fbf15044cf6a109..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2676 zcmbtW%Wm676pf^~wy$D9Cfb4(YG52Eje@omYV`#=PNPTcxM*Uv36!EBK#a(dOqk{n zoS`DO@OO0I?z-(d=&y9$59lJR&I~Dvl_ftAEhLJZd+wcc&$*lj--JgYY@vM;kO*_) zqW&r3M+Ait<c@itiI782LeD3Wfl%iVJv)4X9(N92Y>H4u8rXku8$h^LF^Aa-#;M%HxxENfKLbuu|v>)xAl~8>|&0seFbB+C5+X{ zV667o>NR!%93L}=_NH*~3n1|cXra!*_Abiwr1#Admi!K7CFKrk4C0B z-PIIiQRojO?dFxE=J&~Jx+5%@be|K>yMxGMJ@Q_>`FYDKH!L7sR z2dXB2`p`>T+H~ElgL^{twTyGwfqU@p8q}{TcWomHFqA)xsXq*7Y>XP!4^liFdi5yn zLSmHa7Z<0(Db+ShxlY4Azc@@JQH0vUgp$!T>cccjc~r=}&J=CQ)7yUmlylb89>Gc) z&h!E*)ymt3kpL{%r!mtdehv3%^W`op5TQUVhGh=CaX0B zdSVSb#F6y5J=qb{R|L|ER)!MCL%k$nHOqqc1VM7K7(2qbHddx*`b|~$?j?2Sc5Mhz zcPB7Sg`)Lf-JyXi1`ZV?!FDhsOkYySJJ&#NPchmOLi-lh&-GVd7CS0$*Dt}HwV-wz zswBXDpV-4>+Iu5ni?QhUv2(27Qk-=G(uXu+`kLCngG&7cy*{v_)}iAGO8t^Qtu$~l@2VJV?J5#ggr?0mBs`HE+;3`u)8! zJ-MO1gbH?N6e=xO-hLZ}KDp7-pd$HTHjO63r21ct zt;LSdaI|BnctIHFT+CATzrP0i8Qw&r#(@OQEX^JVJUZ1jph9E*zii1YX_Z9H)i2@Q zxnW}J9Fx;jDr}AH|J*b*3`ZtJRpEsf_m6=r#T+ZYIx7Q!Oyf=?Zb{N7L*z`tK+g bHtuCF!cUT;O73K{@KmE#CTEW`I0N_(*wTIO diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Gcs.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Gcs.php deleted file mode 100644 index 5e15d8ff5f42..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Gcs.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - ' -¢ -\'google/cloud/dialogflow/cx/v3/gcs.protogoogle.cloud.dialogflow.cx.v3"" -GcsDestination -uri ( BàAB« -!com.google.cloud.dialogflow.cx.v3BGcsProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php deleted file mode 100644 index 26db1a820696..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php +++ /dev/null @@ -1,55 +0,0 @@ -internalAddGeneratedFile( - ' -Õ - -7google/cloud/dialogflow/cx/v3/generative_settings.protogoogle.cloud.dialogflow.cx.v33google/cloud/dialogflow/cx/v3/safety_settings.proto"È -GenerativeSettings -name ( ] -fallback_settings ( 2B.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsQ -generative_safety_settings ( 2-.google.cloud.dialogflow.cx.v3.SafetySettingsr -knowledge_connector_settings ( 2L.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - language_code ( K -llm_model_settings ( 2/.google.cloud.dialogflow.cx.v3.LlmModelSettingså -FallbackSettings -selected_prompt ( k -prompt_templates ( 2Q.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplateK -PromptTemplate - display_name (  - prompt_text (  -frozen (­ -KnowledgeConnectorSettings -business (  -agent (  -agent_identity (  -business_description (  - agent_scope ( # -disable_data_store_fallback (:êA~ -1dialogflow.googleapis.com/AgentGenerativeSettingsIprojects/{project}/locations/{location}/agents/{agent}/generativeSettings"6 -LlmModelSettings -model (  - prompt_text ( Bº -!com.google.cloud.dialogflow.cx.v3BGenerativeSettingsProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Generator.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Generator.php deleted file mode 100644 index 694ef91bbf394b2a911187132db32ddf8a0e45b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4119 zcmbtXPj4GV6vs{z#gp{kR!v=36FVz%8d9dZ8bI6K`gB#~UZXG0h=f&Aj*K_kQo+%-wrI zD?nG(HSFWiX1K1_o~f*b)gUB{IK)$HokjzPszcg=>)}vS)$*qLX!D7Bzx?3I6;P$5 z6FS&Xn}jqytUDg*)b+Y+d!*U$$d2xG_3cHy867}EO;|?Ax7(Nowu9BRN@)W#yKXbP zx+aWNSGbXCSsJOXbgNGnmk@G1o6-a=3DGW6;Vo_^E_*E?z`(Maz^ZUkfRO3~pW)EAy=oa#Cv*cw z!U~8QMiVnhC107n86V5dxeawT!e|%=KrX8+?BMk2sv2U}3H>F3n;YoKuj(PBnSon1 zeV=d^h))fp?^EBzQHm>`i+whl&Z>*OdI`7eZI^_jsXoSW+8i6?;VDs#*><<_r#vxpBUj^}0-tRVb%f8BiYH8|c?Ox;0WA zDVHO0O_ZJ1FFVcYYTJv23$ZmjaG^4Jh@<)|yqnr+@HkqvIFPZx#gsr8M=RdC9dG@2 zsY6IC8pkA7yc8>n765gmW6pZKnKTf&8Nq4;w~<8g+gJ@$tai6nYP`v>evDN7G*e~d2VKWJ;S#ZG|ot11tLJ%^=xWwD}O@Bjlo*! z6q<%W$`eZG&{=EHZfO!tSi+k8+A?7IV+N@_(KMrf9TR= zY><#X#@}=>Wy%tofRMrg5%s0_AesL$uPeuL;XFF&*?zMF$SlscU^)i?asgkWFc}5W zJhH>k(*)y37HzvAJw_Wj_$GTL+BXa#U>JP~So+*Bo-WoVL=+Zp$S1{o^rB2XK#zQU3d!h^*h4*p{skN@ BZjt~1 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php deleted file mode 100644 index 2561bbed81cec73d459fa951a4d7e50a3ead95f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1045 zcmbVL-Hww$6t-RUVlE7+8h)RbijCMpaV3qsPwAwlLoZF? zpr9PD7{M0+#S>@KkYbo}kBiSfOhUePMyg#Bh&LH9>iM-I!Ns1F1bC#F_s;U9u>#pV}jl)&hoR0diQEF7x zD<)&eVcG83wmLTIe{kQA#wOARy#dmtYqdw<;Wj|C zkU+X4bR<=3yWrk-+(PENj)tUa?LN4(9ej(BDecrAfVheD?+r54HriB;G%EuRFZ_absycw{qP4HqWmH{u~X)AwytycBkx9VQM zFuYtCUfvj9))w+a`Bkl#aaAn}~t+fP8 G0Dc2MK2Ajd diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Inline.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Inline.php deleted file mode 100644 index a8caca75d60b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Inline.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - ' -Ð -*google/cloud/dialogflow/cx/v3/inline.protogoogle.cloud.dialogflow.cx.v3") -InlineDestination -content ( BàA" - InlineSource -content ( B® -!com.google.cloud.dialogflow.cx.v3B InlineProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Intent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Intent.php deleted file mode 100644 index 88c10807b9ae6772dae96c11581119ea04bdf809..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5936 zcmb_g%X8bt88@ki#ie93D=CthdI}?UBC9gkNEuHG*G@qaRG3I2N2V3G!x77J@wRSPMuDt*B)}nJ?*KzX>#bHr~C;y<=b5V1ZiqWIrhPlu;26d zJ$HZnp?lz>x1~*D6VITeCGDR{^nggN=TN8VSkivC-6o#YbdFrpBAy~i#fr33sY!aV zT)P9TzSH%ZM3p*@)3HddX*u0iu4NjQ(`j4INv?UCJKo5dHYGMyxLAa25uvn!f^H9!qV*@(HlMOxy0-O=>!}#26}eldRmAgiJ2KMj)~;EB6DnOq|)4R)meJ`jU~4CF*raT)QNBgmyjq5x1KO zIFEj-4?#?G&AMjW4nx7QeO2xG)Dv+TW5F^ZGFRg%nZ#=4$$@cfI^NY-cS(>iV;ea< zA0QHzX_N7lZ#j0y>)N(ycj^_FW&72zic$aqpdY#PY<$%bE5~iy@DGRc@~nICgw+bm zF|E~#QmO>Sw-O}*ONn>U-`_#2<5wNNEoc>9p-QhpmFB5(ypdfBL>aCLMa*(SRBQJ8 zv4b`Xd}BX|d_Zt3M&JeE4UR_I$6^@Jz8#3MdV$J0QJ?~%w*n&GNT48dgoPqF40}*? zD9k+qzy*c;muWOD8VH_6ldKIbC#1wm3g1GrEz@@`qMkfKVG-N)Y+Ms7H z5j^=dNP};*chKEf(TK=HvG@wi#vEV;Of}#Enb#o@mgx%{XYdU)?U9zzq!4TfO7;Ot z#{o{Gi9>Q0Ibt~$u)P00FRkS6tWFM{9BbC%N-Z7%mB z{PjF%bihNP;y=%W$qaw9wqw(C`QHhIx4?QK*WV?->=K{i570Eg2^0awD;yLVkG5

4HLtT`TYnKY@hhDjUZpIpJA+WBvYES+WNV5b~7EMEWr6MK)l}N((+w=aASO z?UdX`^L^g@8}@s8JayJ9#n|qvh|0T$c^<6 zM+q6?qq5E9RJa)V*C-wP6MqjaZ|l38dZSXUl`A`qXFE@;dZAn@>&479)(&^|kM%+= zlgK7#5;%>n@9Nbpt)OR;IEAJ-Yi0s!8R&MjZ9OvyL+B>ZRCa5PLS?74RR-oMJcA}b z(e-L(I-iP)S^j+zEe^zFc*Upk_rB5OF^cg3Edu6kxMxtd0)!h5n`f=69T_wj6;DP0Kg>C$ z2x3ZH3YRUH5bAxxZ=t24R?`}#%I>yS8^~KoxBONmpGmO9`}k>P2h#OAnkYQo%S`0w z_?83-!so60y98Ps&>v*sVm}&u`vf39dAYzvdi`*Om!iPoHX7>w=vurSApCuHgyCO( zj*w`Ae3pXa<(-YDhD{EVT!vf004@%Frwlc}}ub`lXXdi!` zfL*7zOW;xaXN)!&ZrSw_0Q9j4kY)Ws3zn7N{`dcXOg_Z#vp0wrVt;uYElR7g1!*%s!#b~DEQ9F7>8CpKxMj;n2G=3B5GnHLJMj0BdZmZ|`iv*gDuLgJ&Y;oc% z8eF^3<^+^$qIkLGPvlnuSq&Bt{4ekzzBi2YAWnQm4}N~3VPX1OY=Piz=S*y}r&j(!DV2{E|F?tkM3a856#@ER^;#^fZfvWZ>;L~$e-P_oo=GC+DZuEM# WCLUa4@3WV_&2mcdhI)?95&9PNfvboB diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Page.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Page.php deleted file mode 100644 index 79d044246d23328e5bc6303f72d6e8d7a1b7f313..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5916 zcmdT|O>o>)5@sg0WB1re{8CFM1MDgjLyXsvzy_*N2$aTu34fVNyau*rYmlWkV-Z;r z(i{JfnhPiHaN@Rb*`m1Yd9QGxiUV-Vi32AtTq&RE_w=NZ$DYVzPV0kbM(Xa@-S6wK z`@L6Q3$_Bds;p6uh9;x7vbnFYEvf{e&wR^wmCa78MMK5%w*$wep{gj$ca*p9tSc+a zx7V+rYUFo9i|R_-_uDSjEZ6VYn(dgb-)_17u4e6NJBwOiwy7$N0(j;&jRMo6%38hl z7GXVKYbmDnbioe6x5`=*k3ROhL{G&F8|jE0`+ zHkN5*g-*cyu#Td--li-~Ab&FZtX!6xb6U!5?4zz9aq_0Z!Vb-@t|%d8ozS}>{N@I_ z>9@u)`7#2hVR)X;v*3G?uJ>Z{+L%l#f6KgRabz|(B{ZeL<%~cm@h4xsC|`*+k5ZN? zLDq~U%B0%Mk5=Pk){HoonpO%Xsj59%wbet6RCq!v2;$u`yMrWYaW z`(88jJB&8l_z^_ql5z%}UOX_KgDje2cMwI9iXBZ`PqpuI4ymsbC?wL&aXxYf6WweU)lxe>ImBpkZL3Cf&A9h zT;Gb@nD!v~+SL%D9+wiIU5yVF_=|sZ#aO`&;Ja@1w-Fdw<+v~a0y9KJW513N)qLx& z=fuPn)q0{;`Emp%(qBhPLKI3|5*J`Rq#t&iklJNlDdV_$2_1IWev|D7w0s61PSobH zd=89fU}kVuR)o?z>X7qr7RMRaiI^ydak2qZyqBcpChJQdDkv3M+D$rl?EQ6^vT4ig zxU9Kjx*du*=XLvdVmF}{b%Vbp=U@!uG%bep#X~(7nv=rBu+Xghw*Zq_2gyCC$bqhj zZXoX+A{d_5p$H}p_)WMJQfaQQG)IRn&FVKrm^@Ug(~?QY&^y7IX9$5&v5?qF$)js< zk%dmXO~XSmjSd?V(V@i55a-V(F989-iQ3fzL&+<@TaRUQc`Zqt=IO4YDC*YWe6lX~ ziA~?XFAzCVYg{`pW}rG4<#j24>#^E6jKxN(KNaD8KX)FJ%JSj%GoB>5Kwg9~K9+ba z?qRj34~!}(gT3IRyvN8iOkj_;MgNGCM+R)o&~VG7S8NS$Yp2~Bj*EQVcxy6Q{iFaF z-b4=JbQ|48lA;kKFTogcV=q(B2x3x59$o(hrd-o&chDBjHMYbW&ma%48R4NzKxh;J zkL-(&n17#oG3u-D!*s@zD8Q2nB?~ah1rvtOYxz73atY3RbT5XxTtUny)qlacH7Y_) zB7Gq{)zoC1d38aKkF)xD0j8HiibrJbMzX|dllc;i@W=(^N((0mJZ7&W&WYwy{S=-1 zM}UK8pL6jdyjlIJMMQ#$2BnTzqsa$MvDc-A%8^Eq9zLq?!t^qAu?J@}cDhZOf>E3e ztvF%h)gOvb89amV?nym!6NenZ2IK$tHBH`u$B#W$MCCEjv=)+WIR5yg9&^0qfGYIJ zV&SuK808xkk^dE7A}v;u*T+*ySre7#a(u}s#5_=aEoY%`Ly^7(fN%L4t1QS zZpz^>(&jSb;aoBm&dGUjPR@elKLt1|iGbwIe1{36a*{f%-hOC^!_pyF`8nyNj>?&J zuFDe*Jx(EciR+0bsXmdz8xM_AoXUC5Il}K+^-rW&7qmjYMelp0lk0s?bSUrNe`s9b zZqH}9M})Ap@R~#kUM!v}|1yq$V;nu6%8jEZn#6H*SQZyIeMp&$Gkz*hD|_D=mj@0r zKN|0CF&0F+rtR+T%IZsxxMqiK#h0?z@kr135qmyQyth>C>jGTClk%f$x`s!kHm&n} z(t6>a&&MQ`oc!^a-S+!#SI|4GaBDBvyutr{Q7kU6epP&GO8Q+<9p$qT_?-;gn diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php deleted file mode 100644 index 3043afcba424ee272ea898206b94a12bdd21b15f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2959 zcmbW3TXWi05XTLqF|2P`b`whL89B|2aiwsXD{qC8$K5giA5Zh5nb$G zitLPtwnG`!s44cn!GJiTMn|?`5=RonT2pK^yJEd|+}*~bF7+IZ$l{RFp-GCGNj<%& z8>&f%1Cw49wQ=#hRCI`IQ_CgFh`6pgBoa3OV5zuZs~QmxTa^>SR9$6i?~t>4RiD+X z#jIX++&eAp0cfV`x?($Io&-qv1w{O_y}oH^qRUi<{~jBzVps-4hVe6ow=WJ<(*I`pSO|QSbXH3S)N2Sfy_EOTlHQSBdDq-#`Rx8u|ge;Mq{%Na#^1|H$oB1x*ltGfC*QKqx56m zfnV3*>;IE!!d7rf;`u2}@>9~r(s?QW)zb~C@Ceh~!1Fl` zG&!g2W5QtHf?yiwM8R%hG389PbUGO1fYV>hNq>c)vd=jRFzEYRSR%>k=d<#nH1 z;_Ur7*>y|jEg*nYQh%3Ih;IPcrg|9&lUwHGZ{{So5Wp2d-fLJI8DpY{z!eVsc23}l zPvFGJ%^^Hw#3c3^wJsIrsFsV}o@aVa;3jHwn&?KfZV2;x2KukS#yg8%m_#2E6n#L^ zh@0F9V4iU95nC@GI5pW9&l`L=MHYv)9`p3R^mH~UD_mf4-uhiyG#wMav1zk6*B&-ND2k`6osM}ik~%oReKj?rsLUu z_40C0^Ou(2hwOAZ3%igWg_md8VLsFu@-JayMlsJrAh0%7t-@*?5Qd3r;ieaYKY>hK62b$>1Wm_t3?B2`LjIKim{f$&fwW78BWw~b z@>1BP%X7Z`2~6q)r2J2?7=FcU_=r2qon1yzRv_j3?sxL}G|FIJQS4h5%kRO*Gb;|| zS@w&XD3&+s6DLsUXrTg-#duED}a9ibMM4F diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php deleted file mode 100644 index f18a27eda7a7c0667da0a9af4c60949a99b97317..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2220 zcmbtV-EQMV6ed4Z-P1OtURZ^qYNy?z%}U^i1_|L(kmEQ%+9Zx*x7)5FjV8_{v2bn6 zo^(@C?|BTwB@cjj2qa!%uXzf_c7B?)yHdNkNaFFC?>pZ&=gj%xCvW7zGgPGx^$DYW z)Vo4#M3Lva%r#vb^~Qq%^^xgbc$Q6l5uvh%TAG2>a^2YDTLX9On^ZzW*B#olVA}4u zU+7!Jc83GoeN!+eh09_gAOp&-a6lQeoM9kF_y7*Mpn*qBimL5WlQPmLjC89JR96Y1 zy5%`kSDAEAi$?&aO@aXF5u`pvgkJ&ik2mhwmWcvJ82>r20&F=J;}F&_T--4l5Idk8 z;&$v{?3m1Q9TaZR9Fyi>pcpfZJ@8y^#xa`Z)(-vQ-gN5@qrOAzZkYzAZ+Xo1+dNc~ zhLp`+4Oj9nrnDiPH9+||M@hPsgyk^sRX&-pJ!a*hn=5ugpAMO?@cH^;FN{kc#{~FhPWsV(VU2v z#r@v_GRtQvFgWPb0U6s2_lV=rKK4dF2`IiG%pBo>g|#}o%B4{vpE;Dp_Y#Q9;9@(1 zYKBPq6sVMXD<^~oWR}>1Tmq%?8;9RM1Ya;<(&D^t_rvNCYgXWKju<|j zIkSYG`cU*W?!a65W8r7W@!q`f7|+}s`__%7&8ipd+Z&*wGDYOQzyTxwcm7R4W_ewB4eK-RDE-Xg2XMxH6*px=sbSsdgsN6G zZNpYu?ih8s5yx>o+}T%Jr#yX5mi|h>9-qMPKlak&*v(msaYf8+CtiOO-@CIr(!D4Q z-IW1NJd4k0bK>=m!mmG)$#Uh-_eCbS* hPK&)Y?izE8&*zimt9Z8E7=`Z~gHdEWtghi2;D6sm(N_Qf diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php deleted file mode 100644 index 2de2fda08bffcc077d2fc5f3f7fbe9f00968d9ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5496 zcmb_g&2!sC6vs|mnoVfkElu6Dp{gmme-D`A_-~T zB+d8$T$tg=f53qQHwOL&hT#Y^Fw+YhI>Ssa9Juww?&`yeEt5EqL!wCU{r0`z``EYp z##`2w1)k>$$UwG&QIl)zad-=HmTh8FHFd7hX|<5espht&>B#0eE?45#N;OW(6>Has zs$+I+6$xD1G}}5#tGd}~rkk3go9&iv?xfY-^!>%OgVc_#;XT+du-!r7)j7^a zxMLf)nB5eh8$8t`xDzd{E*geOSuhPp5PClKAciSsbqyJKG@ZPL^kxQaDfczg9!<4^ zyevAhkpcI_b7|Ycdq-a|P-Ol-YCJ0)zE?WDy35~RoWAIxDwam7i^j#Ro$0Hg4=qZ*-0;}<1TKXHY>#5^(`D}y zt3r~)X+%l%KKivBe00&b301B{>O(MHK)ApDD(K@5axi=woSV*H6X z59UIixvLY89G-NRbU#q)>lm0>w@52M{h$0bO5mK+-&5Fv6ANkHg&#sF-w&A?BNoD! z!9<6xC{sU^abo+#!n6 zq<=BHPC^I(dxgz=$ViS+o>QO2z?EoI9E&sn1aC)EHb(p$l`?n{oHfucmP1xh#>P|M zlgMRl^e>V7KPZWez8kVpU2)^6fSDZ9(eQlx?>YVFBuMn99-Iu93cLg+o0?*ZtlN7m@@E!AKTD%K$UwsL6(6bU0l`ghHUzJl7D}EV@jSEe z=JBy93KT&?GaL)4SjMEs=)~^iIL(wy{l*jVI!HBj%UdF72Srz*=E=hXINwBClT?w` z+UvobV=!}1#QF{JLIg}M&x8go|8O9uud*N1!YRJFA&iD zG^64eGG4`6f%^Cj$~ITNOM*^ry&B9?uV9XZ!6eK z`_ia>L>SAncXU0%LL_6t9b1s)-09RZmV0ZDN^S1if-Qe{=F$?I#?vXm|6 zi&8G}6dVU9SJzj>%|r}74aQc>i-|aWC>08cvFX>qR5Y6*4*J5!cBRv)GB`Kb5>nu~ zij)(xwPI;auGT7IO)A{!v*#i>@5;!V#oDr5l`0#>tdxkQZi6#DMAitdg3BSeY^f{_ z#mW_{?~oNs6|o>C;;9X4U0)?ZW?fBM`#0-mz@>_`TH26gF<+A^a<;U#Ayuj()gd-6 zgJ%ww5HYd5UMWa&POOP??aqLSQvl|Q;!3HIUnyl@wZhj=y^{kbmuA`YgaN8>}o7p-<| zcRq)nYeWB0V(B(Q3YPQ@(S-k%pb0QwNiC?pVn=z5A1RY3MQUXYtM!#+Dpsmo*BW=r*!a^dwX<~PKk6koD@~HPR%qt$$* zdfn`1*iFeALr9Q6AXp%mMRH1l>|wJAf*f+oDM$``O0pXuKrVa8X>tsZgAYOKeRT6f zBwMtNJ?tDjBKuXndiAP)_0|0Ri{?QSZX`CTMO&IntBL*NgnK{}&6e%jx@{)*+qD{P zC3L&dG)&q`CKB15L}90r$Yt}D>qzR@?UqhciMnmqO}eU^cDuS-H8j(%*G&6pRe!O1 zcyHCAj$_zXlJfmzyy-@&DQzpt5w+*h^cM&9q=!PAb(oQ-{Sc z!gbT2mOCEJhC$70h8}2#hTR&Ev_z%JoLR`h2CW&Q>R}AqRl{Dl zt(s9k`;mt5%A!G+(KaaZvnV&TH|Dv4{`AI7q>UPf^sVWQxx_dIG(=@Ztxn(gcxYWs z^Z>ezDDgJxEMJQW-uj@gLfug!EQBf{f>RQl}&?g_= zmyh_Kr(>oj@lACkz)7;Z0b~rtRGq_^r1)$!1q;5a!@!D>NwkurE2BwSh?grr9lf$H zQVhhM{`1@!O~`KCS9gFoO>}uF&L^X};#F{*P%#lo{% zF3Fhat0wn1@kIGm80OQKb3|JklvejO{W;0Q6ayTq9uFl#EAwlgBn9;lFG=>2Crg|* zGx6(mh&+Zl!AfmW&9SX`7&%7QQm@0Y#5oAQ%P^<6(RLfElyn05M)TaQ2%&q4)^0{p69Wn=z z%A?)wOj+G6#zN#gMCHfq&XYncto&~X-YvKH8;0Afof7^1Hg#N*f@x`0T*;Bl?O&(E zuhKW*dKU-@wIldANzBAoWl$n;vI} zAVAwkh|^eBm-gBErf&! zOm5^0_-9!8=Lxui*%Z|p2&%mjp+zDZeAdL4w!_!Z^en)C{Vz?IH>?6PNm1hlJClR6poeFbe1R(mCj36Nr%`*r(x|WKuJ* zJHqa$kHvHl3shMD4Lke}C&`C!6S-^8X-hS#C?+_Ss@pQ^b=soUIB=7|1ya~kDv9z14`I3LHfpC7!mi4R&jy|30mM0ZuPOxb zTo5t4j=qcXFTy+LJW4t8IzE8~%U0zf*~W;=@$*4c--kss$fk`cH*+G7ZZU}NBFyo| z8;gc6ec{HLi_Ks_xhiTU^*}RgDn@6A_E`Hu5aS=h-mTLtFw+$X+QWh{(b_MhaZi61GBP#;>D1x6LJCj4`-N^ zeH$K-34n`0CEBbayCpH0K~v+7#W8P&;3{71RuKy*PdUP50U}uS>>DOlX*@p&lTE}w zfpSN7t11G7fTW<5xXj6(AQi`TbS=q-W-@!%mY+P=|XwElrL5=v3M6Q=L%VMXG1MxU9yEqNTrg)1?xFXHU4KB z&i5z2s21ka>bJH zvS!KojWn_X(@pKzw6&_tnlF31`e6?Z1v^jV0|1`z^YooZt?1g&#h2l{zgTs28#BaN zyqyR}-C4ceYBBd?eFAP5k<5)(=>%LGUTd+gBtf24!{JHD5#2wq?dKvdBsbxThT-n` zTdInZg25j)IPjDW{70rB-@tiErXEnOiunRwKMSZC@5DnurSAfhPsHYr1QXO{>zF)* zIo5?ySsKEc|M7Wb9mxbGj*rE1l7*PB6;nIjXJ=!8AIaRoy8Tu9CMYA6BPmD`h-o&| z23of1_jlqKxmTRIOmb0CIL4G|NJ#wZ9K`ycAohT0{;{EHx4=g*ueq4o?zhpj zcqPohdw%Wfw<%aM?QOwAve3#O0AXoNt7(fGS!~YQDD!K-_f|J&og;snjsS-+?_CH_ zRvo+&X4lW&>gMu#iYy%#_p=GJ-CvR`*k$w7qY78#trVfAC72b)qc!X{#sYRb!mgBU znCsCixdzMWN~M&~>{bSbe(W+9cDHk-{5o$b;KvQ@KRha6vVgIE9TrY$iYRa`U%-5z zxU+?Q%bmiYJ_W$kR=$u+mtrC1#~}c2eB5J64x$~n62KA3+~pzR4y<4_)NPD7$JD}l zn@YX=4a%%H{Ui_I9QPRk87pVKAg)2hfM^$pye*LyVM?Hxz)i8$PbUC)wB;>6@&h=> z3mK6P1&Lk3pwHffyD4sM%)83xX@E|@YE5% zy$o|6TcKoDf=BRyr@71g%;RY8R7t>$Ez+0l3L_eptKfuY!7J6gNtOqOL0xgwU-zUO zdn_?8Nfi?#>~x4`1@XKVr%6dM*d-r#R?8&bYZ48WwLkx6oz>{t4UhSd6qx7VU8F46 zjlXv$Que+CX8oQ&iW=?xfc=CWWWw_49Rk4T^5-%M|6f5yd+bu;e^fuXzUCKVE5y6SlNWAxO5I_=+K_Qh&3yG9(M-p zP&9xJAY)-Q#cf3lPorx=Wf0$;)8m0;`4GnOq6`QO9A=ew0Xn$N9ttqxk}4lV#7Abt z#i^=MH(b$kjVH*r)tt0w#qu-tRefbnR?@(h-48Vfw*KM9-msa0%wo zc5U;JvVIJLI}e!=f(5a7V!2a+by*f*E}Jjq)+?&~DvZP81sw0Bw{w_YsT=t%%%L`86J!=<3Og!i8apRH zVgUpL~jh|2=|sff=l z93R|==>`LE6jYQQXM_8$7{=RAV*YuS@YjK|{|>>0jkbyDtJ!N6J8*%^By%2&35b1; z%ge>++Q$Jwp-0P{5W6ihq6r^9+YyIMdPNQs)F3=H6IXs2f{T5pl_u~TnqM=)ht97> zt9|@aJ%G!@f-vGamQ^iLsJZDYTf-9z}!KZGDYXc)j|{+K!L-O3^+`B0_$ zGwR3r+>^c;^-V~OTD-Bl#fI1K!}U?CGU;-DJr-uE(v4B;vbl})?p7r>vG!^XW@Ine zAwLbnZ1-`#S4`sIK9N%*fqN{+ps{!+FUA7bnINBGK$vwCOM z>xr|!u?cMPFXcM??j$9WLg9$1(4DWJDV4E!QR~oX*%oUQvpq(zCjTDBw}@y9D{g;w z(yfZ$oZfyR^!AUTG0)n4IBdoaI|x(bfug@HHICltZixH@A!e{fgZhsHsXUYXJiv^H z5DRou-dPEuXn!8Y*$|5}!obM*Aif;rO8o> zs}X+D%bB^wTu+1`L156c+Pkix_Zs_%1PM7+jLT^t4Bvi(vSVdrq*^3#BZEFYGU)dX15w21}*PwmHC%*a2;RZ z9E}bcoZ#?ZOBLB~j*6kLKNhVK@7-H`0km%Sy)KRdVieO~H1{8{fBqsI&TjlHe07um zqAJPf{mHEVi>l=Mi{#^b--WM>=cyE5kVap*aU7rT+@?H9$LSuBXzc{N*tg*p=_T#L+>@+z} z$kVejz~9`N;^#uhq4VKnbqMGEDdgnzQCvrR$A}(aHw)ah}=%(GOD|JIN?fr&nA1QiUIm{^p6Jpp_4O`Tp$2EHFV42$hz|xwS zIGT>pYI%7bQ?0I1t-8wLss#_OS`6W;g?4o(cMAaB)CfV_0=C3aD-0Bz0K`5{YtJ-v zM5spD&zwPOhGkHOVtmBbxP%&-Niai+$~Ib-PMN33Q`oe0JbwcTOiy;su^A^zC~&Xr z(ZndKu2~ejmS$FqnCPzIP}?mtQB~c?G$hx%Gk?Q3>%kcfG%tKq)rgZzh`KG@YaJmM z)0S)9;(mJoo$#s}Ltfr7s(H(@Jr-<>sA_jjU5F&bf@!c|4X3kWV6(oA541zWc862l z!hRwR>|}guRJ*w_xC3Dr8HuH)Lyt#Llp7L=u$6(d!1zA*L`fAUEh8M}&o*znI;8Kr( z>&MG~r1*~#%AXlIUH0kAz5;Iotb!Em@$RDq%_Mv%+-Wj)g+%7BGvH#R_~Aux#_J~2 zDU_NYUmkmsmtX@-_{Qx+?7BuB*P3=6PmeK?^NR&pxRJn>95Eq_^xE{X))|zrvkG3} zb_`6W&!DmSbBk~E!4^nf)AB(%Q074jz^D;82T*CFvR1iQ+uSK_ZLJkcwe?N*b$4UC zTq>-std)uvUV^h=CRQrYxsZa_z|~lh?Yrgjozgmcc0p1fN>B5jN#OOK;@6tyrXa?k3DMGUGayH zj1K&GL?hTbG+f(i3d=qJhO?jfGzDhv7=%WaPqy%fElemZfU}O~GCO`2=2#Z~lfMav z;_@OGcNjf2!sgYq#8UNT2m#=?sC^$>JblMApQON*ByWhrT0VvwV8W-hclHwI+#op` zStgtUuUfcGYdyYr{*7ne2bWiIl$U^({HfCPNf|1^GC#7_7F^7>DG|27FCiT?rl7sb;q1!j;7Spj z_&?ly{y;81IuBrkCjx(xz+`+j!`p$&@iR@1SM#$Xy)>e>D51>vsmFQ0rXT$J+vn03 zDOm9Kv?rp@m%^5m?df;fpv`5w4K91Cv+Y*k)-W(VO^YarsPG2~OvDu;RQs?HrxY;Q zZfBlAC`WvnUq^%$5+=!$)bPtY5k_=nQt{M8u77kWAO0(j*s&WBU?Mkp)@2ToeZtpCQ cc5>H0Bq&UIofDQov0(su8&Hw-a diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TestCase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TestCase.php deleted file mode 100644 index 2ece2d5dd16c9d9c83f8d637456867a5f61ee623..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12146 zcmcgyNo*VE6%MJz(ob#vy-{+U&|?Qy6q`&aCw1u9&Tx^$R0}Opa+9!_j)o&@Vrqt+ z8Om}E0Y%zN4^4qCC|dN?V|(ejDNwY%8O^0R6fg=ThoXm|m!dbH`u=S=+%%*u)CY^? z{O|qmz5l)ME%U!~r?y)|mtu>$soScnmt)%xWA3gVtJ#)oX;wA1UEkT!?U-im)r_ic z$78YVT5NT#7|Uhz#fw1dSan;|Q?ZI=RjPVIt6KGPqHL&DtFlwI9wfAb#QuE3)g4#S zR7a0f&Ip<6p6=9CO^+=W(kr^FmQ`0REm9_>3}I5rdQ3{0gVNUgO@y?n>Nv3?Fv|ch z^a#b^U#-4fHME%HsxJJwY&eQx8ZHnU-vNbg#dg%HqXTjK+MT+oxrSxN2*H}E>9eoK z7*DeHa?Jt*+=>aQ3dAO0k5b-rb=y>{rL68~wo!8}y8ug5sfzA;mL$K-zRI^H?2Mh* zER!*nY7_ES%(d&ffA?6-*4?^o-lTF928Z6KQU{yKHKQb(rbVn^nNBLz(5bRunVTCZuP4G7|Tmk_3?bnUjm zF-R_#J;+%Agr4<4fV1q&W z%*(z9I|Lh)Z4M56!L)CI%@KegdI;7hnp+ma8ij5@MY85~r;;;wWKxal{v$=Zk7QO(k>^ zDg2>G&)!3JLVFMoe8r2cUNAC*H<_m;d*flLdvRvI^52P;!(1=Lbcnl4a z#2*dCLbIdfo2yowXgD?i-=@)6*>GxA^`S!743IVHfiLAS9!Eov*mNg4Na=2)2&*S7 zbH}Je$Kl6F^3^y~po`zesSK0=Z=x3&J=742W|{lC?NCTkNWyiZLm*EinFwH*@evk* z4!?!QHCyM5z&uez1)C9kgze%UDiG}k@FJRmvc^@YOyFwusv8}nq}K##=U8MqffA54 zfGAb}O16>Yi&$n6h*T#I1zduf0G8ur5alCXbDhK^{^>ALwKN9HiAUn&VFG;JB&+D( zLt4d=!V7-!40tI0b^uKX)=ZL?bH0Njy18%ImbnM);JC@b&OMb&SI{fnrOh=+@YfOU za83iyc22^5xT%RxP4whGT)As#lxj~x0DOfw-w|h=`eEoR`3E61+g;NZ<9+iuPba~& zgcD;Q4y7N35TZM>U^tIX0rqJ3AvY^E)rRPV;?{u(B{BI18YI}ukL=P@Ifh>9t_P{c z2nhk!C=1^p5>hlte;h_rZPB!XP~FjOsO4*QmjXs4`F21&v@(fr0*5?dfWL)Kg9o~G zwW?5ORsduPW8#dFWV&C*Ta1@X;$w|+n)!VQjW+hXfrgmm%t326)OA2La=qf>@S zqEj#X4}=MNP6+CO39C);48qX(JkYmyE$hCbo9cE|FVjO9!57gq`$2I)T<}`cRaEF- z9y*2-Jpl$7nfb#2!tFZYd4zcu^NT_vCX(zb%6lkMHb~c~Lq{dh^mQTl5m2^XH?tlg z!^RtE68x=VS`PGf;0rreboj{K)5DN3zLW>?9W>?IMx_E`l!1_x1yt8a@|6HlSU-T@ zMq^st1|?k39UOXu?t3YKm^d`R)r6}bxC(?Ets9)^D21x|0Ac_bfAtUee&AvW4YP#G z^9dGAAl1fMr6~P9giex}Zn7XGmO=Mnjb+=3z~E`4kCVeF0t0*sPL#L0P`EQRkjiMp zTQH5zWb+FPO7ZvcM#!5^O3P2R}%~0g%ZH4m>60`lJ5x1 zbn`KfLhy+KUH-I0Wgb zxD1mhqbhwifL?5vo9;qeUg0r%0tWAfXhfy@6R<(K+2DL(s zb^Y6Qz*s$!;vtkCu7GaR0nJ-&;pxJ&l=oV5%orZ z(=~$D$MHjS+86!}maHLu+ zc0N5veeN>ur2{>QMoCenI54B9h8@CCDbSx>>%ML>KgO$QaNp1$(4;hx3`#^R=Z^LAT zyomvOL%%1Eu$LhM5$jBb%sV`Zj>9qT@aCGlE8-E?vk4jSd;)T9*5Gwgn_Nx2S!U^v zH@=P{b;?>HlQS+~d-Lzjnwdna2rueh{0J-E@Xx~fviy%j2t%bW9O1bc;&i70&9yJ( zP#-fIsfbQB3B`lr78+)ghaT~>p%s~FNoSh4iWh~_lMss1nDA|RECF#GrogwGfS~`- z`VdWbP>vh)Hafu!Dj+5(Behs`vjcNsS9}8v>$Yw20Z=44+XH!ZrV7=MtR=r^45 zhcQbJr7KV6%e^3ruj6Gyj}9F#ZW_XoqUXpVob>$=I-B3CS+*C3$Kov~(TR%YD0SPQ z-aQKG9)5yRB^@^qvBp?m!MZi+E;`pH1wU4(;209q$y>T-Yf1OoczUP#PRnUt?cp>@ zE@CHYp>g3lT@E#p>={3MIaKLaVRSZk@c%faO_*rFg#%^BviDS0H3!!hokfdhfzblx z17nTh9is{ZRQ9Gqx`mMM>3MW6D;H&DVQqayF1C~!F!D$*uccX~@!kfhdDG)`?&2CI zoy<$C=vh7J#h={Vvo(9p&P7SVAXVQG${28xb1HQ_|J;2b0~)u@6wRDVvi$L<+v$l+(FY zdLRAI$$#21@bz&I5EXq||JPG<$JH%g~h3#6@PsTZa6vq_!WZq)3l&>a3<2t|C3 zgM(T>-&!GZ&uA;80*uvxki+;IJ;OX+q)O2-V-Sk?z&oY24(9N`LTIw3490H;h}W`SXcgeA zhmYlCTY2mqV{0wmbcku`)-xWWLHi7HghbJniY-vlmi2up+D6L*v$bqICPj5xsuM-O z2%%H{8h{lr4i0)@-+@Lb9F*ESl5&r|+nmDFm_clBg-25c6xS#4Um+TsGBPRq0;92w zLTJ}tF)FS3)45QmUo;iEKw_Uccq~tMeKqhm`TbqjtvRVg;=zLlJTSdmL~7mLW!Jo~ z!DTI%bWm4=mN&LaLm6}tE+ZWs?rE>{ERfr5h0q6YFpL*>yx=xd#cH`I2ogehsU6g| zZ<7Ch9S&y~eiOd1Nbi)#GxR!R*1J<4&m6?J=D!MGWY1G6x*(Nmtbm`skxFgNZx7Q7 hasG;Twel*vt?j$qP2SKOT8E3>bS1lheTWVb`X8!^1_1y7 diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php deleted file mode 100644 index 98d785bf242c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php +++ /dev/null @@ -1,70 +0,0 @@ -internalAddGeneratedFile( - ' -ì -:google/cloud/dialogflow/cx/v3/transition_route_group.protogoogle.cloud.dialogflow.cx.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto(google/cloud/dialogflow/cx/v3/page.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"É -TransitionRouteGroup -name (  - display_name ( BàAI -transition_routes ( 2..google.cloud.dialogflow.cx.v3.TransitionRoute:¼êA¸ -.dialogflow.googleapis.com/TransitionRouteGrouprprojects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}eprojects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}*transitionRouteGroups2transitionRouteGroup"¨ - ListTransitionRouteGroupsRequestF -parent ( B6àAúA0.dialogflow.googleapis.com/TransitionRouteGroup - page_size ( - -page_token (  - language_code ( "’ -!ListTransitionRouteGroupsResponseT -transition_route_groups ( 23.google.cloud.dialogflow.cx.v3.TransitionRouteGroup -next_page_token ( "} -GetTransitionRouteGroupRequestD -name ( B6àAúA0 -.dialogflow.googleapis.com/TransitionRouteGroup - language_code ( "Ü -!CreateTransitionRouteGroupRequestF -parent ( B6àAúA0.dialogflow.googleapis.com/TransitionRouteGroupX -transition_route_group ( 23.google.cloud.dialogflow.cx.v3.TransitionRouteGroupBàA - language_code ( "Å -!UpdateTransitionRouteGroupRequestX -transition_route_group ( 23.google.cloud.dialogflow.cx.v3.TransitionRouteGroupBàA/ - update_mask ( 2.google.protobuf.FieldMask - language_code ( "x -!DeleteTransitionRouteGroupRequestD -name ( B6àAúA0 -.dialogflow.googleapis.com/TransitionRouteGroup -force (2Ý -TransitionRouteGroupsà -ListTransitionRouteGroups?.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest@.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse"¢ÚAparent‚Óä“’J/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroupsZDB/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups° -GetTransitionRouteGroup=.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest3.google.cloud.dialogflow.cx.v3.TransitionRouteGroup" ÚAname‚Óä“’J/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}ZDB/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}ÿ -CreateTransitionRouteGroup@.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest3.google.cloud.dialogflow.cx.v3.TransitionRouteGroup"éÚAparent,transition_route_group‚Óä“Â"J/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups:transition_route_groupZ\\"B/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups:transition_route_group² -UpdateTransitionRouteGroup@.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest3.google.cloud.dialogflow.cx.v3.TransitionRouteGroup"œÚA"transition_route_group,update_mask‚Óä“ð2a/v3/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}:transition_route_groupZs2Y/v3/{transition_route_group.name=projects/*/locations/*/agents/*/transitionRouteGroups/*}:transition_route_group™ -DeleteTransitionRouteGroup@.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.google.protobuf.Empty" ÚAname‚Óä“’*J/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}ZD*B/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}xÊAdialogflow.googleapis.comÒAYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB¼ -!com.google.cloud.dialogflow.cx.v3BTransitionRouteGroupProtoPZ1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb¢DFªGoogle.Cloud.Dialogflow.Cx.V3ê!Google::Cloud::Dialogflow::CX::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php deleted file mode 100644 index 620eda930c01ca29f4596fd33c6bf6f2ad387a84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1579 zcmbVMZEMp|6t>;gt!LegL1%p#+|7X)rn9N=WCEsd16 z$89N`+ef98qbSah+(St;#233G6yanT`MZoa1vs0Y7_&#u-7$}9uQzSmBy%fG6KUCf z_^}92{%>IXdRiy2K?~=D7MziAQrY~p0M};5!ke%X;dE217?d@Wnd@O4<7ge|sR#T`P;CTo-I?a%8IPCEbXOUH6(6{zYg5^omSPW2a+l2 zT%KQs#WZSgz~6zJmzNvdGJh48NfX&TVtlwco`b@LfWZ|g*lVfwQdRf4d437zo3GT@ z+yXsmge{k&wCTy=(%y|*{5u6 z$VQP_)xKq5gSg+{hhJNpnLhIdE%Wwq`k_n~Jvc58g5Uhn4qalA&M55e(#Pj)w$c2O zU2icD6qpAJ=N>53M?$;uJ-d;<7e$sJisu<5^hOlhm2QrCY~}v+>wlP<$^{SlqyMnX K)N0P)4B#hauHU=> diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Version.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Version.php deleted file mode 100644 index 49308def0b3dd347fd392a9a686444e1707f5839..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5015 zcmbtYyK~$`80XHhldLbV&C7O3kmXEbAC8pRKtPEJx`&Nt9NQB=hGcH$M%L|}mB^Bi zbhd-%C@3hPph!q>qPQ=H*`(cme%UkD)A-L-S8}%_=+SI7Nq%wWvN)0T^0KvPosHdoDyjB?+e%X+j_wrCBE=zGK*> z0trmt@D0oRUJnPLi`rl25|A@7!a4Qv;3o zsdPZfbk8d3j^olSxK5yH&6t`d4pYqA7IDJvbfzt0S8`nFQi)MK4IMuk6Ci?ywdbf*K$5$g^h4F&YqB_iiJdJwU z8@`CnEiLQI#q!Gh(qb_`J3U)0oP7)TqvMZO=I3YUXU?YZDRgpaC7&-A3ow?(2=z_t zvvcs=qkZ{W-{~OncojlK5aOVP;y9Y3FqqFMZ%jk?lw!?B_Dh5J%4xO7JB1944 z-6VQ*JiZPpA%B-b7h2j&SbT$=-Ea0Ib-Cl1DHhZ6H{j8V2m2w>@WP{nS=#2^nWe2& zXI9IUnpi3OC-%2iyh26JET9VoVv~Ko968^0gy&qN!VxM$JE}Q+16?z0=!UWjF!QYn zDYH%~iv=NIfu4|mN})@6*up{=>}`$*D6?h+q|9;J+9Dl52)WXGu;Y_SXF+JLYMb>%{yxt4JO?NHCVu%u>3RtQfA8l9zj=H9cvY0UgFy* zL-+QOn22*JpC1H_m~$uo%%Bq@iTIZk$|O4llij^{7(vZ_|=lG78^^m<+LRL8126Fz@ZzNlT z!I$=ajt)u52Ah#{tUyN%QL|yW(o$L4XlM42F@C>IxO?P9$RBj8#wpL;)mzpohQKHC z3JWl~8XSd5G`FGa@#a*yA5&-;9Qyx6ebd3ij# Y)k$0e(Nl_L9&iD~B%_O(25KPmA3uY;{Qv*} diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Webhook.php b/owl-bot-staging/DialogflowCx/v3/proto/src/GPBMetadata/Google/Cloud/Dialogflow/Cx/V3/Webhook.php deleted file mode 100644 index 61db3be66db319925013d29c210ff98dd101bae3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9112 zcmbtaOLN=S6%HxOk`85xh7_Bo6NjdqSXLaerJJ!s$B97_64~g%NVFVhn8FZvNg<{H z1_1S_tC>z_y6U2x>8jf-+fF;3F1qNVt86;cMbn+9i*%-|`~wQ!*xqi#wd4{piLJS$p4>V}y4xh#wk_AvtyXfY(`XPosard3qebj=GFe

cMKXHJ>eMrJLu*;hM$6jE==+)7+nGJGwQX5X(~K^F zsqGM_t?4AWRLQRpSF3BTR$F2uY6VK7R`f~K3j4Lq+xGzUmgYFgN1PNqgCzdf?rgOT zJ?Xfbi~n3V9Mv!l7tb0$MQQFQ8(PaDc=qVtM#t1$!!ncfz?!L(`I|{jlkUCVwov-} zNsp-tRR}7hRyJK?n_8<@B#v$yZP&6ZxHXq+64zHFU75cruBGIRMsl9>n9Chu@_y2_ zJ0y5}GHDaHW1IIF-;}_i|EqS4%H+0DlTFj2TChwfm+Q*ZB{Aq=p=A)$J=vK>gS6^- zvaRhJmVL6L>qNNB$V?vZ5H%#!Mq$YcaU88lM(4t}WwC=!j|w}*Q8a?G({>L|ag^z9 zMRT5>;_L=`iax+r%w^yCzz_~9*XzDNE@JG?`yNF7=?47s19X*Ir@IlJ z*7wu9w-XlyEv;=J2vCpW!Jc>{@Ss86M%@yABQ{(LY_NrMh(|vXj|QL$?q(jKBAQSa z5T~w)Qw(e{W;1nRXYu@U|8qhuDIR)2<{#!f@1VWJj@SB+JIpBjY3e_7Fd-mHnuaqJ z>EfYeXnsn%1k-iHX}7ckm92*9YJTinIV?Sb*(QZxLstM>5T9UV?~h1U5G#7e3zpe1nn-&ACR}5O zSRFThmQlRqQS@||_5w_b!6eGAZM8@}K8~9w6JN&Q{1J|E-&n^sxWc$<=3ugeA_O!R zj)x>%ZDTUnv+R0&4Czhf>FN`>?hqZJQ{5%DgMqC!EL-)CtNw{ub|U+&9C{(&f(3qN zM>EldY#{@>v6IHEm)T$hH#t3tz>H14=n%(Mw~1EARW#BV8fn>+{rK=0Y^3x$r&r?S z6w|d2q+f;LTCXGy6Q%#|Id=DFr@p&KIA_tak70(IAtb#HF|CF9oYYlaQ*~my4jOW7 zewsg4VcOC>b*-nwREb${TUa6p z)MVLb7S1}l)g~OvSV{^d?o#EkG$i*ss`MJn^aV&j%*4Aedkl<75g2<)4){jt9E|T$ zJ8%``!goW7--h6NkGTfmQ7@qe@%j zYAlTTaat}El#LCsGL~9`NFc<~H1S7DzO=UXky?FRQToUtv5l&{T9ns|ob=+d@<}R{sjh&GI z&K8wrrK-fnr70M%$kjqAb{17Ou~w;;*H$-T6Nx{E;DS(4Ux6V#fC=Gb!nramG;c!f zhFJG28UY@GoXs3pdU$+UMZ@kT%BtKK-^nIi4OGCqKJ%{^_K?b02Yrq;my>xWejR37 zmd<;$%ro!jVTNTi+{OMq^qOT{5SidGKLr!wcWMu2mkq}impCHSr1#(~f-B}Rp{<)t zTi2u!_&g6&ZM<4_uxDlgIWD2`*b)N`juj~b=6WyY#kX`9CIxQ}-c5_4w?;#A=_1US zWZ%WY3~%RGF-S};)7sDz(Ub5_u$s;b`9`oq3ahEPf=zI~A(ZA(dc%km%pvI+zoZrNG$x@2K85i9m4m90iqwygoFWYEh zaW2lV@^UKw<_kFm$-!}0W)~oVIRMwzOg^t+MI$A95zcvJ$u13?sJQP{h}7Mk26jwM z1Iyg={_?q&W;Q$2S#_&U;xqIC_HMC8r`0f8tsN?kVKyw$4~^Ji32#gMRgfX`xTR;u%;Gs3hNH*1c$9`wh>Ms0Pz$4W?r6OfT)EbZ=kkSUMTVzN*bbQ zMys`pf_DqZNcMuqrSA%iPU7bwnDI#qK6(mKlsQm|MzSj&q0#&zAntK;u;TF^TpZ*+ z2$xuS+k8S4mM{_TXiXePcMx4Df`;=GFplE}`ylnFahUOSEi&&Dm-CfJN=Du3;ToP;Zb z69k1fOa$Gt^o<1r@8M?`ack+7#4p1z8;D+CaSxyicf2S%Dco&Cbcdis{nq_eg=6DruB|Z3si0)7SAJD=m=U-SD2CtFomVY4$nv2wSF)}H6Al* zoOJCl?EUo^OnQGvn-KNkkCWvP_`ylZcA<}5^7}BH^FfHN9Fd5F8xBcr90uZ`wa)7& zipb;iwGm+@cyuT_9TBjXlkQ&|l&JKkhkZP_27oBeGoqh&Fyr9+z!ny6-Uv7K5Td?V zoZuU9xgxL2*fc8ZDt4OH{st8LKxL&;eas!Fyt*kbmy6gwqDL*3mzS~k9ZUTe$0@c?Yu{J*i^J0DG3hKf#Fl}JyV~N3BT*ibOMG>5pd6r1niEn4rh_#A zw%fCY+3vV%Z-vSI;tE{wlV0z0deM{=hgdhUsyw04fCy**Ith~^X*kl~LwISRbCj|} zbP?Pv3d+Ro6P@8%B(?Zl7R~9G|Nh@^!gr*1={wBY1IeK=VRF3*{c~%H;E6~m|VM^Ki%yq=` z^hs^f73wP#s;BoIDpb#IPpG3o&Rz@mdC&qk!AZGI?Egc)G_ZX6Mt)2O`A#mA+1uL_ zap@1C==%}=HO4#m%F(5%^475J-K+9{48v7?{q_CPo}U)rQlVc*R6?KrkXOy#`$~L$ z*0lOQ20;cf_VxYt);;>aufpNt;_t$*FR^bw(gphMN4n^L`;ji}r#EkZ7rx4$=W=XA zF4x_GOP}O&xJUlk2_}Od`=B#qG)GOwzEr_!od5eUBPNizD1IGoon@`Z?Hm4U_FMe3 Uj=)zS1HS-aJNcIyhj0k+eFlow->Page->Fulfillment/Parameter. - * - * Generated from protobuf message google.cloud.dialogflow.cx.v3.AdvancedSettings - */ -class AdvancedSettings extends \Google\Protobuf\Internal\Message -{ - /** - * If present, incoming audio is exported by Dialogflow to the configured - * Google Cloud Storage destination. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GcsDestination audio_export_gcs_destination = 2; - */ - protected $audio_export_gcs_destination = null; - /** - * Settings for speech to text detection. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - Page level - * - Parameter level - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettings speech_settings = 3; - */ - protected $speech_settings = null; - /** - * Settings for DTMF. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - Page level - * - Parameter level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettings dtmf_settings = 5; - */ - protected $dtmf_settings = null; - /** - * Settings for logging. - * Settings for Dialogflow History, Contact Center messages, StackDriver logs, - * and speech logging. - * Exposed at the following levels: - * - Agent level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; - */ - protected $logging_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\GcsDestination $audio_export_gcs_destination - * If present, incoming audio is exported by Dialogflow to the configured - * Google Cloud Storage destination. - * Exposed at the following levels: - * - Agent level - * - Flow level - * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\SpeechSettings $speech_settings - * Settings for speech to text detection. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - Page level - * - Parameter level - * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\DtmfSettings $dtmf_settings - * Settings for DTMF. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - Page level - * - Parameter level. - * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\LoggingSettings $logging_settings - * Settings for logging. - * Settings for Dialogflow History, Contact Center messages, StackDriver logs, - * and speech logging. - * Exposed at the following levels: - * - Agent level. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::initOnce(); - parent::__construct($data); - } - - /** - * If present, incoming audio is exported by Dialogflow to the configured - * Google Cloud Storage destination. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GcsDestination audio_export_gcs_destination = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\GcsDestination|null - */ - public function getAudioExportGcsDestination() - { - return $this->audio_export_gcs_destination; - } - - public function hasAudioExportGcsDestination() - { - return isset($this->audio_export_gcs_destination); - } - - public function clearAudioExportGcsDestination() - { - unset($this->audio_export_gcs_destination); - } - - /** - * If present, incoming audio is exported by Dialogflow to the configured - * Google Cloud Storage destination. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GcsDestination audio_export_gcs_destination = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\GcsDestination $var - * @return $this - */ - public function setAudioExportGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\GcsDestination::class); - $this->audio_export_gcs_destination = $var; - - return $this; - } - - /** - * Settings for speech to text detection. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - Page level - * - Parameter level - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettings speech_settings = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\SpeechSettings|null - */ - public function getSpeechSettings() - { - return $this->speech_settings; - } - - public function hasSpeechSettings() - { - return isset($this->speech_settings); - } - - public function clearSpeechSettings() - { - unset($this->speech_settings); - } - - /** - * Settings for speech to text detection. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - Page level - * - Parameter level - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettings speech_settings = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\SpeechSettings $var - * @return $this - */ - public function setSpeechSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\SpeechSettings::class); - $this->speech_settings = $var; - - return $this; - } - - /** - * Settings for DTMF. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - Page level - * - Parameter level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettings dtmf_settings = 5; - * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\DtmfSettings|null - */ - public function getDtmfSettings() - { - return $this->dtmf_settings; - } - - public function hasDtmfSettings() - { - return isset($this->dtmf_settings); - } - - public function clearDtmfSettings() - { - unset($this->dtmf_settings); - } - - /** - * Settings for DTMF. - * Exposed at the following levels: - * - Agent level - * - Flow level - * - Page level - * - Parameter level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettings dtmf_settings = 5; - * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\DtmfSettings $var - * @return $this - */ - public function setDtmfSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\DtmfSettings::class); - $this->dtmf_settings = $var; - - return $this; - } - - /** - * Settings for logging. - * Settings for Dialogflow History, Contact Center messages, StackDriver logs, - * and speech logging. - * Exposed at the following levels: - * - Agent level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; - * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\LoggingSettings|null - */ - public function getLoggingSettings() - { - return $this->logging_settings; - } - - public function hasLoggingSettings() - { - return isset($this->logging_settings); - } - - public function clearLoggingSettings() - { - unset($this->logging_settings); - } - - /** - * Settings for logging. - * Settings for Dialogflow History, Contact Center messages, StackDriver logs, - * and speech logging. - * Exposed at the following levels: - * - Agent level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; - * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\LoggingSettings $var - * @return $this - */ - public function setLoggingSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings\LoggingSettings::class); - $this->logging_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/DtmfSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/DtmfSettings.php deleted file mode 100644 index a5a325d168dd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/DtmfSettings.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettings - */ -class DtmfSettings extends \Google\Protobuf\Internal\Message -{ - /** - * If true, incoming audio is processed for DTMF (dual tone multi frequency) - * events. For example, if the caller presses a button on their telephone - * keypad and DTMF processing is enabled, Dialogflow will detect the - * event (e.g. a "3" was pressed) in the incoming audio and pass the event - * to the bot to drive business logic (e.g. when 3 is pressed, return the - * account balance). - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - /** - * Max length of DTMF digits. - * - * Generated from protobuf field int32 max_digits = 2; - */ - protected $max_digits = 0; - /** - * The digit that terminates a DTMF digit sequence. - * - * Generated from protobuf field string finish_digit = 3; - */ - protected $finish_digit = ''; - /** - * Interdigit timeout setting for matching dtmf input to regex. - * - * Generated from protobuf field .google.protobuf.Duration interdigit_timeout_duration = 6; - */ - protected $interdigit_timeout_duration = null; - /** - * Endpoint timeout setting for matching dtmf input to regex. - * - * Generated from protobuf field .google.protobuf.Duration endpointing_timeout_duration = 7; - */ - protected $endpointing_timeout_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * If true, incoming audio is processed for DTMF (dual tone multi frequency) - * events. For example, if the caller presses a button on their telephone - * keypad and DTMF processing is enabled, Dialogflow will detect the - * event (e.g. a "3" was pressed) in the incoming audio and pass the event - * to the bot to drive business logic (e.g. when 3 is pressed, return the - * account balance). - * @type int $max_digits - * Max length of DTMF digits. - * @type string $finish_digit - * The digit that terminates a DTMF digit sequence. - * @type \Google\Protobuf\Duration $interdigit_timeout_duration - * Interdigit timeout setting for matching dtmf input to regex. - * @type \Google\Protobuf\Duration $endpointing_timeout_duration - * Endpoint timeout setting for matching dtmf input to regex. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::initOnce(); - parent::__construct($data); - } - - /** - * If true, incoming audio is processed for DTMF (dual tone multi frequency) - * events. For example, if the caller presses a button on their telephone - * keypad and DTMF processing is enabled, Dialogflow will detect the - * event (e.g. a "3" was pressed) in the incoming audio and pass the event - * to the bot to drive business logic (e.g. when 3 is pressed, return the - * account balance). - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * If true, incoming audio is processed for DTMF (dual tone multi frequency) - * events. For example, if the caller presses a button on their telephone - * keypad and DTMF processing is enabled, Dialogflow will detect the - * event (e.g. a "3" was pressed) in the incoming audio and pass the event - * to the bot to drive business logic (e.g. when 3 is pressed, return the - * account balance). - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Max length of DTMF digits. - * - * Generated from protobuf field int32 max_digits = 2; - * @return int - */ - public function getMaxDigits() - { - return $this->max_digits; - } - - /** - * Max length of DTMF digits. - * - * Generated from protobuf field int32 max_digits = 2; - * @param int $var - * @return $this - */ - public function setMaxDigits($var) - { - GPBUtil::checkInt32($var); - $this->max_digits = $var; - - return $this; - } - - /** - * The digit that terminates a DTMF digit sequence. - * - * Generated from protobuf field string finish_digit = 3; - * @return string - */ - public function getFinishDigit() - { - return $this->finish_digit; - } - - /** - * The digit that terminates a DTMF digit sequence. - * - * Generated from protobuf field string finish_digit = 3; - * @param string $var - * @return $this - */ - public function setFinishDigit($var) - { - GPBUtil::checkString($var, True); - $this->finish_digit = $var; - - return $this; - } - - /** - * Interdigit timeout setting for matching dtmf input to regex. - * - * Generated from protobuf field .google.protobuf.Duration interdigit_timeout_duration = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getInterdigitTimeoutDuration() - { - return $this->interdigit_timeout_duration; - } - - public function hasInterdigitTimeoutDuration() - { - return isset($this->interdigit_timeout_duration); - } - - public function clearInterdigitTimeoutDuration() - { - unset($this->interdigit_timeout_duration); - } - - /** - * Interdigit timeout setting for matching dtmf input to regex. - * - * Generated from protobuf field .google.protobuf.Duration interdigit_timeout_duration = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setInterdigitTimeoutDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->interdigit_timeout_duration = $var; - - return $this; - } - - /** - * Endpoint timeout setting for matching dtmf input to regex. - * - * Generated from protobuf field .google.protobuf.Duration endpointing_timeout_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getEndpointingTimeoutDuration() - { - return $this->endpointing_timeout_duration; - } - - public function hasEndpointingTimeoutDuration() - { - return isset($this->endpointing_timeout_duration); - } - - public function clearEndpointingTimeoutDuration() - { - unset($this->endpointing_timeout_duration); - } - - /** - * Endpoint timeout setting for matching dtmf input to regex. - * - * Generated from protobuf field .google.protobuf.Duration endpointing_timeout_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndpointingTimeoutDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->endpointing_timeout_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DtmfSettings::class, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings_DtmfSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/LoggingSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/LoggingSettings.php deleted file mode 100644 index 255120078da7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/LoggingSettings.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings - */ -class LoggingSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Enables Google Cloud Logging. - * - * Generated from protobuf field bool enable_stackdriver_logging = 2; - */ - protected $enable_stackdriver_logging = false; - /** - * Enables DF Interaction logging. - * - * Generated from protobuf field bool enable_interaction_logging = 3; - */ - protected $enable_interaction_logging = false; - /** - * Enables consent-based end-user input redaction, if true, a pre-defined - * session parameter `$session.params.conversation-redaction` will be - * used to determine if the utterance should be redacted. - * - * Generated from protobuf field bool enable_consent_based_redaction = 4; - */ - protected $enable_consent_based_redaction = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_stackdriver_logging - * Enables Google Cloud Logging. - * @type bool $enable_interaction_logging - * Enables DF Interaction logging. - * @type bool $enable_consent_based_redaction - * Enables consent-based end-user input redaction, if true, a pre-defined - * session parameter `$session.params.conversation-redaction` will be - * used to determine if the utterance should be redacted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::initOnce(); - parent::__construct($data); - } - - /** - * Enables Google Cloud Logging. - * - * Generated from protobuf field bool enable_stackdriver_logging = 2; - * @return bool - */ - public function getEnableStackdriverLogging() - { - return $this->enable_stackdriver_logging; - } - - /** - * Enables Google Cloud Logging. - * - * Generated from protobuf field bool enable_stackdriver_logging = 2; - * @param bool $var - * @return $this - */ - public function setEnableStackdriverLogging($var) - { - GPBUtil::checkBool($var); - $this->enable_stackdriver_logging = $var; - - return $this; - } - - /** - * Enables DF Interaction logging. - * - * Generated from protobuf field bool enable_interaction_logging = 3; - * @return bool - */ - public function getEnableInteractionLogging() - { - return $this->enable_interaction_logging; - } - - /** - * Enables DF Interaction logging. - * - * Generated from protobuf field bool enable_interaction_logging = 3; - * @param bool $var - * @return $this - */ - public function setEnableInteractionLogging($var) - { - GPBUtil::checkBool($var); - $this->enable_interaction_logging = $var; - - return $this; - } - - /** - * Enables consent-based end-user input redaction, if true, a pre-defined - * session parameter `$session.params.conversation-redaction` will be - * used to determine if the utterance should be redacted. - * - * Generated from protobuf field bool enable_consent_based_redaction = 4; - * @return bool - */ - public function getEnableConsentBasedRedaction() - { - return $this->enable_consent_based_redaction; - } - - /** - * Enables consent-based end-user input redaction, if true, a pre-defined - * session parameter `$session.params.conversation-redaction` will be - * used to determine if the utterance should be redacted. - * - * Generated from protobuf field bool enable_consent_based_redaction = 4; - * @param bool $var - * @return $this - */ - public function setEnableConsentBasedRedaction($var) - { - GPBUtil::checkBool($var); - $this->enable_consent_based_redaction = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LoggingSettings::class, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings_LoggingSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/SpeechSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/SpeechSettings.php deleted file mode 100644 index af106f9418f1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AdvancedSettings/SpeechSettings.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.dialogflow.cx.v3.AdvancedSettings.SpeechSettings - */ -class SpeechSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Sensitivity of the speech model that detects the end of speech. - * Scale from 0 to 100. - * - * Generated from protobuf field int32 endpointer_sensitivity = 1; - */ - protected $endpointer_sensitivity = 0; - /** - * Timeout before detecting no speech. - * - * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 2; - */ - protected $no_speech_timeout = null; - /** - * Use timeout based endpointing, interpreting endpointer sensitivity as - * seconds of timeout value. - * - * Generated from protobuf field bool use_timeout_based_endpointing = 3; - */ - protected $use_timeout_based_endpointing = false; - /** - * Mapping from language to Speech-to-Text model. The mapped Speech-to-Text - * model will be selected for requests from its corresponding language. - * For more information, see - * [Speech - * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). - * - * Generated from protobuf field map models = 5; - */ - private $models; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $endpointer_sensitivity - * Sensitivity of the speech model that detects the end of speech. - * Scale from 0 to 100. - * @type \Google\Protobuf\Duration $no_speech_timeout - * Timeout before detecting no speech. - * @type bool $use_timeout_based_endpointing - * Use timeout based endpointing, interpreting endpointer sensitivity as - * seconds of timeout value. - * @type array|\Google\Protobuf\Internal\MapField $models - * Mapping from language to Speech-to-Text model. The mapped Speech-to-Text - * model will be selected for requests from its corresponding language. - * For more information, see - * [Speech - * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::initOnce(); - parent::__construct($data); - } - - /** - * Sensitivity of the speech model that detects the end of speech. - * Scale from 0 to 100. - * - * Generated from protobuf field int32 endpointer_sensitivity = 1; - * @return int - */ - public function getEndpointerSensitivity() - { - return $this->endpointer_sensitivity; - } - - /** - * Sensitivity of the speech model that detects the end of speech. - * Scale from 0 to 100. - * - * Generated from protobuf field int32 endpointer_sensitivity = 1; - * @param int $var - * @return $this - */ - public function setEndpointerSensitivity($var) - { - GPBUtil::checkInt32($var); - $this->endpointer_sensitivity = $var; - - return $this; - } - - /** - * Timeout before detecting no speech. - * - * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getNoSpeechTimeout() - { - return $this->no_speech_timeout; - } - - public function hasNoSpeechTimeout() - { - return isset($this->no_speech_timeout); - } - - public function clearNoSpeechTimeout() - { - unset($this->no_speech_timeout); - } - - /** - * Timeout before detecting no speech. - * - * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setNoSpeechTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->no_speech_timeout = $var; - - return $this; - } - - /** - * Use timeout based endpointing, interpreting endpointer sensitivity as - * seconds of timeout value. - * - * Generated from protobuf field bool use_timeout_based_endpointing = 3; - * @return bool - */ - public function getUseTimeoutBasedEndpointing() - { - return $this->use_timeout_based_endpointing; - } - - /** - * Use timeout based endpointing, interpreting endpointer sensitivity as - * seconds of timeout value. - * - * Generated from protobuf field bool use_timeout_based_endpointing = 3; - * @param bool $var - * @return $this - */ - public function setUseTimeoutBasedEndpointing($var) - { - GPBUtil::checkBool($var); - $this->use_timeout_based_endpointing = $var; - - return $this; - } - - /** - * Mapping from language to Speech-to-Text model. The mapped Speech-to-Text - * model will be selected for requests from its corresponding language. - * For more information, see - * [Speech - * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). - * - * Generated from protobuf field map models = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getModels() - { - return $this->models; - } - - /** - * Mapping from language to Speech-to-Text model. The mapped Speech-to-Text - * model will be selected for requests from its corresponding language. - * For more information, see - * [Speech - * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). - * - * Generated from protobuf field map models = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setModels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->models = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpeechSettings::class, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings_SpeechSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent.php deleted file mode 100644 index 8bcccac73104..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent.php +++ /dev/null @@ -1,1141 +0,0 @@ -google.cloud.dialogflow.cx.v3.Agent - */ -class Agent extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the agent. - * Required for the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] - * method. - * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent] - * populates the name automatically. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the agent, unique within the location. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Required. Immutable. The default language of the agent as a language tag. - * See [Language - * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] - * method. - * - * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $default_language_code = ''; - /** - * The list of all languages supported by the agent (except for the - * `default_language_code`). - * - * Generated from protobuf field repeated string supported_language_codes = 4; - */ - private $supported_language_codes; - /** - * Required. The time zone of the 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 = ''; - /** - * The description of the agent. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * - * Generated from protobuf field string description = 6; - */ - protected $description = ''; - /** - * 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; - */ - protected $avatar_uri = ''; - /** - * Speech recognition related settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechToTextSettings speech_to_text_settings = 13; - */ - protected $speech_to_text_settings = null; - /** - * Name of the - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] - * reference for the agent. Format: - * `projects//locations//securitySettings/`. - * - * Generated from protobuf field string security_settings = 17 [(.google.api.resource_reference) = { - */ - protected $security_settings = ''; - /** - * Indicates if stackdriver logging is enabled for the agent. - * Please use - * [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings] - * instead. - * - * Generated from protobuf field bool enable_stackdriver_logging = 18 [deprecated = true]; - * @deprecated - */ - protected $enable_stackdriver_logging = false; - /** - * Indicates if automatic spell correction is enabled in detect intent - * requests. - * - * Generated from protobuf field bool enable_spell_correction = 20; - */ - protected $enable_spell_correction = false; - /** - * Optional. Enable training multi-lingual models for this agent. These models - * will be trained on all the languages supported by the agent. - * - * Generated from protobuf field bool enable_multi_language_training = 40 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_multi_language_training = false; - /** - * Indicates whether the agent is locked for changes. If the agent is locked, - * modifications to the agent will be rejected except for [RestoreAgent][]. - * - * Generated from protobuf field bool locked = 27; - */ - protected $locked = false; - /** - * Hierarchical advanced settings for this agent. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; - */ - protected $advanced_settings = null; - /** - * Git integration settings for this agent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings git_integration_settings = 30; - */ - protected $git_integration_settings = null; - /** - * Settings on instructing the speech synthesizer on how to generate the - * output audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TextToSpeechSettings text_to_speech_settings = 31; - */ - protected $text_to_speech_settings = null; - /** - * Gen App Builder-related agent-level settings. - * - * Generated from protobuf field optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; - */ - protected $gen_app_builder_settings = null; - /** - * Optional. Answer feedback collection settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $answer_feedback_settings = null; - /** - * Optional. Settings for end user personalization. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings personalization_settings = 42 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $personalization_settings = null; - /** - * Optional. Settings for custom client certificates. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings client_certificate_settings = 43 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $client_certificate_settings = null; - /** - * Optional. Output only. A read only boolean field reflecting Zone Separation - * status of the agent. - * - * Generated from protobuf field optional bool satisfies_pzs = 45 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - /** - * Optional. Output only. A read only boolean field reflecting Zone Isolation - * status of the agent. - * - * Generated from protobuf field optional bool satisfies_pzi = 46 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = null; - protected $session_entry_resource; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the agent. - * Required for the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] - * method. - * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent] - * populates the name automatically. - * Format: `projects//locations//agents/`. - * @type string $display_name - * Required. The human-readable name of the agent, unique within the location. - * @type string $default_language_code - * Required. Immutable. The default language of the agent as a language tag. - * See [Language - * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] - * method. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_language_codes - * The list of all languages supported by the agent (except for the - * `default_language_code`). - * @type string $time_zone - * Required. The time zone of the agent from the [time zone - * database](https://www.iana.org/time-zones), e.g., America/New_York, - * Europe/Paris. - * @type string $description - * The description of the agent. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * @type string $avatar_uri - * 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 \Google\Cloud\Dialogflow\Cx\V3\SpeechToTextSettings $speech_to_text_settings - * Speech recognition related settings. - * @type string $start_flow - * Name of the start flow in this agent. A start flow will be automatically - * created when the agent is created, and can only be deleted by deleting - * the agent. - * Format: - * `projects//locations//agents//flows/`. - * Currently only the default start flow with id - * "00000000-0000-0000-0000-000000000000" is allowed. - * @type string $start_playbook - * Name of the start playbook in this agent. A start playbook will be - * automatically created when the agent is created, and can only be deleted - * by deleting the agent. - * Format: - * `projects//locations//agents//playbooks/`. - * Currently only the - * default playbook with id - * "00000000-0000-0000-0000-000000000000" is allowed. - * @type string $security_settings - * Name of the - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] - * reference for the agent. Format: - * `projects//locations//securitySettings/`. - * @type bool $enable_stackdriver_logging - * Indicates if stackdriver logging is enabled for the agent. - * Please use - * [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings] - * instead. - * @type bool $enable_spell_correction - * Indicates if automatic spell correction is enabled in detect intent - * requests. - * @type bool $enable_multi_language_training - * Optional. Enable training multi-lingual models for this agent. These models - * will be trained on all the languages supported by the agent. - * @type bool $locked - * Indicates whether the agent is locked for changes. If the agent is locked, - * modifications to the agent will be rejected except for [RestoreAgent][]. - * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings - * Hierarchical advanced settings for this agent. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings $git_integration_settings - * Git integration settings for this agent. - * @type \Google\Cloud\Dialogflow\Cx\V3\TextToSpeechSettings $text_to_speech_settings - * Settings on instructing the speech synthesizer on how to generate the - * output audio content. - * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\GenAppBuilderSettings $gen_app_builder_settings - * Gen App Builder-related agent-level settings. - * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\AnswerFeedbackSettings $answer_feedback_settings - * Optional. Answer feedback collection settings. - * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\PersonalizationSettings $personalization_settings - * Optional. Settings for end user personalization. - * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\ClientCertificateSettings $client_certificate_settings - * Optional. Settings for custom client certificates. - * @type bool $satisfies_pzs - * Optional. Output only. A read only boolean field reflecting Zone Separation - * status of the agent. - * @type bool $satisfies_pzi - * Optional. Output only. A read only boolean field reflecting Zone Isolation - * status of the agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the agent. - * Required for the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] - * method. - * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent] - * populates the name automatically. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the agent. - * Required for the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] - * method. - * [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent] - * populates the name automatically. - * Format: `projects//locations//agents/`. - * - * 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 human-readable name of the agent, unique within the location. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the agent, unique within the location. - * - * 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. Immutable. The default language of the agent as a language tag. - * See [Language - * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] - * method. - * - * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getDefaultLanguageCode() - { - return $this->default_language_code; - } - - /** - * Required. Immutable. The default language of the agent as a language tag. - * See [Language - * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] - * method. - * - * Generated from protobuf field string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setDefaultLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->default_language_code = $var; - - return $this; - } - - /** - * The list of all languages supported by the agent (except for the - * `default_language_code`). - * - * Generated from protobuf field repeated string supported_language_codes = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedLanguageCodes() - { - return $this->supported_language_codes; - } - - /** - * The list of all languages supported by the agent (except for the - * `default_language_code`). - * - * Generated from protobuf field repeated string supported_language_codes = 4; - * @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 the 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 the 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; - } - - /** - * The description of the agent. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * - * Generated from protobuf field string description = 6; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the agent. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * - * Generated from protobuf field string description = 6; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * 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; - * @return string - */ - public function getAvatarUri() - { - return $this->avatar_uri; - } - - /** - * 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; - * @param string $var - * @return $this - */ - public function setAvatarUri($var) - { - GPBUtil::checkString($var, True); - $this->avatar_uri = $var; - - return $this; - } - - /** - * Speech recognition related settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechToTextSettings speech_to_text_settings = 13; - * @return \Google\Cloud\Dialogflow\Cx\V3\SpeechToTextSettings|null - */ - public function getSpeechToTextSettings() - { - return $this->speech_to_text_settings; - } - - public function hasSpeechToTextSettings() - { - return isset($this->speech_to_text_settings); - } - - public function clearSpeechToTextSettings() - { - unset($this->speech_to_text_settings); - } - - /** - * Speech recognition related settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechToTextSettings speech_to_text_settings = 13; - * @param \Google\Cloud\Dialogflow\Cx\V3\SpeechToTextSettings $var - * @return $this - */ - public function setSpeechToTextSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SpeechToTextSettings::class); - $this->speech_to_text_settings = $var; - - return $this; - } - - /** - * Name of the start flow in this agent. A start flow will be automatically - * created when the agent is created, and can only be deleted by deleting - * the agent. - * Format: - * `projects//locations//agents//flows/`. - * Currently only the default start flow with id - * "00000000-0000-0000-0000-000000000000" is allowed. - * - * Generated from protobuf field string start_flow = 16 [(.google.api.resource_reference) = { - * @return string - */ - public function getStartFlow() - { - return $this->readOneof(16); - } - - public function hasStartFlow() - { - return $this->hasOneof(16); - } - - /** - * Name of the start flow in this agent. A start flow will be automatically - * created when the agent is created, and can only be deleted by deleting - * the agent. - * Format: - * `projects//locations//agents//flows/`. - * Currently only the default start flow with id - * "00000000-0000-0000-0000-000000000000" is allowed. - * - * Generated from protobuf field string start_flow = 16 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setStartFlow($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Name of the start playbook in this agent. A start playbook will be - * automatically created when the agent is created, and can only be deleted - * by deleting the agent. - * Format: - * `projects//locations//agents//playbooks/`. - * Currently only the - * default playbook with id - * "00000000-0000-0000-0000-000000000000" is allowed. - * - * Generated from protobuf field string start_playbook = 39 [(.google.api.resource_reference) = { - * @return string - */ - public function getStartPlaybook() - { - return $this->readOneof(39); - } - - public function hasStartPlaybook() - { - return $this->hasOneof(39); - } - - /** - * Name of the start playbook in this agent. A start playbook will be - * automatically created when the agent is created, and can only be deleted - * by deleting the agent. - * Format: - * `projects//locations//agents//playbooks/`. - * Currently only the - * default playbook with id - * "00000000-0000-0000-0000-000000000000" is allowed. - * - * Generated from protobuf field string start_playbook = 39 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setStartPlaybook($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(39, $var); - - return $this; - } - - /** - * Name of the - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] - * reference for the agent. Format: - * `projects//locations//securitySettings/`. - * - * Generated from protobuf field string security_settings = 17 [(.google.api.resource_reference) = { - * @return string - */ - public function getSecuritySettings() - { - return $this->security_settings; - } - - /** - * Name of the - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] - * reference for the agent. Format: - * `projects//locations//securitySettings/`. - * - * Generated from protobuf field string security_settings = 17 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSecuritySettings($var) - { - GPBUtil::checkString($var, True); - $this->security_settings = $var; - - return $this; - } - - /** - * Indicates if stackdriver logging is enabled for the agent. - * Please use - * [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings] - * instead. - * - * Generated from protobuf field bool enable_stackdriver_logging = 18 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getEnableStackdriverLogging() - { - if ($this->enable_stackdriver_logging !== false) { - @trigger_error('enable_stackdriver_logging is deprecated.', E_USER_DEPRECATED); - } - return $this->enable_stackdriver_logging; - } - - /** - * Indicates if stackdriver logging is enabled for the agent. - * Please use - * [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings] - * instead. - * - * Generated from protobuf field bool enable_stackdriver_logging = 18 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setEnableStackdriverLogging($var) - { - @trigger_error('enable_stackdriver_logging is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->enable_stackdriver_logging = $var; - - return $this; - } - - /** - * Indicates if automatic spell correction is enabled in detect intent - * requests. - * - * Generated from protobuf field bool enable_spell_correction = 20; - * @return bool - */ - public function getEnableSpellCorrection() - { - return $this->enable_spell_correction; - } - - /** - * Indicates if automatic spell correction is enabled in detect intent - * requests. - * - * Generated from protobuf field bool enable_spell_correction = 20; - * @param bool $var - * @return $this - */ - public function setEnableSpellCorrection($var) - { - GPBUtil::checkBool($var); - $this->enable_spell_correction = $var; - - return $this; - } - - /** - * Optional. Enable training multi-lingual models for this agent. These models - * will be trained on all the languages supported by the agent. - * - * Generated from protobuf field bool enable_multi_language_training = 40 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableMultiLanguageTraining() - { - return $this->enable_multi_language_training; - } - - /** - * Optional. Enable training multi-lingual models for this agent. These models - * will be trained on all the languages supported by the agent. - * - * Generated from protobuf field bool enable_multi_language_training = 40 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableMultiLanguageTraining($var) - { - GPBUtil::checkBool($var); - $this->enable_multi_language_training = $var; - - return $this; - } - - /** - * Indicates whether the agent is locked for changes. If the agent is locked, - * modifications to the agent will be rejected except for [RestoreAgent][]. - * - * Generated from protobuf field bool locked = 27; - * @return bool - */ - public function getLocked() - { - return $this->locked; - } - - /** - * Indicates whether the agent is locked for changes. If the agent is locked, - * modifications to the agent will be rejected except for [RestoreAgent][]. - * - * Generated from protobuf field bool locked = 27; - * @param bool $var - * @return $this - */ - public function setLocked($var) - { - GPBUtil::checkBool($var); - $this->locked = $var; - - return $this; - } - - /** - * Hierarchical advanced settings for this agent. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; - * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null - */ - public function getAdvancedSettings() - { - return $this->advanced_settings; - } - - public function hasAdvancedSettings() - { - return isset($this->advanced_settings); - } - - public function clearAdvancedSettings() - { - unset($this->advanced_settings); - } - - /** - * Hierarchical advanced settings for this agent. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; - * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var - * @return $this - */ - public function setAdvancedSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); - $this->advanced_settings = $var; - - return $this; - } - - /** - * Git integration settings for this agent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings git_integration_settings = 30; - * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings|null - */ - public function getGitIntegrationSettings() - { - return $this->git_integration_settings; - } - - public function hasGitIntegrationSettings() - { - return isset($this->git_integration_settings); - } - - public function clearGitIntegrationSettings() - { - unset($this->git_integration_settings); - } - - /** - * Git integration settings for this agent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings git_integration_settings = 30; - * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings $var - * @return $this - */ - public function setGitIntegrationSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings::class); - $this->git_integration_settings = $var; - - return $this; - } - - /** - * Settings on instructing the speech synthesizer on how to generate the - * output audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TextToSpeechSettings text_to_speech_settings = 31; - * @return \Google\Cloud\Dialogflow\Cx\V3\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); - } - - /** - * Settings on instructing the speech synthesizer on how to generate the - * output audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TextToSpeechSettings text_to_speech_settings = 31; - * @param \Google\Cloud\Dialogflow\Cx\V3\TextToSpeechSettings $var - * @return $this - */ - public function setTextToSpeechSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TextToSpeechSettings::class); - $this->text_to_speech_settings = $var; - - return $this; - } - - /** - * Gen App Builder-related agent-level settings. - * - * Generated from protobuf field optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; - * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\GenAppBuilderSettings|null - */ - public function getGenAppBuilderSettings() - { - return $this->gen_app_builder_settings; - } - - public function hasGenAppBuilderSettings() - { - return isset($this->gen_app_builder_settings); - } - - public function clearGenAppBuilderSettings() - { - unset($this->gen_app_builder_settings); - } - - /** - * Gen App Builder-related agent-level settings. - * - * Generated from protobuf field optional .google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings gen_app_builder_settings = 33; - * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\GenAppBuilderSettings $var - * @return $this - */ - public function setGenAppBuilderSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\GenAppBuilderSettings::class); - $this->gen_app_builder_settings = $var; - - return $this; - } - - /** - * Optional. Answer feedback collection settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\AnswerFeedbackSettings|null - */ - public function getAnswerFeedbackSettings() - { - return $this->answer_feedback_settings; - } - - public function hasAnswerFeedbackSettings() - { - return isset($this->answer_feedback_settings); - } - - public function clearAnswerFeedbackSettings() - { - unset($this->answer_feedback_settings); - } - - /** - * Optional. Answer feedback collection settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings answer_feedback_settings = 38 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\AnswerFeedbackSettings $var - * @return $this - */ - public function setAnswerFeedbackSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\AnswerFeedbackSettings::class); - $this->answer_feedback_settings = $var; - - return $this; - } - - /** - * Optional. Settings for end user personalization. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings personalization_settings = 42 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\PersonalizationSettings|null - */ - public function getPersonalizationSettings() - { - return $this->personalization_settings; - } - - public function hasPersonalizationSettings() - { - return isset($this->personalization_settings); - } - - public function clearPersonalizationSettings() - { - unset($this->personalization_settings); - } - - /** - * Optional. Settings for end user personalization. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings personalization_settings = 42 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\PersonalizationSettings $var - * @return $this - */ - public function setPersonalizationSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\PersonalizationSettings::class); - $this->personalization_settings = $var; - - return $this; - } - - /** - * Optional. Settings for custom client certificates. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings client_certificate_settings = 43 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\ClientCertificateSettings|null - */ - public function getClientCertificateSettings() - { - return $this->client_certificate_settings; - } - - public function hasClientCertificateSettings() - { - return isset($this->client_certificate_settings); - } - - public function clearClientCertificateSettings() - { - unset($this->client_certificate_settings); - } - - /** - * Optional. Settings for custom client certificates. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings client_certificate_settings = 43 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\ClientCertificateSettings $var - * @return $this - */ - public function setClientCertificateSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\ClientCertificateSettings::class); - $this->client_certificate_settings = $var; - - return $this; - } - - /** - * Optional. Output only. A read only boolean field reflecting Zone Separation - * status of the agent. - * - * Generated from protobuf field optional bool satisfies_pzs = 45 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; - } - - public function hasSatisfiesPzs() - { - return isset($this->satisfies_pzs); - } - - public function clearSatisfiesPzs() - { - unset($this->satisfies_pzs); - } - - /** - * Optional. Output only. A read only boolean field reflecting Zone Separation - * status of the agent. - * - * Generated from protobuf field optional bool satisfies_pzs = 45 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Optional. Output only. A read only boolean field reflecting Zone Isolation - * status of the agent. - * - * Generated from protobuf field optional bool satisfies_pzi = 46 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzi() - { - return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; - } - - public function hasSatisfiesPzi() - { - return isset($this->satisfies_pzi); - } - - public function clearSatisfiesPzi() - { - unset($this->satisfies_pzi); - } - - /** - * Optional. Output only. A read only boolean field reflecting Zone Isolation - * status of the agent. - * - * Generated from protobuf field optional bool satisfies_pzi = 46 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - - /** - * @return string - */ - public function getSessionEntryResource() - { - return $this->whichOneof("session_entry_resource"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/AnswerFeedbackSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/AnswerFeedbackSettings.php deleted file mode 100644 index 7678b7a237ec..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/AnswerFeedbackSettings.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings - */ -class AnswerFeedbackSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If enabled, end users will be able to provide - * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to - * Dialogflow responses. Feature works only if interaction logging is - * enabled in the Dialogflow agent. - * - * Generated from protobuf field bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_answer_feedback = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_answer_feedback - * Optional. If enabled, end users will be able to provide - * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to - * Dialogflow responses. Feature works only if interaction logging is - * enabled in the Dialogflow agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If enabled, end users will be able to provide - * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to - * Dialogflow responses. Feature works only if interaction logging is - * enabled in the Dialogflow agent. - * - * Generated from protobuf field bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableAnswerFeedback() - { - return $this->enable_answer_feedback; - } - - /** - * Optional. If enabled, end users will be able to provide - * [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to - * Dialogflow responses. Feature works only if interaction logging is - * enabled in the Dialogflow agent. - * - * Generated from protobuf field bool enable_answer_feedback = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableAnswerFeedback($var) - { - GPBUtil::checkBool($var); - $this->enable_answer_feedback = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnswerFeedbackSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_AnswerFeedbackSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/ClientCertificateSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/ClientCertificateSettings.php deleted file mode 100644 index 7b7ca20060bd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/ClientCertificateSettings.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings - */ -class ClientCertificateSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ssl certificate encoded in PEM format. This string must - * include the begin header and end footer lines. - * - * Generated from protobuf field string ssl_certificate = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ssl_certificate = ''; - /** - * Required. The name of the SecretManager secret version resource storing - * the private key encoded in PEM format. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string private_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $private_key = ''; - /** - * Optional. The name of the SecretManager secret version resource storing - * the passphrase. 'passphrase' should be left unset if the private key is - * not encrypted. - * Format: `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string passphrase = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $passphrase = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ssl_certificate - * Required. The ssl certificate encoded in PEM format. This string must - * include the begin header and end footer lines. - * @type string $private_key - * Required. The name of the SecretManager secret version resource storing - * the private key encoded in PEM format. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * @type string $passphrase - * Optional. The name of the SecretManager secret version resource storing - * the passphrase. 'passphrase' should be left unset if the private key is - * not encrypted. - * Format: `projects/{project}/secrets/{secret}/versions/{version}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ssl certificate encoded in PEM format. This string must - * include the begin header and end footer lines. - * - * Generated from protobuf field string ssl_certificate = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSslCertificate() - { - return $this->ssl_certificate; - } - - /** - * Required. The ssl certificate encoded in PEM format. This string must - * include the begin header and end footer lines. - * - * Generated from protobuf field string ssl_certificate = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSslCertificate($var) - { - GPBUtil::checkString($var, True); - $this->ssl_certificate = $var; - - return $this; - } - - /** - * Required. The name of the SecretManager secret version resource storing - * the private key encoded in PEM format. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string private_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPrivateKey() - { - return $this->private_key; - } - - /** - * Required. The name of the SecretManager secret version resource storing - * the private key encoded in PEM format. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string private_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrivateKey($var) - { - GPBUtil::checkString($var, True); - $this->private_key = $var; - - return $this; - } - - /** - * Optional. The name of the SecretManager secret version resource storing - * the passphrase. 'passphrase' should be left unset if the private key is - * not encrypted. - * Format: `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string passphrase = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getPassphrase() - { - return $this->passphrase; - } - - /** - * Optional. The name of the SecretManager secret version resource storing - * the passphrase. 'passphrase' should be left unset if the private key is - * not encrypted. - * Format: `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string passphrase = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPassphrase($var) - { - GPBUtil::checkString($var, True); - $this->passphrase = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClientCertificateSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_ClientCertificateSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GenAppBuilderSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GenAppBuilderSettings.php deleted file mode 100644 index 72d3f4fc9e83..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GenAppBuilderSettings.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings - */ -class GenAppBuilderSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the Gen App Builder engine related to this - * agent if there is one. Format: `projects/{Project ID}/locations/{Location - * ID}/collections/{Collection ID}/engines/{Engine ID}` - * - * Generated from protobuf field string engine = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $engine = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $engine - * Required. The full name of the Gen App Builder engine related to this - * agent if there is one. Format: `projects/{Project ID}/locations/{Location - * ID}/collections/{Collection ID}/engines/{Engine ID}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the Gen App Builder engine related to this - * agent if there is one. Format: `projects/{Project ID}/locations/{Location - * ID}/collections/{Collection ID}/engines/{Engine ID}` - * - * Generated from protobuf field string engine = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEngine() - { - return $this->engine; - } - - /** - * Required. The full name of the Gen App Builder engine related to this - * agent if there is one. Format: `projects/{Project ID}/locations/{Location - * ID}/collections/{Collection ID}/engines/{Engine ID}` - * - * Generated from protobuf field string engine = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEngine($var) - { - GPBUtil::checkString($var, True); - $this->engine = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GenAppBuilderSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_GenAppBuilderSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings.php deleted file mode 100644 index b4ae6e60e0f1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings - */ -class GitIntegrationSettings extends \Google\Protobuf\Internal\Message -{ - protected $git_settings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings\GithubSettings $github_settings - * GitHub settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * GitHub settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings.GithubSettings github_settings = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings\GithubSettings|null - */ - public function getGithubSettings() - { - return $this->readOneof(1); - } - - public function hasGithubSettings() - { - return $this->hasOneof(1); - } - - /** - * GitHub settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings.GithubSettings github_settings = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings\GithubSettings $var - * @return $this - */ - public function setGithubSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent\GitIntegrationSettings\GithubSettings::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getGitSettings() - { - return $this->whichOneof("git_settings"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GitIntegrationSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_GitIntegrationSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings/GithubSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings/GithubSettings.php deleted file mode 100644 index 99609724fb82..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/GitIntegrationSettings/GithubSettings.php +++ /dev/null @@ -1,210 +0,0 @@ -google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings.GithubSettings - */ -class GithubSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The unique repository display name for the GitHub repository. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The GitHub repository URI related to the agent. - * - * Generated from protobuf field string repository_uri = 2; - */ - protected $repository_uri = ''; - /** - * The branch of the GitHub repository tracked for this agent. - * - * Generated from protobuf field string tracking_branch = 3; - */ - protected $tracking_branch = ''; - /** - * The access token used to authenticate the access to the GitHub - * repository. - * - * Generated from protobuf field string access_token = 4; - */ - protected $access_token = ''; - /** - * A list of branches configured to be used from Dialogflow. - * - * Generated from protobuf field repeated string branches = 5; - */ - private $branches; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The unique repository display name for the GitHub repository. - * @type string $repository_uri - * The GitHub repository URI related to the agent. - * @type string $tracking_branch - * The branch of the GitHub repository tracked for this agent. - * @type string $access_token - * The access token used to authenticate the access to the GitHub - * repository. - * @type array|\Google\Protobuf\Internal\RepeatedField $branches - * A list of branches configured to be used from Dialogflow. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * The unique repository display name for the GitHub repository. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The unique repository display name for the GitHub repository. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The GitHub repository URI related to the agent. - * - * Generated from protobuf field string repository_uri = 2; - * @return string - */ - public function getRepositoryUri() - { - return $this->repository_uri; - } - - /** - * The GitHub repository URI related to the agent. - * - * Generated from protobuf field string repository_uri = 2; - * @param string $var - * @return $this - */ - public function setRepositoryUri($var) - { - GPBUtil::checkString($var, True); - $this->repository_uri = $var; - - return $this; - } - - /** - * The branch of the GitHub repository tracked for this agent. - * - * Generated from protobuf field string tracking_branch = 3; - * @return string - */ - public function getTrackingBranch() - { - return $this->tracking_branch; - } - - /** - * The branch of the GitHub repository tracked for this agent. - * - * Generated from protobuf field string tracking_branch = 3; - * @param string $var - * @return $this - */ - public function setTrackingBranch($var) - { - GPBUtil::checkString($var, True); - $this->tracking_branch = $var; - - return $this; - } - - /** - * The access token used to authenticate the access to the GitHub - * repository. - * - * Generated from protobuf field string access_token = 4; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * The access token used to authenticate the access to the GitHub - * repository. - * - * Generated from protobuf field string access_token = 4; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * A list of branches configured to be used from Dialogflow. - * - * Generated from protobuf field repeated string branches = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBranches() - { - return $this->branches; - } - - /** - * A list of branches configured to be used from Dialogflow. - * - * Generated from protobuf field repeated string branches = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBranches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->branches = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GithubSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_GitIntegrationSettings_GithubSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/PersonalizationSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/PersonalizationSettings.php deleted file mode 100644 index 863f4b4211b8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Agent/PersonalizationSettings.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings - */ -class PersonalizationSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Default end user metadata, used when processing DetectIntent - * requests. Recommended to be filled as a template instead of hard-coded - * value, for example { "age": "$session.params.age" }. The data will be - * merged with the - * [QueryParameters.end_user_metadata][google.cloud.dialogflow.cx.v3.QueryParameters.end_user_metadata] - * in - * [DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3.DetectIntentRequest.query_params] - * during query processing. - * - * Generated from protobuf field .google.protobuf.Struct default_end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_end_user_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $default_end_user_metadata - * Optional. Default end user metadata, used when processing DetectIntent - * requests. Recommended to be filled as a template instead of hard-coded - * value, for example { "age": "$session.params.age" }. The data will be - * merged with the - * [QueryParameters.end_user_metadata][google.cloud.dialogflow.cx.v3.QueryParameters.end_user_metadata] - * in - * [DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3.DetectIntentRequest.query_params] - * during query processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Default end user metadata, used when processing DetectIntent - * requests. Recommended to be filled as a template instead of hard-coded - * value, for example { "age": "$session.params.age" }. The data will be - * merged with the - * [QueryParameters.end_user_metadata][google.cloud.dialogflow.cx.v3.QueryParameters.end_user_metadata] - * in - * [DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3.DetectIntentRequest.query_params] - * during query processing. - * - * Generated from protobuf field .google.protobuf.Struct default_end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getDefaultEndUserMetadata() - { - return $this->default_end_user_metadata; - } - - public function hasDefaultEndUserMetadata() - { - return isset($this->default_end_user_metadata); - } - - public function clearDefaultEndUserMetadata() - { - unset($this->default_end_user_metadata); - } - - /** - * Optional. Default end user metadata, used when processing DetectIntent - * requests. Recommended to be filled as a template instead of hard-coded - * value, for example { "age": "$session.params.age" }. The data will be - * merged with the - * [QueryParameters.end_user_metadata][google.cloud.dialogflow.cx.v3.QueryParameters.end_user_metadata] - * in - * [DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3.DetectIntentRequest.query_params] - * during query processing. - * - * Generated from protobuf field .google.protobuf.Struct default_end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setDefaultEndUserMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->default_end_user_metadata = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PersonalizationSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Agent_PersonalizationSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentValidationResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentValidationResult.php deleted file mode 100644 index 7ebeb05e766a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AgentValidationResult.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.AgentValidationResult - */ -class AgentValidationResult extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the agent validation result. - * Format: - * `projects//locations//agents//validationResult`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Contains all flow validation results. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; - */ - private $flow_validation_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the agent validation result. - * Format: - * `projects//locations//agents//validationResult`. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\FlowValidationResult>|\Google\Protobuf\Internal\RepeatedField $flow_validation_results - * Contains all flow validation results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the agent validation result. - * Format: - * `projects//locations//agents//validationResult`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the agent validation result. - * Format: - * `projects//locations//agents//validationResult`. - * - * 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; - } - - /** - * Contains all flow validation results. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFlowValidationResults() - { - return $this->flow_validation_results; - } - - /** - * Contains all flow validation results. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FlowValidationResult flow_validation_results = 2; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\FlowValidationResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFlowValidationResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\FlowValidationResult::class); - $this->flow_validation_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback.php deleted file mode 100644 index ad47950eb76b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.dialogflow.cx.v3.AnswerFeedback - */ -class AnswerFeedback extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Rating from user for the specific Dialogflow response. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rating = 0; - /** - * Optional. In case of thumbs down rating provided, users can optionally - * provide context about the rating. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rating_reason = null; - /** - * Optional. Custom rating from the user about the provided answer, with - * maximum length of 1024 characters. For example, client could use a - * customized JSON object to indicate the rating. - * - * Generated from protobuf field string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_rating = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $rating - * Optional. Rating from user for the specific Dialogflow response. - * @type \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback\RatingReason $rating_reason - * Optional. In case of thumbs down rating provided, users can optionally - * provide context about the rating. - * @type string $custom_rating - * Optional. Custom rating from the user about the provided answer, with - * maximum length of 1024 characters. For example, client could use a - * customized JSON object to indicate the rating. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Rating from user for the specific Dialogflow response. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRating() - { - return $this->rating; - } - - /** - * Optional. Rating from user for the specific Dialogflow response. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating rating = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRating($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback\Rating::class); - $this->rating = $var; - - return $this; - } - - /** - * Optional. In case of thumbs down rating provided, users can optionally - * provide context about the rating. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback\RatingReason|null - */ - public function getRatingReason() - { - return $this->rating_reason; - } - - public function hasRatingReason() - { - return isset($this->rating_reason); - } - - public function clearRatingReason() - { - unset($this->rating_reason); - } - - /** - * Optional. In case of thumbs down rating provided, users can optionally - * provide context about the rating. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason rating_reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback\RatingReason $var - * @return $this - */ - public function setRatingReason($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback\RatingReason::class); - $this->rating_reason = $var; - - return $this; - } - - /** - * Optional. Custom rating from the user about the provided answer, with - * maximum length of 1024 characters. For example, client could use a - * customized JSON object to indicate the rating. - * - * Generated from protobuf field string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCustomRating() - { - return $this->custom_rating; - } - - /** - * Optional. Custom rating from the user about the provided answer, with - * maximum length of 1024 characters. For example, client could use a - * customized JSON object to indicate the rating. - * - * Generated from protobuf field string custom_rating = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCustomRating($var) - { - GPBUtil::checkString($var, True); - $this->custom_rating = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/Rating.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/Rating.php deleted file mode 100644 index b7cbb5c4e384..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/Rating.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating - */ -class Rating -{ - /** - * Rating not specified. - * - * Generated from protobuf enum RATING_UNSPECIFIED = 0; - */ - const RATING_UNSPECIFIED = 0; - /** - * Thumbs up feedback from user. - * - * Generated from protobuf enum THUMBS_UP = 1; - */ - const THUMBS_UP = 1; - /** - * Thumbs down feedback from user. - * - * Generated from protobuf enum THUMBS_DOWN = 2; - */ - const THUMBS_DOWN = 2; - - private static $valueToName = [ - self::RATING_UNSPECIFIED => 'RATING_UNSPECIFIED', - self::THUMBS_UP => 'THUMBS_UP', - self::THUMBS_DOWN => 'THUMBS_DOWN', - ]; - - 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(Rating::class, \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback_Rating::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/RatingReason.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/RatingReason.php deleted file mode 100644 index 8ce0dfab57bb..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AnswerFeedback/RatingReason.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - */ -class RatingReason extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Custom reason labels for thumbs down rating provided by the - * user. The maximum number of labels allowed is 10 and the maximum length - * of a single label is 128 characters. - * - * Generated from protobuf field repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $reason_labels; - /** - * Optional. Additional feedback about the rating. - * This field can be populated without choosing a predefined `reason`. - * - * Generated from protobuf field string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $feedback = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $reason_labels - * Optional. Custom reason labels for thumbs down rating provided by the - * user. The maximum number of labels allowed is 10 and the maximum length - * of a single label is 128 characters. - * @type string $feedback - * Optional. Additional feedback about the rating. - * This field can be populated without choosing a predefined `reason`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Custom reason labels for thumbs down rating provided by the - * user. The maximum number of labels allowed is 10 and the maximum length - * of a single label is 128 characters. - * - * Generated from protobuf field repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReasonLabels() - { - return $this->reason_labels; - } - - /** - * Optional. Custom reason labels for thumbs down rating provided by the - * user. The maximum number of labels allowed is 10 and the maximum length - * of a single label is 128 characters. - * - * Generated from protobuf field repeated string reason_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReasonLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->reason_labels = $arr; - - return $this; - } - - /** - * Optional. Additional feedback about the rating. - * This field can be populated without choosing a predefined `reason`. - * - * Generated from protobuf field string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFeedback() - { - return $this->feedback; - } - - /** - * Optional. Additional feedback about the rating. - * This field can be populated without choosing a predefined `reason`. - * - * Generated from protobuf field string feedback = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFeedback($var) - { - GPBUtil::checkString($var, True); - $this->feedback = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RatingReason::class, \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback_RatingReason::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioEncoding.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioEncoding.php deleted file mode 100644 index 570bd291f896..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioEncoding.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.dialogflow.cx.v3.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). - * LINT: LEGACY_NAMES - * - * 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; - /** - * 8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law. - * - * Generated from protobuf enum AUDIO_ENCODING_ALAW = 8; - */ - const AUDIO_ENCODING_ALAW = 8; - - 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', - self::AUDIO_ENCODING_ALAW => 'AUDIO_ENCODING_ALAW', - ]; - - 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioInput.php deleted file mode 100644 index 167a38437c9a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/AudioInput.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dialogflow.cx.v3.AudioInput - */ -class AudioInput extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Instructs the speech recognizer how to process the speech audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InputAudioConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config = null; - /** - * The natural language speech audio to be processed. - * A single request can contain up to 2 minutes of speech audio data. - * The [transcribed - * text][google.cloud.dialogflow.cx.v3.QueryResult.transcript] cannot contain - * more than 256 bytes. - * For non-streaming audio detect intent, both `config` and `audio` must be - * provided. - * For streaming audio detect intent, `config` must be provided in - * the first request and `audio` must be provided in all following requests. - * - * Generated from protobuf field bytes audio = 2; - */ - protected $audio = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig $config - * Required. Instructs the speech recognizer how to process the speech audio. - * @type string $audio - * The natural language speech audio to be processed. - * A single request can contain up to 2 minutes of speech audio data. - * The [transcribed - * text][google.cloud.dialogflow.cx.v3.QueryResult.transcript] cannot contain - * more than 256 bytes. - * For non-streaming audio detect intent, both `config` and `audio` must be - * provided. - * For streaming audio detect intent, `config` must be provided in - * the first request and `audio` must be provided in all following requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Required. Instructs the speech recognizer how to process the speech audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InputAudioConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Required. Instructs the speech recognizer how to process the speech audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InputAudioConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig::class); - $this->config = $var; - - return $this; - } - - /** - * The natural language speech audio to be processed. - * A single request can contain up to 2 minutes of speech audio data. - * The [transcribed - * text][google.cloud.dialogflow.cx.v3.QueryResult.transcript] cannot contain - * more than 256 bytes. - * For non-streaming audio detect intent, both `config` and `audio` must be - * provided. - * For streaming audio detect intent, `config` must be provided in - * the first request and `audio` must be provided in all following requests. - * - * Generated from protobuf field bytes audio = 2; - * @return string - */ - public function getAudio() - { - return $this->audio; - } - - /** - * The natural language speech audio to be processed. - * A single request can contain up to 2 minutes of speech audio data. - * The [transcribed - * text][google.cloud.dialogflow.cx.v3.QueryResult.transcript] cannot contain - * more than 256 bytes. - * For non-streaming audio detect intent, both `config` and `audio` must be - * provided. - * For streaming audio detect intent, `config` must be provided in - * the first request and `audio` must be provided in all following requests. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BargeInConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BargeInConfig.php deleted file mode 100644 index 52d0662273ce..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BargeInConfig.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dialogflow.cx.v3.BargeInConfig - */ -class BargeInConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Duration that is not eligible for barge-in at the beginning of the input - * audio. - * - * Generated from protobuf field .google.protobuf.Duration no_barge_in_duration = 1; - */ - protected $no_barge_in_duration = null; - /** - * Total duration for the playback at the beginning of the input audio. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 2; - */ - protected $total_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $no_barge_in_duration - * Duration that is not eligible for barge-in at the beginning of the input - * audio. - * @type \Google\Protobuf\Duration $total_duration - * Total duration for the playback at the beginning of the input audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * Duration that is not eligible for barge-in at the beginning of the input - * audio. - * - * Generated from protobuf field .google.protobuf.Duration no_barge_in_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getNoBargeInDuration() - { - return $this->no_barge_in_duration; - } - - public function hasNoBargeInDuration() - { - return isset($this->no_barge_in_duration); - } - - public function clearNoBargeInDuration() - { - unset($this->no_barge_in_duration); - } - - /** - * Duration that is not eligible for barge-in at the beginning of the input - * audio. - * - * Generated from protobuf field .google.protobuf.Duration no_barge_in_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setNoBargeInDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->no_barge_in_duration = $var; - - return $this; - } - - /** - * Total duration for the playback at the beginning of the input audio. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTotalDuration() - { - return $this->total_duration; - } - - public function hasTotalDuration() - { - return isset($this->total_duration); - } - - public function clearTotalDuration() - { - unset($this->total_duration); - } - - /** - * Total duration for the playback at the beginning of the input audio. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTotalDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->total_duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchDeleteTestCasesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchDeleteTestCasesRequest.php deleted file mode 100644 index 22fcf3ee8005..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchDeleteTestCasesRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - */ -class BatchDeleteTestCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to delete test cases from. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Format of test case names: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $names; - - /** - * @param string $parent Required. The agent to delete test cases from. - * Format: `projects//locations//agents/`. Please see - * {@see TestCasesClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\BatchDeleteTestCasesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to delete test cases from. - * Format: `projects//locations//agents/`. - * @type array|\Google\Protobuf\Internal\RepeatedField $names - * Required. Format of test case names: - * `projects//locations//agents//testCases/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to delete test cases from. - * Format: `projects//locations//agents/`. - * - * 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 delete test cases from. - * Format: `projects//locations//agents/`. - * - * 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. Format of test case names: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNames() - { - return $this->names; - } - - /** - * Required. Format of test case names: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesMetadata.php deleted file mode 100644 index 06cd870d8e94..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesMetadata.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata - */ -class BatchRunTestCasesMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The test errors. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $errors - * The test errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The test errors. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * The test errors. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestError::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesRequest.php deleted file mode 100644 index 32eb0e37f997..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesRequest.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - */ -class BatchRunTestCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Agent name. Format: - * `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If not set, draft environment is assumed. Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $environment = ''; - /** - * Required. Format: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $test_cases; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Agent name. Format: - * `projects//locations//agents/`. - * @type string $environment - * Optional. If not set, draft environment is assumed. Format: - * `projects//locations//agents//environments/`. - * @type array|\Google\Protobuf\Internal\RepeatedField $test_cases - * Required. Format: - * `projects//locations//agents//testCases/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. Agent name. Format: - * `projects//locations//agents/`. - * - * 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. Agent name. Format: - * `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. If not set, draft environment is assumed. Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Optional. If not set, draft environment is assumed. Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - - /** - * Required. Format: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTestCases() - { - return $this->test_cases; - } - - /** - * Required. Format: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field repeated string test_cases = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTestCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->test_cases = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesResponse.php deleted file mode 100644 index 78f84cda38a6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BatchRunTestCasesResponse.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse - */ -class BatchRunTestCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The test case results. The detailed - * [conversation - * turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are - * empty in this response. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; - */ - private $results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestCaseResult>|\Google\Protobuf\Internal\RepeatedField $results - * The test case results. The detailed - * [conversation - * turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are - * empty in this response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The test case results. The detailed - * [conversation - * turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are - * empty in this response. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * The test case results. The detailed - * [conversation - * turns][google.cloud.dialogflow.cx.v3.TestCaseResult.conversation_turns] are - * empty in this response. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult results = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestCaseResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult::class); - $this->results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec.php deleted file mode 100644 index 2587f10a4e7b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.dialogflow.cx.v3.BoostSpec - */ -class BoostSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Condition boost specifications. If a document matches multiple - * conditions in the specifications, boost scores from these specifications - * are all applied and combined in a non-linear way. Maximum number of - * specifications is 20. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $condition_boost_specs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec>|\Google\Protobuf\Internal\RepeatedField $condition_boost_specs - * Optional. Condition boost specifications. If a document matches multiple - * conditions in the specifications, boost scores from these specifications - * are all applied and combined in a non-linear way. Maximum number of - * specifications is 20. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Condition boost specifications. If a document matches multiple - * conditions in the specifications, boost scores from these specifications - * are all applied and combined in a non-linear way. Maximum number of - * specifications is 20. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditionBoostSpecs() - { - return $this->condition_boost_specs; - } - - /** - * Optional. Condition boost specifications. If a document matches multiple - * conditions in the specifications, boost scores from these specifications - * are all applied and combined in a non-linear way. Maximum number of - * specifications is 20. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec condition_boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditionBoostSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec::class); - $this->condition_boost_specs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec.php deleted file mode 100644 index c0742747fc32..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - */ -class ConditionBoostSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. An expression which specifies a boost condition. The syntax and - * supported fields are the same as a filter expression. - * Examples: - * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) - * - * Generated from protobuf field string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $condition = ''; - /** - * Optional. Strength of the condition boost, which should be in [-1, 1]. - * Negative boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. - * Setting to -1.0 gives the document a big demotion. However, results - * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. - * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. - * - * Generated from protobuf field float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $boost = 0.0; - /** - * Optional. Complex specification for custom ranking based on customer - * defined attribute value. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $boost_control_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $condition - * Optional. An expression which specifies a boost condition. The syntax and - * supported fields are the same as a filter expression. - * Examples: - * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) - * @type float $boost - * Optional. Strength of the condition boost, which should be in [-1, 1]. - * Negative boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. - * Setting to -1.0 gives the document a big demotion. However, results - * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. - * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. - * @type \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec $boost_control_spec - * Optional. Complex specification for custom ranking based on customer - * defined attribute value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Optional. An expression which specifies a boost condition. The syntax and - * supported fields are the same as a filter expression. - * Examples: - * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) - * - * Generated from protobuf field string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCondition() - { - return $this->condition; - } - - /** - * Optional. An expression which specifies a boost condition. The syntax and - * supported fields are the same as a filter expression. - * Examples: - * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) - * - * Generated from protobuf field string condition = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkString($var, True); - $this->condition = $var; - - return $this; - } - - /** - * Optional. Strength of the condition boost, which should be in [-1, 1]. - * Negative boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. - * Setting to -1.0 gives the document a big demotion. However, results - * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. - * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. - * - * Generated from protobuf field float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getBoost() - { - return $this->boost; - } - - /** - * Optional. Strength of the condition boost, which should be in [-1, 1]. - * Negative boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. - * Setting to -1.0 gives the document a big demotion. However, results - * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. - * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. - * - * Generated from protobuf field float boost = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setBoost($var) - { - GPBUtil::checkFloat($var); - $this->boost = $var; - - return $this; - } - - /** - * Optional. Complex specification for custom ranking based on customer - * defined attribute value. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec|null - */ - public function getBoostControlSpec() - { - return $this->boost_control_spec; - } - - public function hasBoostControlSpec() - { - return isset($this->boost_control_spec); - } - - public function clearBoostControlSpec() - { - unset($this->boost_control_spec); - } - - /** - * Optional. Complex specification for custom ranking based on customer - * defined attribute value. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec $var - * @return $this - */ - public function setBoostControlSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec::class); - $this->boost_control_spec = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConditionBoostSpec::class, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec_ConditionBoostSpec::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec.php deleted file mode 100644 index a9b030a3a1b3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - */ -class BoostControlSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The name of the field whose value will be used to determine - * the boost amount. - * - * Generated from protobuf field string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $field_name = ''; - /** - * Optional. The attribute type to be used to determine the boost amount. - * The attribute value can be derived from the field value of the - * specified field_name. In the case of numerical it is straightforward - * i.e. attribute_value = numerical_field_value. In the case of freshness - * however, attribute_value = (time.now() - datetime_field_value). - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $attribute_type = 0; - /** - * Optional. The interpolation type to be applied to connect the control - * points listed below. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $interpolation_type = 0; - /** - * Optional. The control points used to define the curve. The monotonic - * function (defined through the interpolation_type above) passes through - * the control points listed here. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $control_points; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_name - * Optional. The name of the field whose value will be used to determine - * the boost amount. - * @type int $attribute_type - * Optional. The attribute type to be used to determine the boost amount. - * The attribute value can be derived from the field value of the - * specified field_name. In the case of numerical it is straightforward - * i.e. attribute_value = numerical_field_value. In the case of freshness - * however, attribute_value = (time.now() - datetime_field_value). - * @type int $interpolation_type - * Optional. The interpolation type to be applied to connect the control - * points listed below. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec\ControlPoint>|\Google\Protobuf\Internal\RepeatedField $control_points - * Optional. The control points used to define the curve. The monotonic - * function (defined through the interpolation_type above) passes through - * the control points listed here. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The name of the field whose value will be used to determine - * the boost amount. - * - * Generated from protobuf field string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFieldName() - { - return $this->field_name; - } - - /** - * Optional. The name of the field whose value will be used to determine - * the boost amount. - * - * Generated from protobuf field string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFieldName($var) - { - GPBUtil::checkString($var, True); - $this->field_name = $var; - - return $this; - } - - /** - * Optional. The attribute type to be used to determine the boost amount. - * The attribute value can be derived from the field value of the - * specified field_name. In the case of numerical it is straightforward - * i.e. attribute_value = numerical_field_value. In the case of freshness - * however, attribute_value = (time.now() - datetime_field_value). - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAttributeType() - { - return $this->attribute_type; - } - - /** - * Optional. The attribute type to be used to determine the boost amount. - * The attribute value can be derived from the field value of the - * specified field_name. In the case of numerical it is straightforward - * i.e. attribute_value = numerical_field_value. In the case of freshness - * however, attribute_value = (time.now() - datetime_field_value). - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAttributeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec\AttributeType::class); - $this->attribute_type = $var; - - return $this; - } - - /** - * Optional. The interpolation type to be applied to connect the control - * points listed below. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getInterpolationType() - { - return $this->interpolation_type; - } - - /** - * Optional. The interpolation type to be applied to connect the control - * points listed below. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setInterpolationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec\InterpolationType::class); - $this->interpolation_type = $var; - - return $this; - } - - /** - * Optional. The control points used to define the curve. The monotonic - * function (defined through the interpolation_type above) passes through - * the control points listed here. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getControlPoints() - { - return $this->control_points; - } - - /** - * Optional. The control points used to define the curve. The monotonic - * function (defined through the interpolation_type above) passes through - * the control points listed here. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec\ControlPoint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setControlPoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec\ConditionBoostSpec\BoostControlSpec\ControlPoint::class); - $this->control_points = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BoostControlSpec::class, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec_ConditionBoostSpec_BoostControlSpec::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php deleted file mode 100644 index 07123dde6d84..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType - */ -class AttributeType -{ - /** - * Unspecified AttributeType. - * - * Generated from protobuf enum ATTRIBUTE_TYPE_UNSPECIFIED = 0; - */ - const ATTRIBUTE_TYPE_UNSPECIFIED = 0; - /** - * The value of the numerical field will be used to dynamically update - * the boost amount. In this case, the attribute_value (the x value) - * of the control point will be the actual value of the numerical - * field for which the boost_amount is specified. - * - * Generated from protobuf enum NUMERICAL = 1; - */ - const NUMERICAL = 1; - /** - * For the freshness use case the attribute value will be the duration - * between the current time and the date in the datetime field - * specified. The value must be formatted as an XSD `dayTimeDuration` - * value (a restricted subset of an ISO 8601 duration value). The - * pattern for this is: `[nD][T[nH][nM][nS]]`. - * E.g. `5D`, `3DT12H30M`, `T24H`. - * - * Generated from protobuf enum FRESHNESS = 2; - */ - const FRESHNESS = 2; - - private static $valueToName = [ - self::ATTRIBUTE_TYPE_UNSPECIFIED => 'ATTRIBUTE_TYPE_UNSPECIFIED', - self::NUMERICAL => 'NUMERICAL', - self::FRESHNESS => 'FRESHNESS', - ]; - - 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(AttributeType::class, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec_ConditionBoostSpec_BoostControlSpec_AttributeType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php deleted file mode 100644 index ca2b214184c1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - */ -class ControlPoint extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Can be one of: - * 1. The numerical field value. - * 2. The duration spec for freshness: - * The value must be formatted as an XSD `dayTimeDuration` value (a - * restricted subset of an ISO 8601 duration value). The pattern for - * this is: `[nD][T[nH][nM][nS]]`. - * - * Generated from protobuf field string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $attribute_value = ''; - /** - * Optional. The value between -1 to 1 by which to boost the score if - * the attribute_value evaluates to the value specified above. - * - * Generated from protobuf field float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $boost_amount = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $attribute_value - * Optional. Can be one of: - * 1. The numerical field value. - * 2. The duration spec for freshness: - * The value must be formatted as an XSD `dayTimeDuration` value (a - * restricted subset of an ISO 8601 duration value). The pattern for - * this is: `[nD][T[nH][nM][nS]]`. - * @type float $boost_amount - * Optional. The value between -1 to 1 by which to boost the score if - * the attribute_value evaluates to the value specified above. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Can be one of: - * 1. The numerical field value. - * 2. The duration spec for freshness: - * The value must be formatted as an XSD `dayTimeDuration` value (a - * restricted subset of an ISO 8601 duration value). The pattern for - * this is: `[nD][T[nH][nM][nS]]`. - * - * Generated from protobuf field string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAttributeValue() - { - return $this->attribute_value; - } - - /** - * Optional. Can be one of: - * 1. The numerical field value. - * 2. The duration spec for freshness: - * The value must be formatted as an XSD `dayTimeDuration` value (a - * restricted subset of an ISO 8601 duration value). The pattern for - * this is: `[nD][T[nH][nM][nS]]`. - * - * Generated from protobuf field string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAttributeValue($var) - { - GPBUtil::checkString($var, True); - $this->attribute_value = $var; - - return $this; - } - - /** - * Optional. The value between -1 to 1 by which to boost the score if - * the attribute_value evaluates to the value specified above. - * - * Generated from protobuf field float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getBoostAmount() - { - return $this->boost_amount; - } - - /** - * Optional. The value between -1 to 1 by which to boost the score if - * the attribute_value evaluates to the value specified above. - * - * Generated from protobuf field float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setBoostAmount($var) - { - GPBUtil::checkFloat($var); - $this->boost_amount = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ControlPoint::class, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php deleted file mode 100644 index 0edab677b13f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType - */ -class InterpolationType -{ - /** - * Interpolation type is unspecified. In this case, it defaults to - * Linear. - * - * Generated from protobuf enum INTERPOLATION_TYPE_UNSPECIFIED = 0; - */ - const INTERPOLATION_TYPE_UNSPECIFIED = 0; - /** - * Piecewise linear interpolation will be applied. - * - * Generated from protobuf enum LINEAR = 1; - */ - const LINEAR = 1; - - private static $valueToName = [ - self::INTERPOLATION_TYPE_UNSPECIFIED => 'INTERPOLATION_TYPE_UNSPECIFIED', - self::LINEAR => 'LINEAR', - ]; - - 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(InterpolationType::class, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec_ConditionBoostSpec_BoostControlSpec_InterpolationType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpecs.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpecs.php deleted file mode 100644 index ca0aab076989..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/BoostSpecs.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.dialogflow.cx.v3.BoostSpecs - */ -class BoostSpecs extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Data Stores where the boosting configuration is applied. The full - * names of the referenced data stores. Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * - * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $data_stores; - /** - * Optional. A list of boosting specifications. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $data_stores - * Optional. Data Stores where the boosting configuration is applied. The full - * names of the referenced data stores. Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * @type array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec>|\Google\Protobuf\Internal\RepeatedField $spec - * Optional. A list of boosting specifications. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Data Stores where the boosting configuration is applied. The full - * names of the referenced data stores. Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * - * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataStores() - { - return $this->data_stores; - } - - /** - * Optional. Data Stores where the boosting configuration is applied. The full - * names of the referenced data stores. Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * - * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataStores($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_stores = $arr; - - return $this; - } - - /** - * Optional. A list of boosting specifications. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpec() - { - return $this->spec; - } - - /** - * Optional. A list of boosting specifications. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpec>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpec($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\BoostSpec::class); - $this->spec = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest.php deleted file mode 100644 index 0ae4b3ac2b13..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dialogflow.cx.v3.CalculateCoverageRequest - */ -class CalculateCoverageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to calculate coverage for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $agent = ''; - /** - * Required. The type of coverage requested. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $agent - * Required. The agent to calculate coverage for. - * Format: `projects//locations//agents/`. - * @type int $type - * Required. The type of coverage requested. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to calculate coverage for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string agent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAgent() - { - return $this->agent; - } - - /** - * Required. The agent to calculate coverage for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string agent = 3 [(.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; - } - - /** - * Required. The type of coverage requested. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of coverage requested. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\CalculateCoverageRequest\CoverageType::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest/CoverageType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest/CoverageType.php deleted file mode 100644 index afad224f93cb..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageRequest/CoverageType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType - */ -class CoverageType -{ - /** - * Should never be used. - * - * Generated from protobuf enum COVERAGE_TYPE_UNSPECIFIED = 0; - */ - const COVERAGE_TYPE_UNSPECIFIED = 0; - /** - * Intent coverage. - * - * Generated from protobuf enum INTENT = 1; - */ - const INTENT = 1; - /** - * Page transition coverage. - * - * Generated from protobuf enum PAGE_TRANSITION = 2; - */ - const PAGE_TRANSITION = 2; - /** - * Transition route group coverage. - * - * Generated from protobuf enum TRANSITION_ROUTE_GROUP = 3; - */ - const TRANSITION_ROUTE_GROUP = 3; - - private static $valueToName = [ - self::COVERAGE_TYPE_UNSPECIFIED => 'COVERAGE_TYPE_UNSPECIFIED', - self::INTENT => 'INTENT', - self::PAGE_TRANSITION => 'PAGE_TRANSITION', - self::TRANSITION_ROUTE_GROUP => 'TRANSITION_ROUTE_GROUP', - ]; - - 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(CoverageType::class, \Google\Cloud\Dialogflow\Cx\V3\CalculateCoverageRequest_CoverageType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageResponse.php deleted file mode 100644 index 9c933eaecdf5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CalculateCoverageResponse.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.dialogflow.cx.v3.CalculateCoverageResponse - */ -class CalculateCoverageResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The agent to calculate coverage for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string agent = 5 [(.google.api.resource_reference) = { - */ - protected $agent = ''; - protected $coverage_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $agent - * The agent to calculate coverage for. - * Format: `projects//locations//agents/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage $intent_coverage - * Intent coverage. - * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage $transition_coverage - * Transition (excluding transition route groups) coverage. - * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage $route_group_coverage - * Transition route group coverage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The agent to calculate coverage for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string agent = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getAgent() - { - return $this->agent; - } - - /** - * The agent to calculate coverage for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string agent = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAgent($var) - { - GPBUtil::checkString($var, True); - $this->agent = $var; - - return $this; - } - - /** - * Intent coverage. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage|null - */ - public function getIntentCoverage() - { - return $this->readOneof(2); - } - - public function hasIntentCoverage() - { - return $this->hasOneof(2); - } - - /** - * Intent coverage. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentCoverage intent_coverage = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage $var - * @return $this - */ - public function setIntentCoverage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Transition (excluding transition route groups) coverage. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; - * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage|null - */ - public function getTransitionCoverage() - { - return $this->readOneof(4); - } - - public function hasTransitionCoverage() - { - return $this->hasOneof(4); - } - - /** - * Transition (excluding transition route groups) coverage. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage transition_coverage = 4; - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage $var - * @return $this - */ - public function setTransitionCoverage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Transition route group coverage. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; - * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage|null - */ - public function getRouteGroupCoverage() - { - return $this->readOneof(6); - } - - public function hasRouteGroupCoverage() - { - return $this->hasOneof(6); - } - - /** - * Transition route group coverage. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage route_group_coverage = 6; - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage $var - * @return $this - */ - public function setRouteGroupCoverage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getCoverageType() - { - return $this->whichOneof("coverage_type"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Changelog.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Changelog.php deleted file mode 100644 index 01b9f8e84c48..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Changelog.php +++ /dev/null @@ -1,323 +0,0 @@ -google.cloud.dialogflow.cx.v3.Changelog - */ -class Changelog extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the changelog. - * Format: - * `projects//locations//agents//changelogs/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Email address of the authenticated user. - * - * Generated from protobuf field string user_email = 2; - */ - protected $user_email = ''; - /** - * The affected resource display name of the change. - * - * Generated from protobuf field string display_name = 7; - */ - protected $display_name = ''; - /** - * The action of the change. - * - * Generated from protobuf field string action = 11; - */ - protected $action = ''; - /** - * The affected resource type. - * - * Generated from protobuf field string type = 8; - */ - protected $type = ''; - /** - * The affected resource name of the change. - * - * Generated from protobuf field string resource = 3; - */ - protected $resource = ''; - /** - * The timestamp of the change. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - */ - protected $create_time = null; - /** - * The affected language code of the change. - * - * Generated from protobuf field string language_code = 14; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the changelog. - * Format: - * `projects//locations//agents//changelogs/`. - * @type string $user_email - * Email address of the authenticated user. - * @type string $display_name - * The affected resource display name of the change. - * @type string $action - * The action of the change. - * @type string $type - * The affected resource type. - * @type string $resource - * The affected resource name of the change. - * @type \Google\Protobuf\Timestamp $create_time - * The timestamp of the change. - * @type string $language_code - * The affected language code of the change. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Changelog::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the changelog. - * Format: - * `projects//locations//agents//changelogs/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the changelog. - * Format: - * `projects//locations//agents//changelogs/`. - * - * 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; - } - - /** - * Email address of the authenticated user. - * - * Generated from protobuf field string user_email = 2; - * @return string - */ - public function getUserEmail() - { - return $this->user_email; - } - - /** - * Email address of the authenticated user. - * - * Generated from protobuf field string user_email = 2; - * @param string $var - * @return $this - */ - public function setUserEmail($var) - { - GPBUtil::checkString($var, True); - $this->user_email = $var; - - return $this; - } - - /** - * The affected resource display name of the change. - * - * Generated from protobuf field string display_name = 7; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The affected resource display name of the change. - * - * Generated from protobuf field string display_name = 7; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The action of the change. - * - * Generated from protobuf field string action = 11; - * @return string - */ - public function getAction() - { - return $this->action; - } - - /** - * The action of the change. - * - * Generated from protobuf field string action = 11; - * @param string $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkString($var, True); - $this->action = $var; - - return $this; - } - - /** - * The affected resource type. - * - * Generated from protobuf field string type = 8; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The affected resource type. - * - * Generated from protobuf field string type = 8; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * The affected resource name of the change. - * - * Generated from protobuf field string resource = 3; - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * The affected resource name of the change. - * - * Generated from protobuf field string resource = 3; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * The timestamp of the change. - * - * 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); - } - - /** - * The timestamp of the change. - * - * 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; - } - - /** - * The affected language code of the change. - * - * Generated from protobuf field string language_code = 14; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The affected language code of the change. - * - * Generated from protobuf field string language_code = 14; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CloudConversationDebuggingInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CloudConversationDebuggingInfo.php deleted file mode 100644 index 3710ba340be3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CloudConversationDebuggingInfo.php +++ /dev/null @@ -1,750 +0,0 @@ -google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - */ -class CloudConversationDebuggingInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Number of input audio data chunks in streaming requests. - * - * Generated from protobuf field int32 audio_data_chunks = 1; - */ - protected $audio_data_chunks = 0; - /** - * Time offset of the end of speech utterance relative to the - * beginning of the first audio chunk. - * - * Generated from protobuf field .google.protobuf.Duration result_end_time_offset = 2; - */ - protected $result_end_time_offset = null; - /** - * Duration of first audio chunk. - * - * Generated from protobuf field .google.protobuf.Duration first_audio_duration = 3; - */ - protected $first_audio_duration = null; - /** - * Whether client used single utterance mode. - * - * Generated from protobuf field bool single_utterance = 5; - */ - protected $single_utterance = false; - /** - * Time offsets of the speech partial results relative to the beginning of - * the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration speech_partial_results_end_times = 6; - */ - private $speech_partial_results_end_times; - /** - * Time offsets of the speech final results (is_final=true) relative to the - * beginning of the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration speech_final_results_end_times = 7; - */ - private $speech_final_results_end_times; - /** - * Total number of partial responses. - * - * Generated from protobuf field int32 partial_responses = 8; - */ - protected $partial_responses = 0; - /** - * Time offset of Speaker ID stream close time relative to the Speech stream - * close time in milliseconds. Only meaningful for conversations involving - * passive verification. - * - * Generated from protobuf field int32 speaker_id_passive_latency_ms_offset = 9; - */ - protected $speaker_id_passive_latency_ms_offset = 0; - /** - * Whether a barge-in event is triggered in this request. - * - * Generated from protobuf field bool bargein_event_triggered = 10; - */ - protected $bargein_event_triggered = false; - /** - * Whether speech uses single utterance mode. - * - * Generated from protobuf field bool speech_single_utterance = 11; - */ - protected $speech_single_utterance = false; - /** - * Time offsets of the DTMF partial results relative to the beginning of - * the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration dtmf_partial_results_times = 12; - */ - private $dtmf_partial_results_times; - /** - * Time offsets of the DTMF final results relative to the beginning of - * the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration dtmf_final_results_times = 13; - */ - private $dtmf_final_results_times; - /** - * Time offset of the end-of-single-utterance signal relative to the - * beginning of the stream. - * - * Generated from protobuf field .google.protobuf.Duration single_utterance_end_time_offset = 14; - */ - protected $single_utterance_end_time_offset = null; - /** - * No speech timeout settings for the stream. - * - * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 15; - */ - protected $no_speech_timeout = null; - /** - * Speech endpointing timeout settings for the stream. - * - * Generated from protobuf field .google.protobuf.Duration endpointing_timeout = 19; - */ - protected $endpointing_timeout = null; - /** - * Whether the streaming terminates with an injected text query. - * - * Generated from protobuf field bool is_input_text = 16; - */ - protected $is_input_text = false; - /** - * Client half close time in terms of input audio duration. - * - * Generated from protobuf field .google.protobuf.Duration client_half_close_time_offset = 17; - */ - protected $client_half_close_time_offset = null; - /** - * Client half close time in terms of API streaming duration. - * - * Generated from protobuf field .google.protobuf.Duration client_half_close_streaming_time_offset = 18; - */ - protected $client_half_close_streaming_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $audio_data_chunks - * Number of input audio data chunks in streaming requests. - * @type \Google\Protobuf\Duration $result_end_time_offset - * Time offset of the end of speech utterance relative to the - * beginning of the first audio chunk. - * @type \Google\Protobuf\Duration $first_audio_duration - * Duration of first audio chunk. - * @type bool $single_utterance - * Whether client used single utterance mode. - * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $speech_partial_results_end_times - * Time offsets of the speech partial results relative to the beginning of - * the stream. - * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $speech_final_results_end_times - * Time offsets of the speech final results (is_final=true) relative to the - * beginning of the stream. - * @type int $partial_responses - * Total number of partial responses. - * @type int $speaker_id_passive_latency_ms_offset - * Time offset of Speaker ID stream close time relative to the Speech stream - * close time in milliseconds. Only meaningful for conversations involving - * passive verification. - * @type bool $bargein_event_triggered - * Whether a barge-in event is triggered in this request. - * @type bool $speech_single_utterance - * Whether speech uses single utterance mode. - * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $dtmf_partial_results_times - * Time offsets of the DTMF partial results relative to the beginning of - * the stream. - * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $dtmf_final_results_times - * Time offsets of the DTMF final results relative to the beginning of - * the stream. - * @type \Google\Protobuf\Duration $single_utterance_end_time_offset - * Time offset of the end-of-single-utterance signal relative to the - * beginning of the stream. - * @type \Google\Protobuf\Duration $no_speech_timeout - * No speech timeout settings for the stream. - * @type \Google\Protobuf\Duration $endpointing_timeout - * Speech endpointing timeout settings for the stream. - * @type bool $is_input_text - * Whether the streaming terminates with an injected text query. - * @type \Google\Protobuf\Duration $client_half_close_time_offset - * Client half close time in terms of input audio duration. - * @type \Google\Protobuf\Duration $client_half_close_streaming_time_offset - * Client half close time in terms of API streaming duration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Number of input audio data chunks in streaming requests. - * - * Generated from protobuf field int32 audio_data_chunks = 1; - * @return int - */ - public function getAudioDataChunks() - { - return $this->audio_data_chunks; - } - - /** - * Number of input audio data chunks in streaming requests. - * - * Generated from protobuf field int32 audio_data_chunks = 1; - * @param int $var - * @return $this - */ - public function setAudioDataChunks($var) - { - GPBUtil::checkInt32($var); - $this->audio_data_chunks = $var; - - return $this; - } - - /** - * Time offset of the end of speech utterance relative to the - * beginning of the first audio chunk. - * - * Generated from protobuf field .google.protobuf.Duration result_end_time_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getResultEndTimeOffset() - { - return $this->result_end_time_offset; - } - - public function hasResultEndTimeOffset() - { - return isset($this->result_end_time_offset); - } - - public function clearResultEndTimeOffset() - { - unset($this->result_end_time_offset); - } - - /** - * Time offset of the end of speech utterance relative to the - * beginning of the first audio chunk. - * - * Generated from protobuf field .google.protobuf.Duration result_end_time_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setResultEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->result_end_time_offset = $var; - - return $this; - } - - /** - * Duration of first audio chunk. - * - * Generated from protobuf field .google.protobuf.Duration first_audio_duration = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getFirstAudioDuration() - { - return $this->first_audio_duration; - } - - public function hasFirstAudioDuration() - { - return isset($this->first_audio_duration); - } - - public function clearFirstAudioDuration() - { - unset($this->first_audio_duration); - } - - /** - * Duration of first audio chunk. - * - * Generated from protobuf field .google.protobuf.Duration first_audio_duration = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setFirstAudioDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->first_audio_duration = $var; - - return $this; - } - - /** - * Whether client used single utterance mode. - * - * Generated from protobuf field bool single_utterance = 5; - * @return bool - */ - public function getSingleUtterance() - { - return $this->single_utterance; - } - - /** - * Whether client used single utterance mode. - * - * Generated from protobuf field bool single_utterance = 5; - * @param bool $var - * @return $this - */ - public function setSingleUtterance($var) - { - GPBUtil::checkBool($var); - $this->single_utterance = $var; - - return $this; - } - - /** - * Time offsets of the speech partial results relative to the beginning of - * the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration speech_partial_results_end_times = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpeechPartialResultsEndTimes() - { - return $this->speech_partial_results_end_times; - } - - /** - * Time offsets of the speech partial results relative to the beginning of - * the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration speech_partial_results_end_times = 6; - * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpeechPartialResultsEndTimes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->speech_partial_results_end_times = $arr; - - return $this; - } - - /** - * Time offsets of the speech final results (is_final=true) relative to the - * beginning of the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration speech_final_results_end_times = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpeechFinalResultsEndTimes() - { - return $this->speech_final_results_end_times; - } - - /** - * Time offsets of the speech final results (is_final=true) relative to the - * beginning of the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration speech_final_results_end_times = 7; - * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpeechFinalResultsEndTimes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->speech_final_results_end_times = $arr; - - return $this; - } - - /** - * Total number of partial responses. - * - * Generated from protobuf field int32 partial_responses = 8; - * @return int - */ - public function getPartialResponses() - { - return $this->partial_responses; - } - - /** - * Total number of partial responses. - * - * Generated from protobuf field int32 partial_responses = 8; - * @param int $var - * @return $this - */ - public function setPartialResponses($var) - { - GPBUtil::checkInt32($var); - $this->partial_responses = $var; - - return $this; - } - - /** - * Time offset of Speaker ID stream close time relative to the Speech stream - * close time in milliseconds. Only meaningful for conversations involving - * passive verification. - * - * Generated from protobuf field int32 speaker_id_passive_latency_ms_offset = 9; - * @return int - */ - public function getSpeakerIdPassiveLatencyMsOffset() - { - return $this->speaker_id_passive_latency_ms_offset; - } - - /** - * Time offset of Speaker ID stream close time relative to the Speech stream - * close time in milliseconds. Only meaningful for conversations involving - * passive verification. - * - * Generated from protobuf field int32 speaker_id_passive_latency_ms_offset = 9; - * @param int $var - * @return $this - */ - public function setSpeakerIdPassiveLatencyMsOffset($var) - { - GPBUtil::checkInt32($var); - $this->speaker_id_passive_latency_ms_offset = $var; - - return $this; - } - - /** - * Whether a barge-in event is triggered in this request. - * - * Generated from protobuf field bool bargein_event_triggered = 10; - * @return bool - */ - public function getBargeinEventTriggered() - { - return $this->bargein_event_triggered; - } - - /** - * Whether a barge-in event is triggered in this request. - * - * Generated from protobuf field bool bargein_event_triggered = 10; - * @param bool $var - * @return $this - */ - public function setBargeinEventTriggered($var) - { - GPBUtil::checkBool($var); - $this->bargein_event_triggered = $var; - - return $this; - } - - /** - * Whether speech uses single utterance mode. - * - * Generated from protobuf field bool speech_single_utterance = 11; - * @return bool - */ - public function getSpeechSingleUtterance() - { - return $this->speech_single_utterance; - } - - /** - * Whether speech uses single utterance mode. - * - * Generated from protobuf field bool speech_single_utterance = 11; - * @param bool $var - * @return $this - */ - public function setSpeechSingleUtterance($var) - { - GPBUtil::checkBool($var); - $this->speech_single_utterance = $var; - - return $this; - } - - /** - * Time offsets of the DTMF partial results relative to the beginning of - * the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration dtmf_partial_results_times = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDtmfPartialResultsTimes() - { - return $this->dtmf_partial_results_times; - } - - /** - * Time offsets of the DTMF partial results relative to the beginning of - * the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration dtmf_partial_results_times = 12; - * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDtmfPartialResultsTimes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->dtmf_partial_results_times = $arr; - - return $this; - } - - /** - * Time offsets of the DTMF final results relative to the beginning of - * the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration dtmf_final_results_times = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDtmfFinalResultsTimes() - { - return $this->dtmf_final_results_times; - } - - /** - * Time offsets of the DTMF final results relative to the beginning of - * the stream. - * - * Generated from protobuf field repeated .google.protobuf.Duration dtmf_final_results_times = 13; - * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDtmfFinalResultsTimes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->dtmf_final_results_times = $arr; - - return $this; - } - - /** - * Time offset of the end-of-single-utterance signal relative to the - * beginning of the stream. - * - * Generated from protobuf field .google.protobuf.Duration single_utterance_end_time_offset = 14; - * @return \Google\Protobuf\Duration|null - */ - public function getSingleUtteranceEndTimeOffset() - { - return $this->single_utterance_end_time_offset; - } - - public function hasSingleUtteranceEndTimeOffset() - { - return isset($this->single_utterance_end_time_offset); - } - - public function clearSingleUtteranceEndTimeOffset() - { - unset($this->single_utterance_end_time_offset); - } - - /** - * Time offset of the end-of-single-utterance signal relative to the - * beginning of the stream. - * - * Generated from protobuf field .google.protobuf.Duration single_utterance_end_time_offset = 14; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSingleUtteranceEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->single_utterance_end_time_offset = $var; - - return $this; - } - - /** - * No speech timeout settings for the stream. - * - * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 15; - * @return \Google\Protobuf\Duration|null - */ - public function getNoSpeechTimeout() - { - return $this->no_speech_timeout; - } - - public function hasNoSpeechTimeout() - { - return isset($this->no_speech_timeout); - } - - public function clearNoSpeechTimeout() - { - unset($this->no_speech_timeout); - } - - /** - * No speech timeout settings for the stream. - * - * Generated from protobuf field .google.protobuf.Duration no_speech_timeout = 15; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setNoSpeechTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->no_speech_timeout = $var; - - return $this; - } - - /** - * Speech endpointing timeout settings for the stream. - * - * Generated from protobuf field .google.protobuf.Duration endpointing_timeout = 19; - * @return \Google\Protobuf\Duration|null - */ - public function getEndpointingTimeout() - { - return $this->endpointing_timeout; - } - - public function hasEndpointingTimeout() - { - return isset($this->endpointing_timeout); - } - - public function clearEndpointingTimeout() - { - unset($this->endpointing_timeout); - } - - /** - * Speech endpointing timeout settings for the stream. - * - * Generated from protobuf field .google.protobuf.Duration endpointing_timeout = 19; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndpointingTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->endpointing_timeout = $var; - - return $this; - } - - /** - * Whether the streaming terminates with an injected text query. - * - * Generated from protobuf field bool is_input_text = 16; - * @return bool - */ - public function getIsInputText() - { - return $this->is_input_text; - } - - /** - * Whether the streaming terminates with an injected text query. - * - * Generated from protobuf field bool is_input_text = 16; - * @param bool $var - * @return $this - */ - public function setIsInputText($var) - { - GPBUtil::checkBool($var); - $this->is_input_text = $var; - - return $this; - } - - /** - * Client half close time in terms of input audio duration. - * - * Generated from protobuf field .google.protobuf.Duration client_half_close_time_offset = 17; - * @return \Google\Protobuf\Duration|null - */ - public function getClientHalfCloseTimeOffset() - { - return $this->client_half_close_time_offset; - } - - public function hasClientHalfCloseTimeOffset() - { - return isset($this->client_half_close_time_offset); - } - - public function clearClientHalfCloseTimeOffset() - { - unset($this->client_half_close_time_offset); - } - - /** - * Client half close time in terms of input audio duration. - * - * Generated from protobuf field .google.protobuf.Duration client_half_close_time_offset = 17; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setClientHalfCloseTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->client_half_close_time_offset = $var; - - return $this; - } - - /** - * Client half close time in terms of API streaming duration. - * - * Generated from protobuf field .google.protobuf.Duration client_half_close_streaming_time_offset = 18; - * @return \Google\Protobuf\Duration|null - */ - public function getClientHalfCloseStreamingTimeOffset() - { - return $this->client_half_close_streaming_time_offset; - } - - public function hasClientHalfCloseStreamingTimeOffset() - { - return isset($this->client_half_close_streaming_time_offset); - } - - public function clearClientHalfCloseStreamingTimeOffset() - { - unset($this->client_half_close_streaming_time_offset); - } - - /** - * Client half close time in terms of API streaming duration. - * - * Generated from protobuf field .google.protobuf.Duration client_half_close_streaming_time_offset = 18; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setClientHalfCloseStreamingTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->client_half_close_streaming_time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsRequest.php deleted file mode 100644 index 3708cff2bdad..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsRequest.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.dialogflow.cx.v3.CompareVersionsRequest - */ -class CompareVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the base flow version to compare with the target version. - * Use version ID `0` to indicate the draft version of the specified flow. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string base_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $base_version = ''; - /** - * Required. Name of the target flow version to compare with the - * base version. Use version ID `0` to indicate the draft version of the - * specified flow. Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string target_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $target_version = ''; - /** - * The language to compare the flow versions for. - * 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; - */ - protected $language_code = ''; - - /** - * @param string $baseVersion Required. Name of the base flow version to compare with the target version. - * Use version ID `0` to indicate the draft version of the specified flow. - * - * Format: - * `projects//locations//agents//flows//versions/`. Please see - * {@see VersionsClient::versionName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CompareVersionsRequest - * - * @experimental - */ - public static function build(string $baseVersion): self - { - return (new self()) - ->setBaseVersion($baseVersion); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $base_version - * Required. Name of the base flow version to compare with the target version. - * Use version ID `0` to indicate the draft version of the specified flow. - * Format: - * `projects//locations//agents//flows//versions/`. - * @type string $target_version - * Required. Name of the target flow version to compare with the - * base version. Use version ID `0` to indicate the draft version of the - * specified flow. Format: - * `projects//locations//agents//flows//versions/`. - * @type string $language_code - * The language to compare the flow versions for. - * 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\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the base flow version to compare with the target version. - * Use version ID `0` to indicate the draft version of the specified flow. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string base_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getBaseVersion() - { - return $this->base_version; - } - - /** - * Required. Name of the base flow version to compare with the target version. - * Use version ID `0` to indicate the draft version of the specified flow. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string base_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBaseVersion($var) - { - GPBUtil::checkString($var, True); - $this->base_version = $var; - - return $this; - } - - /** - * Required. Name of the target flow version to compare with the - * base version. Use version ID `0` to indicate the draft version of the - * specified flow. Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string target_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTargetVersion() - { - return $this->target_version; - } - - /** - * Required. Name of the target flow version to compare with the - * base version. Use version ID `0` to indicate the draft version of the - * specified flow. Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string target_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetVersion($var) - { - GPBUtil::checkString($var, True); - $this->target_version = $var; - - return $this; - } - - /** - * The language to compare the flow versions for. - * 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; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to compare the flow versions for. - * 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; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsResponse.php deleted file mode 100644 index c89808df0f95..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CompareVersionsResponse.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.dialogflow.cx.v3.CompareVersionsResponse - */ -class CompareVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * JSON representation of the base version content. - * - * Generated from protobuf field string base_version_content_json = 1; - */ - protected $base_version_content_json = ''; - /** - * JSON representation of the target version content. - * - * Generated from protobuf field string target_version_content_json = 2; - */ - protected $target_version_content_json = ''; - /** - * The timestamp when the two version compares. - * - * Generated from protobuf field .google.protobuf.Timestamp compare_time = 3; - */ - protected $compare_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $base_version_content_json - * JSON representation of the base version content. - * @type string $target_version_content_json - * JSON representation of the target version content. - * @type \Google\Protobuf\Timestamp $compare_time - * The timestamp when the two version compares. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * JSON representation of the base version content. - * - * Generated from protobuf field string base_version_content_json = 1; - * @return string - */ - public function getBaseVersionContentJson() - { - return $this->base_version_content_json; - } - - /** - * JSON representation of the base version content. - * - * Generated from protobuf field string base_version_content_json = 1; - * @param string $var - * @return $this - */ - public function setBaseVersionContentJson($var) - { - GPBUtil::checkString($var, True); - $this->base_version_content_json = $var; - - return $this; - } - - /** - * JSON representation of the target version content. - * - * Generated from protobuf field string target_version_content_json = 2; - * @return string - */ - public function getTargetVersionContentJson() - { - return $this->target_version_content_json; - } - - /** - * JSON representation of the target version content. - * - * Generated from protobuf field string target_version_content_json = 2; - * @param string $var - * @return $this - */ - public function setTargetVersionContentJson($var) - { - GPBUtil::checkString($var, True); - $this->target_version_content_json = $var; - - return $this; - } - - /** - * The timestamp when the two version compares. - * - * Generated from protobuf field .google.protobuf.Timestamp compare_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCompareTime() - { - return $this->compare_time; - } - - public function hasCompareTime() - { - return isset($this->compare_time); - } - - public function clearCompareTime() - { - unset($this->compare_time); - } - - /** - * The timestamp when the two version compares. - * - * Generated from protobuf field .google.protobuf.Timestamp compare_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCompareTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->compare_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult.php deleted file mode 100644 index f258bf25c93f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.dialogflow.cx.v3.ContinuousTestResult - */ -class ContinuousTestResult extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name for the continuous test result. Format: - * `projects//locations//agents//environments//continuousTestResults/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The result of this continuous test run, i.e. whether all the tests in this - * continuous test run pass or not. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult result = 2; - */ - protected $result = 0; - /** - * A list of individual test case results names in this continuous test run. - * - * Generated from protobuf field repeated string test_case_results = 3 [(.google.api.resource_reference) = { - */ - private $test_case_results; - /** - * Time when the continuous testing run starts. - * - * Generated from protobuf field .google.protobuf.Timestamp run_time = 4; - */ - protected $run_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name for the continuous test result. Format: - * `projects//locations//agents//environments//continuousTestResults/`. - * @type int $result - * The result of this continuous test run, i.e. whether all the tests in this - * continuous test run pass or not. - * @type array|\Google\Protobuf\Internal\RepeatedField $test_case_results - * A list of individual test case results names in this continuous test run. - * @type \Google\Protobuf\Timestamp $run_time - * Time when the continuous testing run starts. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * The resource name for the continuous test result. Format: - * `projects//locations//agents//environments//continuousTestResults/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the continuous test result. Format: - * `projects//locations//agents//environments//continuousTestResults/`. - * - * 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; - } - - /** - * The result of this continuous test run, i.e. whether all the tests in this - * continuous test run pass or not. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult result = 2; - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * The result of this continuous test run, i.e. whether all the tests in this - * continuous test run pass or not. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult result = 2; - * @param int $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult\AggregatedTestResult::class); - $this->result = $var; - - return $this; - } - - /** - * A list of individual test case results names in this continuous test run. - * - * Generated from protobuf field repeated string test_case_results = 3 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTestCaseResults() - { - return $this->test_case_results; - } - - /** - * A list of individual test case results names in this continuous test run. - * - * Generated from protobuf field repeated string test_case_results = 3 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTestCaseResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->test_case_results = $arr; - - return $this; - } - - /** - * Time when the continuous testing run starts. - * - * Generated from protobuf field .google.protobuf.Timestamp run_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRunTime() - { - return $this->run_time; - } - - public function hasRunTime() - { - return isset($this->run_time); - } - - public function clearRunTime() - { - unset($this->run_time); - } - - /** - * Time when the continuous testing run starts. - * - * Generated from protobuf field .google.protobuf.Timestamp run_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRunTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->run_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult/AggregatedTestResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult/AggregatedTestResult.php deleted file mode 100644 index 2f1d01904fae..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ContinuousTestResult/AggregatedTestResult.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult - */ -class AggregatedTestResult -{ - /** - * Not specified. Should never be used. - * - * Generated from protobuf enum AGGREGATED_TEST_RESULT_UNSPECIFIED = 0; - */ - const AGGREGATED_TEST_RESULT_UNSPECIFIED = 0; - /** - * All the tests passed. - * - * Generated from protobuf enum PASSED = 1; - */ - const PASSED = 1; - /** - * At least one test did not pass. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - - private static $valueToName = [ - self::AGGREGATED_TEST_RESULT_UNSPECIFIED => 'AGGREGATED_TEST_RESULT_UNSPECIFIED', - self::PASSED => 'PASSED', - 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(AggregatedTestResult::class, \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult_AggregatedTestResult::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn.php deleted file mode 100644 index 0ded7a6566c3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dialogflow.cx.v3.ConversationTurn - */ -class ConversationTurn extends \Google\Protobuf\Internal\Message -{ - /** - * The user input. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; - */ - protected $user_input = null; - /** - * The virtual agent output. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; - */ - protected $virtual_agent_output = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\UserInput $user_input - * The user input. - * @type \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\VirtualAgentOutput $virtual_agent_output - * The virtual agent output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The user input. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\UserInput|null - */ - public function getUserInput() - { - return $this->user_input; - } - - public function hasUserInput() - { - return isset($this->user_input); - } - - public function clearUserInput() - { - unset($this->user_input); - } - - /** - * The user input. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput user_input = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\UserInput $var - * @return $this - */ - public function setUserInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\UserInput::class); - $this->user_input = $var; - - return $this; - } - - /** - * The virtual agent output. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\VirtualAgentOutput|null - */ - public function getVirtualAgentOutput() - { - return $this->virtual_agent_output; - } - - public function hasVirtualAgentOutput() - { - return isset($this->virtual_agent_output); - } - - public function clearVirtualAgentOutput() - { - unset($this->virtual_agent_output); - } - - /** - * The virtual agent output. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput virtual_agent_output = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\VirtualAgentOutput $var - * @return $this - */ - public function setVirtualAgentOutput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn\VirtualAgentOutput::class); - $this->virtual_agent_output = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/UserInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/UserInput.php deleted file mode 100644 index c0e17a7240c8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/UserInput.php +++ /dev/null @@ -1,212 +0,0 @@ -google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - */ -class UserInput extends \Google\Protobuf\Internal\Message -{ - /** - * Supports [text input][google.cloud.dialogflow.cx.v3.QueryInput.text], - * [event input][google.cloud.dialogflow.cx.v3.QueryInput.event], [dtmf - * input][google.cloud.dialogflow.cx.v3.QueryInput.dtmf] in the test case. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput input = 5; - */ - protected $input = null; - /** - * Parameters that need to be injected into the conversation during intent - * detection. - * - * Generated from protobuf field .google.protobuf.Struct injected_parameters = 2; - */ - protected $injected_parameters = null; - /** - * If webhooks should be allowed to trigger in response to the user - * utterance. Often if parameters are injected, webhooks should not be - * enabled. - * - * Generated from protobuf field bool is_webhook_enabled = 3; - */ - protected $is_webhook_enabled = false; - /** - * Whether sentiment analysis is enabled. - * - * Generated from protobuf field bool enable_sentiment_analysis = 7; - */ - protected $enable_sentiment_analysis = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\QueryInput $input - * Supports [text input][google.cloud.dialogflow.cx.v3.QueryInput.text], - * [event input][google.cloud.dialogflow.cx.v3.QueryInput.event], [dtmf - * input][google.cloud.dialogflow.cx.v3.QueryInput.dtmf] in the test case. - * @type \Google\Protobuf\Struct $injected_parameters - * Parameters that need to be injected into the conversation during intent - * detection. - * @type bool $is_webhook_enabled - * If webhooks should be allowed to trigger in response to the user - * utterance. Often if parameters are injected, webhooks should not be - * enabled. - * @type bool $enable_sentiment_analysis - * Whether sentiment analysis is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Supports [text input][google.cloud.dialogflow.cx.v3.QueryInput.text], - * [event input][google.cloud.dialogflow.cx.v3.QueryInput.event], [dtmf - * input][google.cloud.dialogflow.cx.v3.QueryInput.dtmf] in the test case. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput input = 5; - * @return \Google\Cloud\Dialogflow\Cx\V3\QueryInput|null - */ - public function getInput() - { - return $this->input; - } - - public function hasInput() - { - return isset($this->input); - } - - public function clearInput() - { - unset($this->input); - } - - /** - * Supports [text input][google.cloud.dialogflow.cx.v3.QueryInput.text], - * [event input][google.cloud.dialogflow.cx.v3.QueryInput.event], [dtmf - * input][google.cloud.dialogflow.cx.v3.QueryInput.dtmf] in the test case. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput input = 5; - * @param \Google\Cloud\Dialogflow\Cx\V3\QueryInput $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryInput::class); - $this->input = $var; - - return $this; - } - - /** - * Parameters that need to be injected into the conversation during intent - * detection. - * - * Generated from protobuf field .google.protobuf.Struct injected_parameters = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getInjectedParameters() - { - return $this->injected_parameters; - } - - public function hasInjectedParameters() - { - return isset($this->injected_parameters); - } - - public function clearInjectedParameters() - { - unset($this->injected_parameters); - } - - /** - * Parameters that need to be injected into the conversation during intent - * detection. - * - * Generated from protobuf field .google.protobuf.Struct injected_parameters = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setInjectedParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->injected_parameters = $var; - - return $this; - } - - /** - * If webhooks should be allowed to trigger in response to the user - * utterance. Often if parameters are injected, webhooks should not be - * enabled. - * - * Generated from protobuf field bool is_webhook_enabled = 3; - * @return bool - */ - public function getIsWebhookEnabled() - { - return $this->is_webhook_enabled; - } - - /** - * If webhooks should be allowed to trigger in response to the user - * utterance. Often if parameters are injected, webhooks should not be - * enabled. - * - * Generated from protobuf field bool is_webhook_enabled = 3; - * @param bool $var - * @return $this - */ - public function setIsWebhookEnabled($var) - { - GPBUtil::checkBool($var); - $this->is_webhook_enabled = $var; - - return $this; - } - - /** - * Whether sentiment analysis is enabled. - * - * Generated from protobuf field bool enable_sentiment_analysis = 7; - * @return bool - */ - public function getEnableSentimentAnalysis() - { - return $this->enable_sentiment_analysis; - } - - /** - * Whether sentiment analysis is enabled. - * - * Generated from protobuf field bool enable_sentiment_analysis = 7; - * @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(UserInput::class, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn_UserInput::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/VirtualAgentOutput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/VirtualAgentOutput.php deleted file mode 100644 index 902c96fad150..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ConversationTurn/VirtualAgentOutput.php +++ /dev/null @@ -1,356 +0,0 @@ -google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - */ -class VirtualAgentOutput extends \Google\Protobuf\Internal\Message -{ - /** - * The session parameters available to the bot at this point. - * - * Generated from protobuf field .google.protobuf.Struct session_parameters = 4; - */ - protected $session_parameters = null; - /** - * Output only. If this is part of a [result conversation - * turn][TestCaseResult.conversation_turns], the list of differences - * between the original run and the replay for this output, if any. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $differences; - /** - * Required. Input only. The diagnostic - * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] - * output for the turn. Required to calculate the testing coverage. - * - * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $diagnostic_info = null; - /** - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the - * response. Only name and displayName will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; - */ - protected $triggered_intent = null; - /** - * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was - * spoken. Only name and displayName will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 8; - */ - protected $current_page = null; - /** - * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses - * from the agent for the turn. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; - */ - private $text_responses; - /** - * Response error from the agent in the test result. If set, other output - * is empty. - * - * Generated from protobuf field .google.rpc.Status status = 10; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $session_parameters - * The session parameters available to the bot at this point. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestRunDifference>|\Google\Protobuf\Internal\RepeatedField $differences - * Output only. If this is part of a [result conversation - * turn][TestCaseResult.conversation_turns], the list of differences - * between the original run and the replay for this output, if any. - * @type \Google\Protobuf\Struct $diagnostic_info - * Required. Input only. The diagnostic - * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] - * output for the turn. Required to calculate the testing coverage. - * @type \Google\Cloud\Dialogflow\Cx\V3\Intent $triggered_intent - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the - * response. Only name and displayName will be set. - * @type \Google\Cloud\Dialogflow\Cx\V3\Page $current_page - * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was - * spoken. Only name and displayName will be set. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text>|\Google\Protobuf\Internal\RepeatedField $text_responses - * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses - * from the agent for the turn. - * @type \Google\Rpc\Status $status - * Response error from the agent in the test result. If set, other output - * is empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The session parameters available to the bot at this point. - * - * Generated from protobuf field .google.protobuf.Struct session_parameters = 4; - * @return \Google\Protobuf\Struct|null - */ - public function getSessionParameters() - { - return $this->session_parameters; - } - - public function hasSessionParameters() - { - return isset($this->session_parameters); - } - - public function clearSessionParameters() - { - unset($this->session_parameters); - } - - /** - * The session parameters available to the bot at this point. - * - * Generated from protobuf field .google.protobuf.Struct session_parameters = 4; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setSessionParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->session_parameters = $var; - - return $this; - } - - /** - * Output only. If this is part of a [result conversation - * turn][TestCaseResult.conversation_turns], the list of differences - * between the original run and the replay for this output, if any. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDifferences() - { - return $this->differences; - } - - /** - * Output only. If this is part of a [result conversation - * turn][TestCaseResult.conversation_turns], the list of differences - * between the original run and the replay for this output, if any. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestRunDifference differences = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestRunDifference>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDifferences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestRunDifference::class); - $this->differences = $arr; - - return $this; - } - - /** - * Required. Input only. The diagnostic - * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] - * output for the turn. Required to calculate the testing coverage. - * - * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - * @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); - } - - /** - * Required. Input only. The diagnostic - * [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] - * output for the turn. Required to calculate the testing coverage. - * - * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - * @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 [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the - * response. Only name and displayName will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; - * @return \Google\Cloud\Dialogflow\Cx\V3\Intent|null - */ - public function getTriggeredIntent() - { - return $this->triggered_intent; - } - - public function hasTriggeredIntent() - { - return isset($this->triggered_intent); - } - - public function clearTriggeredIntent() - { - unset($this->triggered_intent); - } - - /** - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the - * response. Only name and displayName will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent triggered_intent = 7; - * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $var - * @return $this - */ - public function setTriggeredIntent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Intent::class); - $this->triggered_intent = $var; - - return $this; - } - - /** - * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was - * spoken. Only name and displayName will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 8; - * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null - */ - public function getCurrentPage() - { - return $this->current_page; - } - - public function hasCurrentPage() - { - return isset($this->current_page); - } - - public function clearCurrentPage() - { - unset($this->current_page); - } - - /** - * The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was - * spoken. Only name and displayName will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 8; - * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var - * @return $this - */ - public function setCurrentPage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); - $this->current_page = $var; - - return $this; - } - - /** - * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses - * from the agent for the turn. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTextResponses() - { - return $this->text_responses; - } - - /** - * The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses - * from the agent for the turn. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text_responses = 9; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTextResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text::class); - $this->text_responses = $arr; - - return $this; - } - - /** - * Response error from the agent in the test result. If set, other output - * is empty. - * - * Generated from protobuf field .google.rpc.Status status = 10; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Response error from the agent in the test result. If set, other output - * is empty. - * - * Generated from protobuf field .google.rpc.Status status = 10; - * @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(VirtualAgentOutput::class, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn_VirtualAgentOutput::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateAgentRequest.php deleted file mode 100644 index df418e380976..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateAgentRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateAgentRequest - */ -class CreateAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location to create a agent for. - * Format: `projects//locations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The agent to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent agent = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $agent = null; - - /** - * @param string $parent Required. The location to create a agent for. - * Format: `projects//locations/`. Please see - * {@see AgentsClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\Agent $agent Required. The agent to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateAgentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Agent $agent): self - { - return (new self()) - ->setParent($parent) - ->setAgent($agent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location to create a agent for. - * Format: `projects//locations/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Agent $agent - * Required. The agent to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location to create a agent 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 location to create a agent 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 agent to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent agent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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 create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent agent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Agent $var - * @return $this - */ - public function setAgent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent::class); - $this->agent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEntityTypeRequest.php deleted file mode 100644 index b74e55a837aa..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEntityTypeRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - */ -class CreateEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to create a entity type for. - * Format: `projects//locations//agents/`. - * - * 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.cx.v3.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity_type = null; - /** - * The language of the following fields in `entity_type`: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - */ - protected $language_code = ''; - - /** - * @param string $parent Required. The agent to create a entity type for. - * Format: `projects//locations//agents/`. Please see - * {@see EntityTypesClient::agentName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\EntityType $entityType Required. The entity type to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateEntityTypeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\EntityType $entityType): self - { - return (new self()) - ->setParent($parent) - ->setEntityType($entityType); - } - - /** - * 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//locations//agents/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\EntityType $entity_type - * Required. The entity type to create. - * @type string $language_code - * The language of the following fields in `entity_type`: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to create a entity type for. - * Format: `projects//locations//agents/`. - * - * 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//locations//agents/`. - * - * 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.cx.v3.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.EntityType entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\EntityType $var - * @return $this - */ - public function setEntityType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\EntityType::class); - $this->entity_type = $var; - - return $this; - } - - /** - * The language of the following fields in `entity_type`: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the following fields in `entity_type`: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEnvironmentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEnvironmentRequest.php deleted file mode 100644 index db001090b83b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateEnvironmentRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest - */ -class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - * `projects//locations//agents/`. - * - * 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.cx.v3.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment = null; - - /** - * @param string $parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - * `projects//locations//agents/`. Please see - * {@see EnvironmentsClient::agentName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\Environment $environment Required. The environment to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateEnvironmentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Environment $environment): self - { - return (new self()) - ->setParent($parent) - ->setEnvironment($environment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - * `projects//locations//agents/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Environment $environment - * Required. The environment to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - * `projects//locations//agents/`. - * - * 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][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - * `projects//locations//agents/`. - * - * 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.cx.v3.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Environment::class); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExperimentRequest.php deleted file mode 100644 index 3e24428f7f56..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateExperimentRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateExperimentRequest - */ -class CreateExperimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The experiment to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $experiment = null; - - /** - * @param string $parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - * `projects//locations//agents//environments/`. Please see - * {@see ExperimentsClient::environmentName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment Required. The experiment to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateExperimentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment): self - { - return (new self()) - ->setParent($parent) - ->setExperiment($experiment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - * `projects//locations//agents//environments/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment - * Required. The experiment to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - * `projects//locations//agents//environments/`. - * - * 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][google.cloud.dialogflow.cx.v3.Agent] to create an - * [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - * `projects//locations//agents//environments/`. - * - * 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 experiment to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Experiment|null - */ - public function getExperiment() - { - return $this->experiment; - } - - public function hasExperiment() - { - return isset($this->experiment); - } - - public function clearExperiment() - { - unset($this->experiment); - } - - /** - * Required. The experiment to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment $var - * @return $this - */ - public function setExperiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment::class); - $this->experiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateFlowRequest.php deleted file mode 100644 index cafcee4975c2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateFlowRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateFlowRequest - */ -class CreateFlowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to create a flow for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The flow to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $flow = null; - /** - * The language of the following fields in `flow`: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - */ - protected $language_code = ''; - - /** - * @param string $parent Required. The agent to create a flow for. - * Format: `projects//locations//agents/`. Please see - * {@see FlowsClient::agentName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $flow Required. The flow to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateFlowRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Flow $flow): self - { - return (new self()) - ->setParent($parent) - ->setFlow($flow); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to create a flow for. - * Format: `projects//locations//agents/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Flow $flow - * Required. The flow to create. - * @type string $language_code - * The language of the following fields in `flow`: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to create a flow for. - * Format: `projects//locations//agents/`. - * - * 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 flow for. - * Format: `projects//locations//agents/`. - * - * 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 flow to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Flow|null - */ - public function getFlow() - { - return $this->flow; - } - - public function hasFlow() - { - return isset($this->flow); - } - - public function clearFlow() - { - unset($this->flow); - } - - /** - * Required. The flow to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $var - * @return $this - */ - public function setFlow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Flow::class); - $this->flow = $var; - - return $this; - } - - /** - * The language of the following fields in `flow`: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the following fields in `flow`: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateGeneratorRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateGeneratorRequest.php deleted file mode 100644 index a6d888dc916b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateGeneratorRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - */ -class CreateGeneratorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to create a generator for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The generator to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $generator = null; - /** - * The language to create generators for the following fields: - * * `Generator.prompt_text.text` - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 3; - */ - protected $language_code = ''; - - /** - * @param string $parent Required. The agent to create a generator for. - * Format: `projects//locations//agents/`. Please see - * {@see GeneratorsClient::agentName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\Generator $generator Required. The generator to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateGeneratorRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Generator $generator): self - { - return (new self()) - ->setParent($parent) - ->setGenerator($generator); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to create a generator for. - * Format: `projects//locations//agents/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Generator $generator - * Required. The generator to create. - * @type string $language_code - * The language to create generators for the following fields: - * * `Generator.prompt_text.text` - * If not specified, the agent's default language is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to create a generator for. - * Format: `projects//locations//agents/`. - * - * 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 generator for. - * Format: `projects//locations//agents/`. - * - * 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 generator to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Generator|null - */ - public function getGenerator() - { - return $this->generator; - } - - public function hasGenerator() - { - return isset($this->generator); - } - - public function clearGenerator() - { - unset($this->generator); - } - - /** - * Required. The generator to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Generator $var - * @return $this - */ - public function setGenerator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Generator::class); - $this->generator = $var; - - return $this; - } - - /** - * The language to create generators for the following fields: - * * `Generator.prompt_text.text` - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 3; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to create generators for the following fields: - * * `Generator.prompt_text.text` - * If not specified, the agent's default language is used. - * - * 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateIntentRequest.php deleted file mode 100644 index 1525af676e71..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateIntentRequest.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateIntentRequest - */ -class CreateIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to create an intent for. - * Format: `projects//locations//agents/`. - * - * 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.cx.v3.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $intent = null; - /** - * The language of the following fields in `intent`: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - */ - protected $language_code = ''; - - /** - * @param string $parent Required. The agent to create an intent for. - * Format: `projects//locations//agents/`. Please see - * {@see IntentsClient::agentName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $intent Required. The intent to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateIntentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Intent $intent): self - { - return (new self()) - ->setParent($parent) - ->setIntent($intent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to create an intent for. - * Format: `projects//locations//agents/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Intent $intent - * Required. The intent to create. - * @type string $language_code - * The language of the following fields in `intent`: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to create an intent for. - * Format: `projects//locations//agents/`. - * - * 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 intent for. - * Format: `projects//locations//agents/`. - * - * 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.cx.v3.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Intent intent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Intent::class); - $this->intent = $var; - - return $this; - } - - /** - * The language of the following fields in `intent`: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the following fields in `intent`: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePageRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePageRequest.php deleted file mode 100644 index 6fac94bb204b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreatePageRequest.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreatePageRequest - */ -class CreatePageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The flow to create a page for. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The page to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page = null; - /** - * The language of the following fields in `page`: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - */ - protected $language_code = ''; - - /** - * @param string $parent Required. The flow to create a page for. - * Format: - * `projects//locations//agents//flows/`. Please see - * {@see PagesClient::flowName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\Page $page Required. The page to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreatePageRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Page $page): self - { - return (new self()) - ->setParent($parent) - ->setPage($page); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The flow to create a page for. - * Format: - * `projects//locations//agents//flows/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Page $page - * Required. The page to create. - * @type string $language_code - * The language of the following fields in `page`: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Required. The flow to create a page for. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 flow to create a page for. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 page to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null - */ - public function getPage() - { - return $this->page; - } - - public function hasPage() - { - return isset($this->page); - } - - public function clearPage() - { - unset($this->page); - } - - /** - * Required. The page to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var - * @return $this - */ - public function setPage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); - $this->page = $var; - - return $this; - } - - /** - * The language of the following fields in `page`: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the following fields in `page`: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSecuritySettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSecuritySettingsRequest.php deleted file mode 100644 index 86a69de5e77f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSecuritySettingsRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest - */ -class CreateSecuritySettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location to create an - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. - * Format: `projects//locations/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The security settings to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $security_settings = null; - - /** - * @param string $parent Required. The location to create an - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. - * Format: `projects//locations/`. Please see - * {@see SecuritySettingsServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $securitySettings Required. The security settings to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateSecuritySettingsRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $securitySettings): self - { - return (new self()) - ->setParent($parent) - ->setSecuritySettings($securitySettings); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location to create an - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. - * Format: `projects//locations/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $security_settings - * Required. The security settings to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location to create an - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] 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 location to create an - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] 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 security settings to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings|null - */ - public function getSecuritySettings() - { - return $this->security_settings; - } - - public function hasSecuritySettings() - { - return isset($this->security_settings); - } - - public function clearSecuritySettings() - { - unset($this->security_settings); - } - - /** - * Required. The security settings to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $var - * @return $this - */ - public function setSecuritySettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::class); - $this->security_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSessionEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSessionEntityTypeRequest.php deleted file mode 100644 index ac1aaeb53278..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateSessionEntityTypeRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest - */ -class CreateSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The session to create a session entity type for. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * - * 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.cx.v3.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $session_entity_type = null; - - /** - * @param string $parent Required. The session to create a session entity type for. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. Please see - * {@see SessionEntityTypesClient::sessionName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $sessionEntityType Required. The session entity type to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateSessionEntityTypeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $sessionEntityType): self - { - return (new self()) - ->setParent($parent) - ->setSessionEntityType($sessionEntityType); - } - - /** - * 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//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * @type \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $session_entity_type - * Required. The session entity type to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The session to create a session entity type for. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default '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 session to create a session entity type for. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default '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; - } - - /** - * Required. The session entity type to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.SessionEntityType session_entity_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $var - * @return $this - */ - public function setSessionEntityType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::class); - $this->session_entity_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTestCaseRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTestCaseRequest.php deleted file mode 100644 index c61290e07925..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTestCaseRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateTestCaseRequest - */ -class CreateTestCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to create the test case for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The test case to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $test_case = null; - - /** - * @param string $parent Required. The agent to create the test case for. - * Format: `projects//locations//agents/`. Please see - * {@see TestCasesClient::agentName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\TestCase $testCase Required. The test case to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateTestCaseRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\TestCase $testCase): self - { - return (new self()) - ->setParent($parent) - ->setTestCase($testCase); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to create the test case for. - * Format: `projects//locations//agents/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\TestCase $test_case - * Required. The test case to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to create the test case for. - * Format: `projects//locations//agents/`. - * - * 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 the test case for. - * Format: `projects//locations//agents/`. - * - * 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 test case to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\TestCase|null - */ - public function getTestCase() - { - return $this->test_case; - } - - public function hasTestCase() - { - return isset($this->test_case); - } - - public function clearTestCase() - { - unset($this->test_case); - } - - /** - * Required. The test case to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\TestCase $var - * @return $this - */ - public function setTestCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestCase::class); - $this->test_case = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTransitionRouteGroupRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTransitionRouteGroupRequest.php deleted file mode 100644 index 13085a8d7d59..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateTransitionRouteGroupRequest.php +++ /dev/null @@ -1,219 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest - */ -class CreateTransitionRouteGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The flow to create an - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * for. Format: - * `projects//locations//agents//flows/` - * or `projects//locations//agents/` - * for agent-level groups. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The transition route group to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $transition_route_group = null; - /** - * The language of the following fields in `TransitionRouteGroup`: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - */ - protected $language_code = ''; - - /** - * @param string $parent Required. The flow to create an - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * for. Format: - * `projects//locations//agents//flows/` - * or `projects//locations//agents/` - * for agent-level groups. Please see - * {@see TransitionRouteGroupsClient::flowName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transitionRouteGroup Required. The transition route group to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateTransitionRouteGroupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transitionRouteGroup): self - { - return (new self()) - ->setParent($parent) - ->setTransitionRouteGroup($transitionRouteGroup); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The flow to create an - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * for. Format: - * `projects//locations//agents//flows/` - * or `projects//locations//agents/` - * for agent-level groups. - * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transition_route_group - * Required. The transition route group to create. - * @type string $language_code - * The language of the following fields in `TransitionRouteGroup`: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\TransitionRouteGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The flow to create an - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * for. Format: - * `projects//locations//agents//flows/` - * or `projects//locations//agents/` - * for agent-level groups. - * - * 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 flow to create an - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * for. Format: - * `projects//locations//agents//flows/` - * or `projects//locations//agents/` - * for agent-level groups. - * - * 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 transition route group to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup|null - */ - public function getTransitionRouteGroup() - { - return $this->transition_route_group; - } - - public function hasTransitionRouteGroup() - { - return isset($this->transition_route_group); - } - - public function clearTransitionRouteGroup() - { - unset($this->transition_route_group); - } - - /** - * Required. The transition route group to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $var - * @return $this - */ - public function setTransitionRouteGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::class); - $this->transition_route_group = $var; - - return $this; - } - - /** - * The language of the following fields in `TransitionRouteGroup`: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the following fields in `TransitionRouteGroup`: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionOperationMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionOperationMetadata.php deleted file mode 100644 index af1c5c45c1bd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionOperationMetadata.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata - */ -class CreateVersionOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the created version. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Name of the created version. - * Format: - * `projects//locations//agents//flows//versions/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * Name of the created version. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Name of the created version. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionRequest.php deleted file mode 100644 index 32887cd53c1e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateVersionRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateVersionRequest - */ -class CreateVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an - * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: - * `projects//locations//agents//flows/`. - * - * 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.cx.v3.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = null; - - /** - * @param string $parent Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an - * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: - * `projects//locations//agents//flows/`. Please see - * {@see VersionsClient::flowName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\Version $version Required. The version to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateVersionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Version $version): self - { - return (new self()) - ->setParent($parent) - ->setVersion($version); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an - * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: - * `projects//locations//agents//flows/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Version $version - * Required. The version to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an - * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: - * `projects//locations//agents//flows/`. - * - * 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 [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an - * [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: - * `projects//locations//agents//flows/`. - * - * 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.cx.v3.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Version version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Version::class); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateWebhookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateWebhookRequest.php deleted file mode 100644 index b3a09aa0e45f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/CreateWebhookRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.dialogflow.cx.v3.CreateWebhookRequest - */ -class CreateWebhookRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to create a webhook for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The webhook to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $webhook = null; - - /** - * @param string $parent Required. The agent to create a webhook for. - * Format: `projects//locations//agents/`. Please see - * {@see WebhooksClient::agentName()} for help formatting this field. - * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook Required. The webhook to create. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\CreateWebhookRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook): self - { - return (new self()) - ->setParent($parent) - ->setWebhook($webhook); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to create a webhook for. - * Format: `projects//locations//agents/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook - * Required. The webhook to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to create a webhook for. - * Format: `projects//locations//agents/`. - * - * 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 webhook for. - * Format: `projects//locations//agents/`. - * - * 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 webhook to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook|null - */ - public function getWebhook() - { - return $this->webhook; - } - - public function hasWebhook() - { - return isset($this->webhook); - } - - public function clearWebhook() - { - unset($this->webhook); - } - - /** - * Required. The webhook to create. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook $var - * @return $this - */ - public function setWebhook($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook::class); - $this->webhook = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php deleted file mode 100644 index f8f399897a2c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnection.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnection - */ -class DataStoreConnection extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the connected data store. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; - */ - protected $data_store_type = 0; - /** - * The full name of the referenced data store. - * Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * - * Generated from protobuf field string data_store = 2; - */ - protected $data_store = ''; - /** - * The document processing mode for the data store connection. Should only be - * set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is - * considered as DOCUMENTS, as this is the legacy mode. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DocumentProcessingMode document_processing_mode = 4; - */ - protected $document_processing_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $data_store_type - * The type of the connected data store. - * @type string $data_store - * The full name of the referenced data store. - * Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * @type int $document_processing_mode - * The document processing mode for the data store connection. Should only be - * set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is - * considered as DOCUMENTS, as this is the legacy mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); - parent::__construct($data); - } - - /** - * The type of the connected data store. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; - * @return int - */ - public function getDataStoreType() - { - return $this->data_store_type; - } - - /** - * The type of the connected data store. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreType data_store_type = 1; - * @param int $var - * @return $this - */ - public function setDataStoreType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreType::class); - $this->data_store_type = $var; - - return $this; - } - - /** - * The full name of the referenced data store. - * Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * - * Generated from protobuf field string data_store = 2; - * @return string - */ - public function getDataStore() - { - return $this->data_store; - } - - /** - * The full name of the referenced data store. - * Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * - * Generated from protobuf field string data_store = 2; - * @param string $var - * @return $this - */ - public function setDataStore($var) - { - GPBUtil::checkString($var, True); - $this->data_store = $var; - - return $this; - } - - /** - * The document processing mode for the data store connection. Should only be - * set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is - * considered as DOCUMENTS, as this is the legacy mode. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DocumentProcessingMode document_processing_mode = 4; - * @return int - */ - public function getDocumentProcessingMode() - { - return $this->document_processing_mode; - } - - /** - * The document processing mode for the data store connection. Should only be - * set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is - * considered as DOCUMENTS, as this is the legacy mode. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DocumentProcessingMode document_processing_mode = 4; - * @param int $var - * @return $this - */ - public function setDocumentProcessingMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DocumentProcessingMode::class); - $this->document_processing_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals.php deleted file mode 100644 index 67df54bb0610..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals.php +++ /dev/null @@ -1,394 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals - */ -class DataStoreConnectionSignals extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Diagnostic info related to the rewriter model call. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals rewriter_model_call_signals = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rewriter_model_call_signals = null; - /** - * Optional. Rewritten string query used for search. - * - * Generated from protobuf field string rewritten_query = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rewritten_query = ''; - /** - * Optional. Search snippets included in the answer generation prompt. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippets = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $search_snippets; - /** - * Optional. Diagnostic info related to the answer generation model call. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $answer_generation_model_call_signals = null; - /** - * Optional. The final compiled answer. - * - * Generated from protobuf field string answer = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $answer = ''; - /** - * Optional. Answer parts with relevant citations. - * Concatenation of texts should add up the `answer` (not counting - * whitespaces). - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart answer_parts = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $answer_parts; - /** - * Optional. Snippets cited by the answer generation model from the most to - * least relevant. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet cited_snippets = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $cited_snippets; - /** - * Optional. Grounding signals. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals grounding_signals = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $grounding_signals = null; - /** - * Optional. Safety check result. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals safety_signals = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $safety_signals = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals $rewriter_model_call_signals - * Optional. Diagnostic info related to the rewriter model call. - * @type string $rewritten_query - * Optional. Rewritten string query used for search. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet>|\Google\Protobuf\Internal\RepeatedField $search_snippets - * Optional. Search snippets included in the answer generation prompt. - * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals $answer_generation_model_call_signals - * Optional. Diagnostic info related to the answer generation model call. - * @type string $answer - * Optional. The final compiled answer. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerPart>|\Google\Protobuf\Internal\RepeatedField $answer_parts - * Optional. Answer parts with relevant citations. - * Concatenation of texts should add up the `answer` (not counting - * whitespaces). - * @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\CitedSnippet>|\Google\Protobuf\Internal\RepeatedField $cited_snippets - * Optional. Snippets cited by the answer generation model from the most to - * least relevant. - * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals $grounding_signals - * Optional. Grounding signals. - * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals $safety_signals - * Optional. Safety check result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Diagnostic info related to the rewriter model call. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals rewriter_model_call_signals = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals|null - */ - public function getRewriterModelCallSignals() - { - return $this->rewriter_model_call_signals; - } - - public function hasRewriterModelCallSignals() - { - return isset($this->rewriter_model_call_signals); - } - - public function clearRewriterModelCallSignals() - { - unset($this->rewriter_model_call_signals); - } - - /** - * Optional. Diagnostic info related to the rewriter model call. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals rewriter_model_call_signals = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals $var - * @return $this - */ - public function setRewriterModelCallSignals($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals::class); - $this->rewriter_model_call_signals = $var; - - return $this; - } - - /** - * Optional. Rewritten string query used for search. - * - * Generated from protobuf field string rewritten_query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRewrittenQuery() - { - return $this->rewritten_query; - } - - /** - * Optional. Rewritten string query used for search. - * - * Generated from protobuf field string rewritten_query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRewrittenQuery($var) - { - GPBUtil::checkString($var, True); - $this->rewritten_query = $var; - - return $this; - } - - /** - * Optional. Search snippets included in the answer generation prompt. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippets = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSearchSnippets() - { - return $this->search_snippets; - } - - /** - * Optional. Search snippets included in the answer generation prompt. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippets = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSearchSnippets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet::class); - $this->search_snippets = $arr; - - return $this; - } - - /** - * Optional. Diagnostic info related to the answer generation model call. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals|null - */ - public function getAnswerGenerationModelCallSignals() - { - return $this->answer_generation_model_call_signals; - } - - public function hasAnswerGenerationModelCallSignals() - { - return isset($this->answer_generation_model_call_signals); - } - - public function clearAnswerGenerationModelCallSignals() - { - unset($this->answer_generation_model_call_signals); - } - - /** - * Optional. Diagnostic info related to the answer generation model call. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals $var - * @return $this - */ - public function setAnswerGenerationModelCallSignals($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals::class); - $this->answer_generation_model_call_signals = $var; - - return $this; - } - - /** - * Optional. The final compiled answer. - * - * Generated from protobuf field string answer = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAnswer() - { - return $this->answer; - } - - /** - * Optional. The final compiled answer. - * - * Generated from protobuf field string answer = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAnswer($var) - { - GPBUtil::checkString($var, True); - $this->answer = $var; - - return $this; - } - - /** - * Optional. Answer parts with relevant citations. - * Concatenation of texts should add up the `answer` (not counting - * whitespaces). - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart answer_parts = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnswerParts() - { - return $this->answer_parts; - } - - /** - * Optional. Answer parts with relevant citations. - * Concatenation of texts should add up the `answer` (not counting - * whitespaces). - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart answer_parts = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerPart>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnswerParts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerPart::class); - $this->answer_parts = $arr; - - return $this; - } - - /** - * Optional. Snippets cited by the answer generation model from the most to - * least relevant. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet cited_snippets = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCitedSnippets() - { - return $this->cited_snippets; - } - - /** - * Optional. Snippets cited by the answer generation model from the most to - * least relevant. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet cited_snippets = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\CitedSnippet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCitedSnippets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\CitedSnippet::class); - $this->cited_snippets = $arr; - - return $this; - } - - /** - * Optional. Grounding signals. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals grounding_signals = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals|null - */ - public function getGroundingSignals() - { - return $this->grounding_signals; - } - - public function hasGroundingSignals() - { - return isset($this->grounding_signals); - } - - public function clearGroundingSignals() - { - unset($this->grounding_signals); - } - - /** - * Optional. Grounding signals. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals grounding_signals = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals $var - * @return $this - */ - public function setGroundingSignals($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals::class); - $this->grounding_signals = $var; - - return $this; - } - - /** - * Optional. Safety check result. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals safety_signals = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals|null - */ - public function getSafetySignals() - { - return $this->safety_signals; - } - - public function hasSafetySignals() - { - return isset($this->safety_signals); - } - - public function clearSafetySignals() - { - unset($this->safety_signals); - } - - /** - * Optional. Safety check result. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals safety_signals = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals $var - * @return $this - */ - public function setSafetySignals($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals::class); - $this->safety_signals = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerGenerationModelCallSignals.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerGenerationModelCallSignals.php deleted file mode 100644 index a69b6996bff9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerGenerationModelCallSignals.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals - */ -class AnswerGenerationModelCallSignals extends \Google\Protobuf\Internal\Message -{ - /** - * Prompt as sent to the model. - * - * Generated from protobuf field string rendered_prompt = 1; - */ - protected $rendered_prompt = ''; - /** - * Output of the generative model. - * - * Generated from protobuf field string model_output = 2; - */ - protected $model_output = ''; - /** - * Name of the generative model. For example, "gemini-ultra", "gemini-pro", - * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. - * - * Generated from protobuf field string model = 3; - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $rendered_prompt - * Prompt as sent to the model. - * @type string $model_output - * Output of the generative model. - * @type string $model - * Name of the generative model. For example, "gemini-ultra", "gemini-pro", - * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); - parent::__construct($data); - } - - /** - * Prompt as sent to the model. - * - * Generated from protobuf field string rendered_prompt = 1; - * @return string - */ - public function getRenderedPrompt() - { - return $this->rendered_prompt; - } - - /** - * Prompt as sent to the model. - * - * Generated from protobuf field string rendered_prompt = 1; - * @param string $var - * @return $this - */ - public function setRenderedPrompt($var) - { - GPBUtil::checkString($var, True); - $this->rendered_prompt = $var; - - return $this; - } - - /** - * Output of the generative model. - * - * Generated from protobuf field string model_output = 2; - * @return string - */ - public function getModelOutput() - { - return $this->model_output; - } - - /** - * Output of the generative model. - * - * Generated from protobuf field string model_output = 2; - * @param string $var - * @return $this - */ - public function setModelOutput($var) - { - GPBUtil::checkString($var, True); - $this->model_output = $var; - - return $this; - } - - /** - * Name of the generative model. For example, "gemini-ultra", "gemini-pro", - * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. - * - * Generated from protobuf field string model = 3; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Name of the generative model. For example, "gemini-ultra", "gemini-pro", - * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. - * - * Generated from protobuf field string model = 3; - * @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(AnswerGenerationModelCallSignals::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_AnswerGenerationModelCallSignals::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerPart.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerPart.php deleted file mode 100644 index a48bd07a061b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/AnswerPart.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart - */ -class AnswerPart extends \Google\Protobuf\Internal\Message -{ - /** - * Substring of the answer. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * Citations for this answer part. Indices of `search_snippets`. - * - * Generated from protobuf field repeated int32 supporting_indices = 2; - */ - private $supporting_indices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Substring of the answer. - * @type array|\Google\Protobuf\Internal\RepeatedField $supporting_indices - * Citations for this answer part. Indices of `search_snippets`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); - parent::__construct($data); - } - - /** - * Substring of the answer. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Substring of the answer. - * - * 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; - } - - /** - * Citations for this answer part. Indices of `search_snippets`. - * - * Generated from protobuf field repeated int32 supporting_indices = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportingIndices() - { - return $this->supporting_indices; - } - - /** - * Citations for this answer part. Indices of `search_snippets`. - * - * Generated from protobuf field repeated int32 supporting_indices = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportingIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->supporting_indices = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnswerPart::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_AnswerPart::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/CitedSnippet.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/CitedSnippet.php deleted file mode 100644 index e5f9dfb6e763..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/CitedSnippet.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet - */ -class CitedSnippet extends \Google\Protobuf\Internal\Message -{ - /** - * Details of the snippet. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippet = 1; - */ - protected $search_snippet = null; - /** - * Index of the snippet in `search_snippets` field. - * - * Generated from protobuf field int32 snippet_index = 2; - */ - protected $snippet_index = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet $search_snippet - * Details of the snippet. - * @type int $snippet_index - * Index of the snippet in `search_snippets` field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); - parent::__construct($data); - } - - /** - * Details of the snippet. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippet = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet|null - */ - public function getSearchSnippet() - { - return $this->search_snippet; - } - - public function hasSearchSnippet() - { - return isset($this->search_snippet); - } - - public function clearSearchSnippet() - { - unset($this->search_snippet); - } - - /** - * Details of the snippet. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippet = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet $var - * @return $this - */ - public function setSearchSnippet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet::class); - $this->search_snippet = $var; - - return $this; - } - - /** - * Index of the snippet in `search_snippets` field. - * - * Generated from protobuf field int32 snippet_index = 2; - * @return int - */ - public function getSnippetIndex() - { - return $this->snippet_index; - } - - /** - * Index of the snippet in `search_snippets` field. - * - * Generated from protobuf field int32 snippet_index = 2; - * @param int $var - * @return $this - */ - public function setSnippetIndex($var) - { - GPBUtil::checkInt32($var); - $this->snippet_index = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CitedSnippet::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_CitedSnippet::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals.php deleted file mode 100644 index e61c22e2e6d1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals - */ -class GroundingSignals extends \Google\Protobuf\Internal\Message -{ - /** - * Represents the decision of the grounding check. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingDecision decision = 1; - */ - protected $decision = 0; - /** - * Grounding score bucket setting. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingScoreBucket score = 2; - */ - protected $score = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $decision - * Represents the decision of the grounding check. - * @type int $score - * Grounding score bucket setting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); - parent::__construct($data); - } - - /** - * Represents the decision of the grounding check. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingDecision decision = 1; - * @return int - */ - public function getDecision() - { - return $this->decision; - } - - /** - * Represents the decision of the grounding check. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingDecision decision = 1; - * @param int $var - * @return $this - */ - public function setDecision($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals\GroundingDecision::class); - $this->decision = $var; - - return $this; - } - - /** - * Grounding score bucket setting. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingScoreBucket score = 2; - * @return int - */ - public function getScore() - { - return $this->score; - } - - /** - * Grounding score bucket setting. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingScoreBucket score = 2; - * @param int $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals\GroundingScoreBucket::class); - $this->score = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GroundingSignals::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_GroundingSignals::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingDecision.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingDecision.php deleted file mode 100644 index 0329eb749b00..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingDecision.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingDecision - */ -class GroundingDecision -{ - /** - * Decision not specified. - * - * Generated from protobuf enum GROUNDING_DECISION_UNSPECIFIED = 0; - */ - const GROUNDING_DECISION_UNSPECIFIED = 0; - /** - * Grounding have accepted the answer. - * - * Generated from protobuf enum ACCEPTED_BY_GROUNDING = 1; - */ - const ACCEPTED_BY_GROUNDING = 1; - /** - * Grounding have rejected the answer. - * - * Generated from protobuf enum REJECTED_BY_GROUNDING = 2; - */ - const REJECTED_BY_GROUNDING = 2; - - private static $valueToName = [ - self::GROUNDING_DECISION_UNSPECIFIED => 'GROUNDING_DECISION_UNSPECIFIED', - self::ACCEPTED_BY_GROUNDING => 'ACCEPTED_BY_GROUNDING', - self::REJECTED_BY_GROUNDING => 'REJECTED_BY_GROUNDING', - ]; - - 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(GroundingDecision::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_GroundingSignals_GroundingDecision::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingScoreBucket.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingScoreBucket.php deleted file mode 100644 index 3cef82a2fdc9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/GroundingSignals/GroundingScoreBucket.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingScoreBucket - */ -class GroundingScoreBucket -{ - /** - * Score not specified. - * - * Generated from protobuf enum GROUNDING_SCORE_BUCKET_UNSPECIFIED = 0; - */ - const GROUNDING_SCORE_BUCKET_UNSPECIFIED = 0; - /** - * We have very low confidence that the answer is grounded. - * - * Generated from protobuf enum VERY_LOW = 1; - */ - const VERY_LOW = 1; - /** - * We have low confidence that the answer is grounded. - * - * Generated from protobuf enum LOW = 3; - */ - const LOW = 3; - /** - * We have medium confidence that the answer is grounded. - * - * Generated from protobuf enum MEDIUM = 4; - */ - const MEDIUM = 4; - /** - * We have high confidence that the answer is grounded. - * - * Generated from protobuf enum HIGH = 5; - */ - const HIGH = 5; - /** - * We have very high confidence that the answer is grounded. - * - * Generated from protobuf enum VERY_HIGH = 6; - */ - const VERY_HIGH = 6; - - private static $valueToName = [ - self::GROUNDING_SCORE_BUCKET_UNSPECIFIED => 'GROUNDING_SCORE_BUCKET_UNSPECIFIED', - self::VERY_LOW => 'VERY_LOW', - self::LOW => 'LOW', - self::MEDIUM => 'MEDIUM', - self::HIGH => 'HIGH', - self::VERY_HIGH => 'VERY_HIGH', - ]; - - 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(GroundingScoreBucket::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_GroundingSignals_GroundingScoreBucket::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/RewriterModelCallSignals.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/RewriterModelCallSignals.php deleted file mode 100644 index b6048943b854..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/RewriterModelCallSignals.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals - */ -class RewriterModelCallSignals extends \Google\Protobuf\Internal\Message -{ - /** - * Prompt as sent to the model. - * - * Generated from protobuf field string rendered_prompt = 1; - */ - protected $rendered_prompt = ''; - /** - * Output of the generative model. - * - * Generated from protobuf field string model_output = 2; - */ - protected $model_output = ''; - /** - * Name of the generative model. For example, "gemini-ultra", "gemini-pro", - * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. - * - * Generated from protobuf field string model = 3; - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $rendered_prompt - * Prompt as sent to the model. - * @type string $model_output - * Output of the generative model. - * @type string $model - * Name of the generative model. For example, "gemini-ultra", "gemini-pro", - * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); - parent::__construct($data); - } - - /** - * Prompt as sent to the model. - * - * Generated from protobuf field string rendered_prompt = 1; - * @return string - */ - public function getRenderedPrompt() - { - return $this->rendered_prompt; - } - - /** - * Prompt as sent to the model. - * - * Generated from protobuf field string rendered_prompt = 1; - * @param string $var - * @return $this - */ - public function setRenderedPrompt($var) - { - GPBUtil::checkString($var, True); - $this->rendered_prompt = $var; - - return $this; - } - - /** - * Output of the generative model. - * - * Generated from protobuf field string model_output = 2; - * @return string - */ - public function getModelOutput() - { - return $this->model_output; - } - - /** - * Output of the generative model. - * - * Generated from protobuf field string model_output = 2; - * @param string $var - * @return $this - */ - public function setModelOutput($var) - { - GPBUtil::checkString($var, True); - $this->model_output = $var; - - return $this; - } - - /** - * Name of the generative model. For example, "gemini-ultra", "gemini-pro", - * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. - * - * Generated from protobuf field string model = 3; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Name of the generative model. For example, "gemini-ultra", "gemini-pro", - * "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. - * - * Generated from protobuf field string model = 3; - * @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(RewriterModelCallSignals::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_RewriterModelCallSignals::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals.php deleted file mode 100644 index e15244e03bc1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals - */ -class SafetySignals extends \Google\Protobuf\Internal\Message -{ - /** - * Safety decision. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.SafetyDecision decision = 1; - */ - protected $decision = 0; - /** - * Specifies banned phrase match subject. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.BannedPhraseMatch banned_phrase_match = 2; - */ - protected $banned_phrase_match = 0; - /** - * The matched banned phrase if there was a match. - * - * Generated from protobuf field string matched_banned_phrase = 3; - */ - protected $matched_banned_phrase = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $decision - * Safety decision. - * @type int $banned_phrase_match - * Specifies banned phrase match subject. - * @type string $matched_banned_phrase - * The matched banned phrase if there was a match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); - parent::__construct($data); - } - - /** - * Safety decision. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.SafetyDecision decision = 1; - * @return int - */ - public function getDecision() - { - return $this->decision; - } - - /** - * Safety decision. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.SafetyDecision decision = 1; - * @param int $var - * @return $this - */ - public function setDecision($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals\SafetyDecision::class); - $this->decision = $var; - - return $this; - } - - /** - * Specifies banned phrase match subject. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.BannedPhraseMatch banned_phrase_match = 2; - * @return int - */ - public function getBannedPhraseMatch() - { - return $this->banned_phrase_match; - } - - /** - * Specifies banned phrase match subject. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.BannedPhraseMatch banned_phrase_match = 2; - * @param int $var - * @return $this - */ - public function setBannedPhraseMatch($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals\BannedPhraseMatch::class); - $this->banned_phrase_match = $var; - - return $this; - } - - /** - * The matched banned phrase if there was a match. - * - * Generated from protobuf field string matched_banned_phrase = 3; - * @return string - */ - public function getMatchedBannedPhrase() - { - return $this->matched_banned_phrase; - } - - /** - * The matched banned phrase if there was a match. - * - * Generated from protobuf field string matched_banned_phrase = 3; - * @param string $var - * @return $this - */ - public function setMatchedBannedPhrase($var) - { - GPBUtil::checkString($var, True); - $this->matched_banned_phrase = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SafetySignals::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_SafetySignals::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/BannedPhraseMatch.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/BannedPhraseMatch.php deleted file mode 100644 index 15f0435195b7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/BannedPhraseMatch.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.BannedPhraseMatch - */ -class BannedPhraseMatch -{ - /** - * No banned phrase check was executed. - * - * Generated from protobuf enum BANNED_PHRASE_MATCH_UNSPECIFIED = 0; - */ - const BANNED_PHRASE_MATCH_UNSPECIFIED = 0; - /** - * All banned phrase checks led to no match. - * - * Generated from protobuf enum BANNED_PHRASE_MATCH_NONE = 1; - */ - const BANNED_PHRASE_MATCH_NONE = 1; - /** - * A banned phrase matched the query. - * - * Generated from protobuf enum BANNED_PHRASE_MATCH_QUERY = 2; - */ - const BANNED_PHRASE_MATCH_QUERY = 2; - /** - * A banned phrase matched the response. - * - * Generated from protobuf enum BANNED_PHRASE_MATCH_RESPONSE = 3; - */ - const BANNED_PHRASE_MATCH_RESPONSE = 3; - - private static $valueToName = [ - self::BANNED_PHRASE_MATCH_UNSPECIFIED => 'BANNED_PHRASE_MATCH_UNSPECIFIED', - self::BANNED_PHRASE_MATCH_NONE => 'BANNED_PHRASE_MATCH_NONE', - self::BANNED_PHRASE_MATCH_QUERY => 'BANNED_PHRASE_MATCH_QUERY', - self::BANNED_PHRASE_MATCH_RESPONSE => 'BANNED_PHRASE_MATCH_RESPONSE', - ]; - - 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(BannedPhraseMatch::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_SafetySignals_BannedPhraseMatch::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/SafetyDecision.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/SafetyDecision.php deleted file mode 100644 index c5488b4e85a4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SafetySignals/SafetyDecision.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals.SafetyDecision - */ -class SafetyDecision -{ - /** - * Decision not specified. - * - * Generated from protobuf enum SAFETY_DECISION_UNSPECIFIED = 0; - */ - const SAFETY_DECISION_UNSPECIFIED = 0; - /** - * No manual or automatic safety check fired. - * - * Generated from protobuf enum ACCEPTED_BY_SAFETY_CHECK = 1; - */ - const ACCEPTED_BY_SAFETY_CHECK = 1; - /** - * One ore more safety checks fired. - * - * Generated from protobuf enum REJECTED_BY_SAFETY_CHECK = 2; - */ - const REJECTED_BY_SAFETY_CHECK = 2; - - private static $valueToName = [ - self::SAFETY_DECISION_UNSPECIFIED => 'SAFETY_DECISION_UNSPECIFIED', - self::ACCEPTED_BY_SAFETY_CHECK => 'ACCEPTED_BY_SAFETY_CHECK', - self::REJECTED_BY_SAFETY_CHECK => 'REJECTED_BY_SAFETY_CHECK', - ]; - - 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(SafetyDecision::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_SafetySignals_SafetyDecision::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SearchSnippet.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SearchSnippet.php deleted file mode 100644 index 68433b01ae90..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreConnectionSignals/SearchSnippet.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet - */ -class SearchSnippet extends \Google\Protobuf\Internal\Message -{ - /** - * Title of the enclosing document. - * - * Generated from protobuf field string document_title = 1; - */ - protected $document_title = ''; - /** - * Uri for the document. Present if specified for the document. - * - * Generated from protobuf field string document_uri = 2; - */ - protected $document_uri = ''; - /** - * Text included in the prompt. - * - * Generated from protobuf field string text = 3; - */ - protected $text = ''; - /** - * Metadata associated with the document. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 5; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document_title - * Title of the enclosing document. - * @type string $document_uri - * Uri for the document. Present if specified for the document. - * @type string $text - * Text included in the prompt. - * @type \Google\Protobuf\Struct $metadata - * Metadata associated with the document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce(); - parent::__construct($data); - } - - /** - * Title of the enclosing document. - * - * Generated from protobuf field string document_title = 1; - * @return string - */ - public function getDocumentTitle() - { - return $this->document_title; - } - - /** - * Title of the enclosing document. - * - * Generated from protobuf field string document_title = 1; - * @param string $var - * @return $this - */ - public function setDocumentTitle($var) - { - GPBUtil::checkString($var, True); - $this->document_title = $var; - - return $this; - } - - /** - * Uri for the document. Present if specified for the document. - * - * Generated from protobuf field string document_uri = 2; - * @return string - */ - public function getDocumentUri() - { - return $this->document_uri; - } - - /** - * Uri for the document. Present if specified for the document. - * - * Generated from protobuf field string document_uri = 2; - * @param string $var - * @return $this - */ - public function setDocumentUri($var) - { - GPBUtil::checkString($var, True); - $this->document_uri = $var; - - return $this; - } - - /** - * Text included in the prompt. - * - * Generated from protobuf field string text = 3; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Text included in the prompt. - * - * Generated from protobuf field string text = 3; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Metadata associated with the document. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 5; - * @return \Google\Protobuf\Struct|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Metadata associated with the document. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 5; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->metadata = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SearchSnippet::class, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals_SearchSnippet::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreType.php deleted file mode 100644 index 1821768ce42b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DataStoreType.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.cx.v3.DataStoreType - */ -class DataStoreType -{ - /** - * Not specified. This value indicates that the data store type is not - * specified, so it will not be used during search. - * - * Generated from protobuf enum DATA_STORE_TYPE_UNSPECIFIED = 0; - */ - const DATA_STORE_TYPE_UNSPECIFIED = 0; - /** - * A data store that contains public web content. - * - * Generated from protobuf enum PUBLIC_WEB = 1; - */ - const PUBLIC_WEB = 1; - /** - * A data store that contains unstructured private data. - * - * Generated from protobuf enum UNSTRUCTURED = 2; - */ - const UNSTRUCTURED = 2; - /** - * A data store that contains structured data (for example FAQ). - * - * Generated from protobuf enum STRUCTURED = 3; - */ - const STRUCTURED = 3; - - private static $valueToName = [ - self::DATA_STORE_TYPE_UNSPECIFIED => 'DATA_STORE_TYPE_UNSPECIFIED', - self::PUBLIC_WEB => 'PUBLIC_WEB', - self::UNSTRUCTURED => 'UNSTRUCTURED', - self::STRUCTURED => 'STRUCTURED', - ]; - - 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteAgentRequest.php deleted file mode 100644 index eb1b6ddaa6e3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteAgentRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteAgentRequest - */ -class DeleteAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the agent to delete. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the agent to delete. - * Format: `projects//locations//agents/`. Please see - * {@see AgentsClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteAgentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the agent to delete. - * Format: `projects//locations//agents/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the agent to delete. - * Format: `projects//locations//agents/`. - * - * 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 agent to delete. - * Format: `projects//locations//agents/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEntityTypeRequest.php deleted file mode 100644 index dea705ed203d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEntityTypeRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - */ -class DeleteEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entity type to delete. - * Format: - * `projects//locations//agents//entityTypes/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * This field has no effect for entity type not being used. - * For entity types that are used by intents or pages: - * * If `force` is set to false, an error will be returned with message - * indicating the referencing resources. - * * If `force` is set to true, Dialogflow will remove the entity type, as - * well as any references to the entity type (i.e. Page - * [parameter][google.cloud.dialogflow.cx.v3.Form.Parameter] of the entity - * type will be changed to - * '@sys.any' and intent - * [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] of the - * entity type will be removed). - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the entity type to delete. - * Format: - * `projects//locations//agents//entityTypes/`. Please see - * {@see EntityTypesClient::entityTypeName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteEntityTypeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entity type to delete. - * Format: - * `projects//locations//agents//entityTypes/`. - * @type bool $force - * This field has no effect for entity type not being used. - * For entity types that are used by intents or pages: - * * If `force` is set to false, an error will be returned with message - * indicating the referencing resources. - * * If `force` is set to true, Dialogflow will remove the entity type, as - * well as any references to the entity type (i.e. Page - * [parameter][google.cloud.dialogflow.cx.v3.Form.Parameter] of the entity - * type will be changed to - * '@sys.any' and intent - * [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] of the - * entity type will be removed). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entity type to delete. - * Format: - * `projects//locations//agents//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//locations//agents//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; - } - - /** - * This field has no effect for entity type not being used. - * For entity types that are used by intents or pages: - * * If `force` is set to false, an error will be returned with message - * indicating the referencing resources. - * * If `force` is set to true, Dialogflow will remove the entity type, as - * well as any references to the entity type (i.e. Page - * [parameter][google.cloud.dialogflow.cx.v3.Form.Parameter] of the entity - * type will be changed to - * '@sys.any' and intent - * [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] of the - * entity type will be removed). - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * This field has no effect for entity type not being used. - * For entity types that are used by intents or pages: - * * If `force` is set to false, an error will be returned with message - * indicating the referencing resources. - * * If `force` is set to true, Dialogflow will remove the entity type, as - * well as any references to the entity type (i.e. Page - * [parameter][google.cloud.dialogflow.cx.v3.Form.Parameter] of the entity - * type will be changed to - * '@sys.any' and intent - * [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] of the - * entity type will be removed). - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEnvironmentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEnvironmentRequest.php deleted file mode 100644 index e6c6bedcfb9b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteEnvironmentRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest - */ -class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - * `projects//locations//agents//environments/`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteEnvironmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - * `projects//locations//agents//environments/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - * `projects//locations//agents//environments/`. - * - * 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][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - * `projects//locations//agents//environments/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExperimentRequest.php deleted file mode 100644 index a71540139d64..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteExperimentRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteExperimentRequest - */ -class DeleteExperimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - * `projects//locations//agents//environments//experiments/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - * `projects//locations//agents//environments//experiments/`. Please see - * {@see ExperimentsClient::experimentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteExperimentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - * `projects//locations//agents//environments//experiments/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - * `projects//locations//agents//environments//experiments/`. - * - * 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][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - * `projects//locations//agents//environments//experiments/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteFlowRequest.php deleted file mode 100644 index 7bbcd2aba2ca..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteFlowRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteFlowRequest - */ -class DeleteFlowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the flow to delete. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * This field has no effect for flows with no incoming transitions. - * For flows with incoming transitions: - * * If `force` is set to false, an error will be returned with message - * indicating the incoming transitions. - * * If `force` is set to true, Dialogflow will remove the flow, as well as - * any transitions to the flow (i.e. [Target - * flow][EventHandler.target_flow] in event handlers or [Target - * flow][TransitionRoute.target_flow] in transition routes that point to - * this flow will be cleared). - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the flow to delete. - * Format: - * `projects//locations//agents//flows/`. Please see - * {@see FlowsClient::flowName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteFlowRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the flow to delete. - * Format: - * `projects//locations//agents//flows/`. - * @type bool $force - * This field has no effect for flows with no incoming transitions. - * For flows with incoming transitions: - * * If `force` is set to false, an error will be returned with message - * indicating the incoming transitions. - * * If `force` is set to true, Dialogflow will remove the flow, as well as - * any transitions to the flow (i.e. [Target - * flow][EventHandler.target_flow] in event handlers or [Target - * flow][TransitionRoute.target_flow] in transition routes that point to - * this flow will be cleared). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the flow to delete. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 flow to delete. - * Format: - * `projects//locations//agents//flows/`. - * - * 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; - } - - /** - * This field has no effect for flows with no incoming transitions. - * For flows with incoming transitions: - * * If `force` is set to false, an error will be returned with message - * indicating the incoming transitions. - * * If `force` is set to true, Dialogflow will remove the flow, as well as - * any transitions to the flow (i.e. [Target - * flow][EventHandler.target_flow] in event handlers or [Target - * flow][TransitionRoute.target_flow] in transition routes that point to - * this flow will be cleared). - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * This field has no effect for flows with no incoming transitions. - * For flows with incoming transitions: - * * If `force` is set to false, an error will be returned with message - * indicating the incoming transitions. - * * If `force` is set to true, Dialogflow will remove the flow, as well as - * any transitions to the flow (i.e. [Target - * flow][EventHandler.target_flow] in event handlers or [Target - * flow][TransitionRoute.target_flow] in transition routes that point to - * this flow will be cleared). - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteGeneratorRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteGeneratorRequest.php deleted file mode 100644 index f1516d54364d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteGeneratorRequest.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - */ -class DeleteGeneratorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the generator to delete. - * Format: - * `projects//locations//agents//generators/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * This field has no effect for generators not being used. - * For generators that are used by pages/flows/transition route groups: - * * If `force` is set to false, an error will be returned with message - * indicating the referenced resources. - * * If `force` is set to true, Dialogflow will remove the generator, as well - * as any references to the generator (i.e. - * [Generator][Fulfillment.generator]) in fulfillments. - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the generator to delete. - * Format: - * `projects//locations//agents//generators/`. Please see - * {@see GeneratorsClient::generatorName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteGeneratorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the generator to delete. - * Format: - * `projects//locations//agents//generators/`. - * @type bool $force - * This field has no effect for generators not being used. - * For generators that are used by pages/flows/transition route groups: - * * If `force` is set to false, an error will be returned with message - * indicating the referenced resources. - * * If `force` is set to true, Dialogflow will remove the generator, as well - * as any references to the generator (i.e. - * [Generator][Fulfillment.generator]) in fulfillments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the generator to delete. - * Format: - * `projects//locations//agents//generators/`. - * - * 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 generator to delete. - * Format: - * `projects//locations//agents//generators/`. - * - * 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; - } - - /** - * This field has no effect for generators not being used. - * For generators that are used by pages/flows/transition route groups: - * * If `force` is set to false, an error will be returned with message - * indicating the referenced resources. - * * If `force` is set to true, Dialogflow will remove the generator, as well - * as any references to the generator (i.e. - * [Generator][Fulfillment.generator]) in fulfillments. - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * This field has no effect for generators not being used. - * For generators that are used by pages/flows/transition route groups: - * * If `force` is set to false, an error will be returned with message - * indicating the referenced resources. - * * If `force` is set to true, Dialogflow will remove the generator, as well - * as any references to the generator (i.e. - * [Generator][Fulfillment.generator]) in fulfillments. - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteIntentRequest.php deleted file mode 100644 index 033f90777f2a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteIntentRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteIntentRequest - */ -class DeleteIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the intent to delete. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the intent to delete. - * Format: - * `projects//locations//agents//intents/`. Please see - * {@see IntentsClient::intentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteIntentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the intent to delete. - * Format: - * `projects//locations//agents//intents/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the intent to delete. - * Format: - * `projects//locations//agents//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. - * Format: - * `projects//locations//agents//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePageRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePageRequest.php deleted file mode 100644 index 8070937f94e0..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeletePageRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeletePageRequest - */ -class DeletePageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the page to delete. - * Format: - * `projects//locations//agents//Flows//pages/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * This field has no effect for pages with no incoming transitions. - * For pages with incoming transitions: - * * If `force` is set to false, an error will be returned with message - * indicating the incoming transitions. - * * If `force` is set to true, Dialogflow will remove the page, as well as - * any transitions to the page (i.e. [Target - * page][EventHandler.target_page] in event handlers or [Target - * page][TransitionRoute.target_page] in transition routes that point to - * this page will be cleared). - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the page to delete. - * Format: - * `projects//locations//agents//Flows//pages/`. Please see - * {@see PagesClient::pageName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeletePageRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the page to delete. - * Format: - * `projects//locations//agents//Flows//pages/`. - * @type bool $force - * This field has no effect for pages with no incoming transitions. - * For pages with incoming transitions: - * * If `force` is set to false, an error will be returned with message - * indicating the incoming transitions. - * * If `force` is set to true, Dialogflow will remove the page, as well as - * any transitions to the page (i.e. [Target - * page][EventHandler.target_page] in event handlers or [Target - * page][TransitionRoute.target_page] in transition routes that point to - * this page will be cleared). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the page to delete. - * Format: - * `projects//locations//agents//Flows//pages/`. - * - * 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 page to delete. - * Format: - * `projects//locations//agents//Flows//pages/`. - * - * 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; - } - - /** - * This field has no effect for pages with no incoming transitions. - * For pages with incoming transitions: - * * If `force` is set to false, an error will be returned with message - * indicating the incoming transitions. - * * If `force` is set to true, Dialogflow will remove the page, as well as - * any transitions to the page (i.e. [Target - * page][EventHandler.target_page] in event handlers or [Target - * page][TransitionRoute.target_page] in transition routes that point to - * this page will be cleared). - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * This field has no effect for pages with no incoming transitions. - * For pages with incoming transitions: - * * If `force` is set to false, an error will be returned with message - * indicating the incoming transitions. - * * If `force` is set to true, Dialogflow will remove the page, as well as - * any transitions to the page (i.e. [Target - * page][EventHandler.target_page] in event handlers or [Target - * page][TransitionRoute.target_page] in transition routes that point to - * this page will be cleared). - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSecuritySettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSecuritySettingsRequest.php deleted file mode 100644 index 748895a9a067..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSecuritySettingsRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest - */ -class DeleteSecuritySettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to - * delete. Format: - * `projects//locations//securitySettings/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to - * delete. Format: - * `projects//locations//securitySettings/`. Please see - * {@see SecuritySettingsServiceClient::securitySettingsName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteSecuritySettingsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to - * delete. Format: - * `projects//locations//securitySettings/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to - * delete. Format: - * `projects//locations//securitySettings/`. - * - * 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 - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to - * delete. Format: - * `projects//locations//securitySettings/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSessionEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSessionEntityTypeRequest.php deleted file mode 100644 index 628ffaacc6fd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteSessionEntityTypeRequest.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest - */ -class DeleteSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session entity type to delete. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the session entity type to delete. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. Please see - * {@see SessionEntityTypesClient::sessionEntityTypeName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteSessionEntityTypeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the session entity type to delete. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session entity type to delete. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. - * - * 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 to delete. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteTransitionRouteGroupRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteTransitionRouteGroupRequest.php deleted file mode 100644 index 5be18f395885..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteTransitionRouteGroupRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - */ -class DeleteTransitionRouteGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * to delete. Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * This field has no effect for transition route group that no page is using. - * If the transition route group is referenced by any page: - * * If `force` is set to false, an error will be returned with message - * indicating pages that reference the transition route group. - * * If `force` is set to true, Dialogflow will remove the transition route - * group, as well as any reference to it. - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * to delete. Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. Please see - * {@see TransitionRouteGroupsClient::transitionRouteGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteTransitionRouteGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * to delete. Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. - * @type bool $force - * This field has no effect for transition route group that no page is using. - * If the transition route group is referenced by any page: - * * If `force` is set to false, an error will be returned with message - * indicating pages that reference the transition route group. - * * If `force` is set to true, Dialogflow will remove the transition route - * group, as well as any reference to it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * to delete. Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. - * - * 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 - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * to delete. Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. - * - * 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; - } - - /** - * This field has no effect for transition route group that no page is using. - * If the transition route group is referenced by any page: - * * If `force` is set to false, an error will be returned with message - * indicating pages that reference the transition route group. - * * If `force` is set to true, Dialogflow will remove the transition route - * group, as well as any reference to it. - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * This field has no effect for transition route group that no page is using. - * If the transition route group is referenced by any page: - * * If `force` is set to false, an error will be returned with message - * indicating pages that reference the transition route group. - * * If `force` is set to true, Dialogflow will remove the transition route - * group, as well as any reference to it. - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteVersionRequest.php deleted file mode 100644 index 626c94df2c3a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteVersionRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteVersionRequest - */ -class DeleteVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] - * to delete. Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] - * to delete. Format: - * `projects//locations//agents//flows//versions/`. Please see - * {@see VersionsClient::versionName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] - * to delete. Format: - * `projects//locations//agents//flows//versions/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] - * to delete. Format: - * `projects//locations//agents//flows//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][google.cloud.dialogflow.cx.v3.Version] - * to delete. Format: - * `projects//locations//agents//flows//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteWebhookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteWebhookRequest.php deleted file mode 100644 index df7ac21131f8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeleteWebhookRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeleteWebhookRequest - */ -class DeleteWebhookRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the webhook to delete. - * Format: - * `projects//locations//agents//webhooks/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * This field has no effect for webhook not being used. - * For webhooks that are used by pages/flows/transition route groups: - * * If `force` is set to false, an error will be returned with message - * indicating the referenced resources. - * * If `force` is set to true, Dialogflow will remove the webhook, as well - * as any references to the webhook (i.e. - * [Webhook][google.cloud.dialogflow.cx.v3.Fulfillment.webhook] and - * [tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag]in fulfillments that - * point to this webhook will be removed). - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the webhook to delete. - * Format: - * `projects//locations//agents//webhooks/`. Please see - * {@see WebhooksClient::webhookName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\DeleteWebhookRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the webhook to delete. - * Format: - * `projects//locations//agents//webhooks/`. - * @type bool $force - * This field has no effect for webhook not being used. - * For webhooks that are used by pages/flows/transition route groups: - * * If `force` is set to false, an error will be returned with message - * indicating the referenced resources. - * * If `force` is set to true, Dialogflow will remove the webhook, as well - * as any references to the webhook (i.e. - * [Webhook][google.cloud.dialogflow.cx.v3.Fulfillment.webhook] and - * [tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag]in fulfillments that - * point to this webhook will be removed). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the webhook to delete. - * Format: - * `projects//locations//agents//webhooks/`. - * - * 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 webhook to delete. - * Format: - * `projects//locations//agents//webhooks/`. - * - * 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; - } - - /** - * This field has no effect for webhook not being used. - * For webhooks that are used by pages/flows/transition route groups: - * * If `force` is set to false, an error will be returned with message - * indicating the referenced resources. - * * If `force` is set to true, Dialogflow will remove the webhook, as well - * as any references to the webhook (i.e. - * [Webhook][google.cloud.dialogflow.cx.v3.Fulfillment.webhook] and - * [tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag]in fulfillments that - * point to this webhook will be removed). - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * This field has no effect for webhook not being used. - * For webhooks that are used by pages/flows/transition route groups: - * * If `force` is set to false, an error will be returned with message - * indicating the referenced resources. - * * If `force` is set to true, Dialogflow will remove the webhook, as well - * as any references to the webhook (i.e. - * [Webhook][google.cloud.dialogflow.cx.v3.Fulfillment.webhook] and - * [tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag]in fulfillments that - * point to this webhook will be removed). - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowMetadata.php deleted file mode 100644 index 4e17e1fa9810..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowMetadata.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeployFlowMetadata - */ -class DeployFlowMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Errors of running deployment tests. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; - */ - private $test_errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $test_errors - * Errors of running deployment tests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Errors of running deployment tests. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTestErrors() - { - return $this->test_errors; - } - - /** - * Errors of running deployment tests. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTestErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestError::class); - $this->test_errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowRequest.php deleted file mode 100644 index f9da9bee827c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeployFlowRequest - */ -class DeployFlowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The environment to deploy the flow to. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $environment = ''; - /** - * Required. The flow version to deploy. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $flow_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $environment - * Required. The environment to deploy the flow to. - * Format: - * `projects//locations//agents//environments/`. - * @type string $flow_version - * Required. The flow version to deploy. - * Format: - * `projects//locations//agents//flows//versions/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The environment to deploy the flow to. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Required. The environment to deploy the flow to. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - - /** - * Required. The flow version to deploy. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getFlowVersion() - { - return $this->flow_version; - } - - /** - * Required. The flow version to deploy. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setFlowVersion($var) - { - GPBUtil::checkString($var, True); - $this->flow_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowResponse.php deleted file mode 100644 index c95cb3d350e8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DeployFlowResponse.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.dialogflow.cx.v3.DeployFlowResponse - */ -class DeployFlowResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The updated environment where the flow is deployed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment environment = 1; - */ - protected $environment = null; - /** - * The name of the flow version - * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - * `projects//locations//agents//environments//deployments/`. - * - * Generated from protobuf field string deployment = 2; - */ - protected $deployment = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Environment $environment - * The updated environment where the flow is deployed. - * @type string $deployment - * The name of the flow version - * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - * `projects//locations//agents//environments//deployments/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * The updated environment where the flow is deployed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment environment = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * The updated environment where the flow is deployed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment environment = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * The name of the flow version - * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - * `projects//locations//agents//environments//deployments/`. - * - * Generated from protobuf field string deployment = 2; - * @return string - */ - public function getDeployment() - { - return $this->deployment; - } - - /** - * The name of the flow version - * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - * `projects//locations//agents//environments//deployments/`. - * - * Generated from protobuf field string deployment = 2; - * @param string $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkString($var, True); - $this->deployment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment.php deleted file mode 100644 index 860efcd56c61..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment.php +++ /dev/null @@ -1,286 +0,0 @@ -google.cloud.dialogflow.cx.v3.Deployment - */ -class Deployment extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the deployment. - * Format: - * projects//locations//agents//environments//deployments/. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The name of the flow version for this deployment. - * Format: - * projects//locations//agents//flows//versions/. - * - * Generated from protobuf field string flow_version = 2 [(.google.api.resource_reference) = { - */ - protected $flow_version = ''; - /** - * The current state of the deployment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.State state = 3; - */ - protected $state = 0; - /** - * Result of the deployment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; - */ - protected $result = null; - /** - * Start time of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - */ - protected $start_time = null; - /** - * End time of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the deployment. - * Format: - * projects//locations//agents//environments//deployments/. - * @type string $flow_version - * The name of the flow version for this deployment. - * Format: - * projects//locations//agents//flows//versions/. - * @type int $state - * The current state of the deployment. - * @type \Google\Cloud\Dialogflow\Cx\V3\Deployment\Result $result - * Result of the deployment. - * @type \Google\Protobuf\Timestamp $start_time - * Start time of this deployment. - * @type \Google\Protobuf\Timestamp $end_time - * End time of this deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Deployment::initOnce(); - parent::__construct($data); - } - - /** - * The name of the deployment. - * Format: - * projects//locations//agents//environments//deployments/. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the deployment. - * Format: - * projects//locations//agents//environments//deployments/. - * - * 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; - } - - /** - * The name of the flow version for this deployment. - * Format: - * projects//locations//agents//flows//versions/. - * - * Generated from protobuf field string flow_version = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getFlowVersion() - { - return $this->flow_version; - } - - /** - * The name of the flow version for this deployment. - * Format: - * projects//locations//agents//flows//versions/. - * - * Generated from protobuf field string flow_version = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setFlowVersion($var) - { - GPBUtil::checkString($var, True); - $this->flow_version = $var; - - return $this; - } - - /** - * The current state of the deployment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.State state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the deployment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.State state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Deployment\State::class); - $this->state = $var; - - return $this; - } - - /** - * Result of the deployment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; - * @return \Google\Cloud\Dialogflow\Cx\V3\Deployment\Result|null - */ - public function getResult() - { - return $this->result; - } - - public function hasResult() - { - return isset($this->result); - } - - public function clearResult() - { - unset($this->result); - } - - /** - * Result of the deployment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; - * @param \Google\Cloud\Dialogflow\Cx\V3\Deployment\Result $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Deployment\Result::class); - $this->result = $var; - - return $this; - } - - /** - * Start time of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - * @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); - } - - /** - * Start time of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * End time of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @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); - } - - /** - * End time of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/Result.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/Result.php deleted file mode 100644 index bfb689fa153f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/Result.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.dialogflow.cx.v3.Deployment.Result - */ -class Result extends \Google\Protobuf\Internal\Message -{ - /** - * Results of test cases running before the deployment. - * Format: - * `projects//locations//agents//testCases//results/`. - * - * Generated from protobuf field repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { - */ - private $deployment_test_results; - /** - * The name of the experiment triggered by this deployment. - * Format: - * projects//locations//agents//environments//experiments/. - * - * Generated from protobuf field string experiment = 2 [(.google.api.resource_reference) = { - */ - protected $experiment = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $deployment_test_results - * Results of test cases running before the deployment. - * Format: - * `projects//locations//agents//testCases//results/`. - * @type string $experiment - * The name of the experiment triggered by this deployment. - * Format: - * projects//locations//agents//environments//experiments/. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Deployment::initOnce(); - parent::__construct($data); - } - - /** - * Results of test cases running before the deployment. - * Format: - * `projects//locations//agents//testCases//results/`. - * - * Generated from protobuf field repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeploymentTestResults() - { - return $this->deployment_test_results; - } - - /** - * Results of test cases running before the deployment. - * Format: - * `projects//locations//agents//testCases//results/`. - * - * Generated from protobuf field repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeploymentTestResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->deployment_test_results = $arr; - - return $this; - } - - /** - * The name of the experiment triggered by this deployment. - * Format: - * projects//locations//agents//environments//experiments/. - * - * Generated from protobuf field string experiment = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getExperiment() - { - return $this->experiment; - } - - /** - * The name of the experiment triggered by this deployment. - * Format: - * projects//locations//agents//environments//experiments/. - * - * Generated from protobuf field string experiment = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setExperiment($var) - { - GPBUtil::checkString($var, True); - $this->experiment = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Result::class, \Google\Cloud\Dialogflow\Cx\V3\Deployment_Result::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/State.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/State.php deleted file mode 100644 index d7829f4b6501..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Deployment/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.cx.v3.Deployment.State - */ -class State -{ - /** - * State unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The deployment is running. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The deployment succeeded. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The deployment failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - 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\Cx\V3\Deployment_State::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentRequest.php deleted file mode 100644 index 7bf17368cf56..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentRequest.php +++ /dev/null @@ -1,297 +0,0 @@ -google.cloud.dialogflow.cx.v3.DetectIntentRequest - */ -class DetectIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session this query is sent to. - * Format: - * `projects//locations//agents//sessions/` or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). - * - * 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.cx.v3.QueryParameters query_params = 2; - */ - protected $query_params = null; - /** - * Required. The input specification. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query_input = null; - /** - * Instructs the speech synthesizer how to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; - */ - protected $output_audio_config = null; - /** - * Optional. Specifies which fields in the - * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not - * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $response_view = 0; - - /** - * 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//locations//agents//sessions/` or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). - * @type \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $query_params - * The parameters of this query. - * @type \Google\Cloud\Dialogflow\Cx\V3\QueryInput $query_input - * Required. The input specification. - * @type \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $output_audio_config - * Instructs the speech synthesizer how to generate the output audio. - * @type int $response_view - * Optional. Specifies which fields in the - * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not - * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session this query is sent to. - * Format: - * `projects//locations//agents//sessions/` or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). - * - * 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//locations//agents//sessions/` or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). - * - * 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.cx.v3.QueryParameters query_params = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.QueryParameters query_params = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $var - * @return $this - */ - public function setQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryParameters::class); - $this->query_params = $var; - - return $this; - } - - /** - * Required. The input specification. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\QueryInput $var - * @return $this - */ - public function setQueryInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryInput::class); - $this->query_input = $var; - - return $this; - } - - /** - * Instructs the speech synthesizer how to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; - * @return \Google\Cloud\Dialogflow\Cx\V3\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. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; - * @param \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $var - * @return $this - */ - public function setOutputAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig::class); - $this->output_audio_config = $var; - - return $this; - } - - /** - * Optional. Specifies which fields in the - * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not - * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * Optional. Specifies which fields in the - * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not - * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponseView::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse.php deleted file mode 100644 index fc0fb78e21c2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse.php +++ /dev/null @@ -1,305 +0,0 @@ -google.cloud.dialogflow.cx.v3.DetectIntentResponse - */ -class DetectIntentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. 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 the conversational query. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; - */ - protected $query_result = 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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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.cx.v3.OutputAudioConfig output_audio_config = 5; - */ - protected $output_audio_config = null; - /** - * Response type. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType response_type = 6; - */ - protected $response_type = 0; - /** - * Indicates whether the partial response can be cancelled when a later - * response arrives. e.g. if the agent specified some music as partial - * response, it can be cancelled. - * - * Generated from protobuf field bool allow_cancellation = 7; - */ - protected $allow_cancellation = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $response_id - * Output only. 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\Cx\V3\QueryResult $query_result - * The result of the conversational query. - * @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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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\Cx\V3\OutputAudioConfig $output_audio_config - * The config used by the speech synthesizer to generate the output audio. - * @type int $response_type - * Response type. - * @type bool $allow_cancellation - * Indicates whether the partial response can be cancelled when a later - * response arrives. e.g. if the agent specified some music as partial - * response, it can be cancelled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Output only. 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; - } - - /** - * Output only. 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 the conversational query. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\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. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\QueryResult $var - * @return $this - */ - public function setQueryResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryResult::class); - $this->query_result = $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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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.cx.v3.OutputAudioConfig output_audio_config = 5; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.OutputAudioConfig output_audio_config = 5; - * @param \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $var - * @return $this - */ - public function setOutputAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig::class); - $this->output_audio_config = $var; - - return $this; - } - - /** - * Response type. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType response_type = 6; - * @return int - */ - public function getResponseType() - { - return $this->response_type; - } - - /** - * Response type. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType response_type = 6; - * @param int $var - * @return $this - */ - public function setResponseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse\ResponseType::class); - $this->response_type = $var; - - return $this; - } - - /** - * Indicates whether the partial response can be cancelled when a later - * response arrives. e.g. if the agent specified some music as partial - * response, it can be cancelled. - * - * Generated from protobuf field bool allow_cancellation = 7; - * @return bool - */ - public function getAllowCancellation() - { - return $this->allow_cancellation; - } - - /** - * Indicates whether the partial response can be cancelled when a later - * response arrives. e.g. if the agent specified some music as partial - * response, it can be cancelled. - * - * Generated from protobuf field bool allow_cancellation = 7; - * @param bool $var - * @return $this - */ - public function setAllowCancellation($var) - { - GPBUtil::checkBool($var); - $this->allow_cancellation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse/ResponseType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse/ResponseType.php deleted file mode 100644 index 12b6c3e071b4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DetectIntentResponse/ResponseType.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType - */ -class ResponseType -{ - /** - * Not specified. This should never happen. - * - * Generated from protobuf enum RESPONSE_TYPE_UNSPECIFIED = 0; - */ - const RESPONSE_TYPE_UNSPECIFIED = 0; - /** - * Partial response. e.g. Aggregated responses in a Fulfillment that enables - * `return_partial_response` can be returned as partial response. - * WARNING: partial response is not eligible for barge-in. - * - * Generated from protobuf enum PARTIAL = 1; - */ - const PARTIAL = 1; - /** - * Final response. - * - * Generated from protobuf enum FINAL = 2; - */ - const PBFINAL = 2; - - private static $valueToName = [ - self::RESPONSE_TYPE_UNSPECIFIED => 'RESPONSE_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(ResponseType::class, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse_ResponseType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DocumentProcessingMode.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DocumentProcessingMode.php deleted file mode 100644 index 4693742eb6cd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DocumentProcessingMode.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.dialogflow.cx.v3.DocumentProcessingMode - */ -class DocumentProcessingMode -{ - /** - * Not specified. This should be set for STRUCTURED type data stores. Due to - * legacy reasons this is considered as DOCUMENTS for STRUCTURED and - * PUBLIC_WEB data stores. - * - * Generated from protobuf enum DOCUMENT_PROCESSING_MODE_UNSPECIFIED = 0; - */ - const DOCUMENT_PROCESSING_MODE_UNSPECIFIED = 0; - /** - * Documents are processed as documents. - * - * Generated from protobuf enum DOCUMENTS = 1; - */ - const DOCUMENTS = 1; - /** - * Documents are converted to chunks. - * - * Generated from protobuf enum CHUNKS = 2; - */ - const CHUNKS = 2; - - private static $valueToName = [ - self::DOCUMENT_PROCESSING_MODE_UNSPECIFIED => 'DOCUMENT_PROCESSING_MODE_UNSPECIFIED', - self::DOCUMENTS => 'DOCUMENTS', - self::CHUNKS => 'CHUNKS', - ]; - - 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DtmfInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DtmfInput.php deleted file mode 100644 index 654ce0c03572..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/DtmfInput.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.dialogflow.cx.v3.DtmfInput - */ -class DtmfInput extends \Google\Protobuf\Internal\Message -{ - /** - * The dtmf digits. - * - * Generated from protobuf field string digits = 1; - */ - protected $digits = ''; - /** - * The finish digit (if any). - * - * Generated from protobuf field string finish_digit = 2; - */ - protected $finish_digit = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $digits - * The dtmf digits. - * @type string $finish_digit - * The finish digit (if any). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * The dtmf digits. - * - * Generated from protobuf field string digits = 1; - * @return string - */ - public function getDigits() - { - return $this->digits; - } - - /** - * The dtmf digits. - * - * Generated from protobuf field string digits = 1; - * @param string $var - * @return $this - */ - public function setDigits($var) - { - GPBUtil::checkString($var, True); - $this->digits = $var; - - return $this; - } - - /** - * The finish digit (if any). - * - * Generated from protobuf field string finish_digit = 2; - * @return string - */ - public function getFinishDigit() - { - return $this->finish_digit; - } - - /** - * The finish digit (if any). - * - * Generated from protobuf field string finish_digit = 2; - * @param string $var - * @return $this - */ - public function setFinishDigit($var) - { - GPBUtil::checkString($var, True); - $this->finish_digit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType.php deleted file mode 100644 index 1bd168f35fcc..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType.php +++ /dev/null @@ -1,371 +0,0 @@ -google.cloud.dialogflow.cx.v3.EntityType - */ -class EntityType extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the entity type. - * Required for - * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityType]. - * Format: - * `projects//locations//agents//entityTypes/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the entity type, unique within the - * agent. - * - * 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.cx.v3.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kind = 0; - /** - * Indicates whether the entity type can be automatically expanded. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode auto_expansion_mode = 4; - */ - protected $auto_expansion_mode = 0; - /** - * The collection of entity entries associated with the entity type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5; - */ - private $entities; - /** - * Collection of exceptional words and phrases that shouldn't be matched. - * For example, if you have a size entity type with entry `giant`(an - * adjective), you might consider adding `giants`(a noun) as an exclusion. - * If the kind of entity type is `KIND_MAP`, then the phrases specified by - * entities and excluded phrases should be mutually exclusive. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6; - */ - private $excluded_phrases; - /** - * Enables fuzzy entity extraction during classification. - * - * Generated from protobuf field bool enable_fuzzy_extraction = 7; - */ - protected $enable_fuzzy_extraction = false; - /** - * Indicates whether parameters of the entity type should be redacted in log. - * If redaction is enabled, page parameters and intent parameters referring to - * the entity type will be replaced by parameter name when logging. - * - * Generated from protobuf field bool redact = 9; - */ - protected $redact = 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.cx.v3.EntityTypes.UpdateEntityType]. - * Format: - * `projects//locations//agents//entityTypes/`. - * @type string $display_name - * Required. The human-readable name of the entity type, unique within the - * agent. - * @type int $kind - * Required. Indicates the kind of entity type. - * @type int $auto_expansion_mode - * Indicates whether the entity type can be automatically expanded. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * The collection of entity entries associated with the entity type. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\EntityType\ExcludedPhrase>|\Google\Protobuf\Internal\RepeatedField $excluded_phrases - * Collection of exceptional words and phrases that shouldn't be matched. - * For example, if you have a size entity type with entry `giant`(an - * adjective), you might consider adding `giants`(a noun) as an exclusion. - * If the kind of entity type is `KIND_MAP`, then the phrases specified by - * entities and excluded phrases should be mutually exclusive. - * @type bool $enable_fuzzy_extraction - * Enables fuzzy entity extraction during classification. - * @type bool $redact - * Indicates whether parameters of the entity type should be redacted in log. - * If redaction is enabled, page parameters and intent parameters referring to - * the entity type will be replaced by parameter name when logging. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the entity type. - * Required for - * [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityType]. - * Format: - * `projects//locations//agents//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.cx.v3.EntityTypes.UpdateEntityType]. - * Format: - * `projects//locations//agents//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 human-readable name of the entity type, unique within the - * 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 human-readable name of the entity type, unique within the - * 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. Indicates the kind of entity type. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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.cx.v3.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\EntityType\Kind::class); - $this->kind = $var; - - return $this; - } - - /** - * Indicates whether the entity type can be automatically expanded. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode auto_expansion_mode = 4; - * @return int - */ - public function getAutoExpansionMode() - { - return $this->auto_expansion_mode; - } - - /** - * Indicates whether the entity type can be automatically expanded. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode auto_expansion_mode = 4; - * @param int $var - * @return $this - */ - public function setAutoExpansionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\EntityType\AutoExpansionMode::class); - $this->auto_expansion_mode = $var; - - return $this; - } - - /** - * The collection of entity entries associated with the entity type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The collection of entity entries associated with the entity type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\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\Cx\V3\EntityType\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * Collection of exceptional words and phrases that shouldn't be matched. - * For example, if you have a size entity type with entry `giant`(an - * adjective), you might consider adding `giants`(a noun) as an exclusion. - * If the kind of entity type is `KIND_MAP`, then the phrases specified by - * entities and excluded phrases should be mutually exclusive. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludedPhrases() - { - return $this->excluded_phrases; - } - - /** - * Collection of exceptional words and phrases that shouldn't be matched. - * For example, if you have a size entity type with entry `giant`(an - * adjective), you might consider adding `giants`(a noun) as an exclusion. - * If the kind of entity type is `KIND_MAP`, then the phrases specified by - * entities and excluded phrases should be mutually exclusive. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\EntityType\ExcludedPhrase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludedPhrases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\EntityType\ExcludedPhrase::class); - $this->excluded_phrases = $arr; - - return $this; - } - - /** - * Enables fuzzy entity extraction during classification. - * - * Generated from protobuf field bool enable_fuzzy_extraction = 7; - * @return bool - */ - public function getEnableFuzzyExtraction() - { - return $this->enable_fuzzy_extraction; - } - - /** - * Enables fuzzy entity extraction during classification. - * - * Generated from protobuf field bool enable_fuzzy_extraction = 7; - * @param bool $var - * @return $this - */ - public function setEnableFuzzyExtraction($var) - { - GPBUtil::checkBool($var); - $this->enable_fuzzy_extraction = $var; - - return $this; - } - - /** - * Indicates whether parameters of the entity type should be redacted in log. - * If redaction is enabled, page parameters and intent parameters referring to - * the entity type will be replaced by parameter name when logging. - * - * Generated from protobuf field bool redact = 9; - * @return bool - */ - public function getRedact() - { - return $this->redact; - } - - /** - * Indicates whether parameters of the entity type should be redacted in log. - * If redaction is enabled, page parameters and intent parameters referring to - * the entity type will be replaced by parameter name when logging. - * - * Generated from protobuf field bool redact = 9; - * @param bool $var - * @return $this - */ - public function setRedact($var) - { - GPBUtil::checkBool($var); - $this->redact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/AutoExpansionMode.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/AutoExpansionMode.php deleted file mode 100644 index 559d1962f4d5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/AutoExpansionMode.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.dialogflow.cx.v3.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\Cx\V3\EntityType_AutoExpansionMode::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Entity.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Entity.php deleted file mode 100644 index 41a9b8368877..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Entity.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.dialogflow.cx.v3.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 canonical 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 canonical 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\Cx\V3\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 canonical 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 canonical 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\Cx\V3\EntityType_Entity::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/ExcludedPhrase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/ExcludedPhrase.php deleted file mode 100644 index 5ac177826372..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/ExcludedPhrase.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - */ -class ExcludedPhrase extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The word or phrase to be excluded. - * - * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $value - * Required. The word or phrase to be excluded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The word or phrase to be excluded. - * - * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. The word or phrase to be excluded. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExcludedPhrase::class, \Google\Cloud\Dialogflow\Cx\V3\EntityType_ExcludedPhrase::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Kind.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Kind.php deleted file mode 100644 index f7d9bcbfcc53..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EntityType/Kind.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dialogflow.cx.v3.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 canonical - * 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 canonical - * 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\Cx\V3\EntityType_Kind::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment.php deleted file mode 100644 index 3674b1ac6cbd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment.php +++ /dev/null @@ -1,336 +0,0 @@ -google.cloud.dialogflow.cx.v3.Environment - */ -class Environment extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the environment. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the environment (unique in an agent). - * Limit of 64 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * The human-readable description of the environment. The maximum length is - * 500 characters. If exceeded, the request is rejected. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * A list of configurations for flow versions. You should include version - * configs for all flows that are reachable from [`Start - * Flow`][Agent.start_flow] in the agent. Otherwise, an error will be - * returned. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment.VersionConfig version_configs = 6; - */ - private $version_configs; - /** - * Output only. Update time of this environment. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The test cases config for continuous tests of this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; - */ - protected $test_cases_config = null; - /** - * The webhook configuration for this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.WebhookConfig webhook_config = 10; - */ - protected $webhook_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the environment. - * Format: - * `projects//locations//agents//environments/`. - * @type string $display_name - * Required. The human-readable name of the environment (unique in an agent). - * Limit of 64 characters. - * @type string $description - * The human-readable description of the environment. The maximum length is - * 500 characters. If exceeded, the request is rejected. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Environment\VersionConfig>|\Google\Protobuf\Internal\RepeatedField $version_configs - * A list of configurations for flow versions. You should include version - * configs for all flows that are reachable from [`Start - * Flow`][Agent.start_flow] in the agent. Otherwise, an error will be - * returned. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Update time of this environment. - * @type \Google\Cloud\Dialogflow\Cx\V3\Environment\TestCasesConfig $test_cases_config - * The test cases config for continuous tests of this environment. - * @type \Google\Cloud\Dialogflow\Cx\V3\Environment\WebhookConfig $webhook_config - * The webhook configuration for this environment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * The name of the environment. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the environment. - * Format: - * `projects//locations//agents//environments/`. - * - * 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 human-readable name of the environment (unique in an agent). - * Limit of 64 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the environment (unique in an agent). - * Limit of 64 characters. - * - * 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; - } - - /** - * The human-readable description of the environment. The maximum length is - * 500 characters. If exceeded, the request is rejected. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The human-readable description of the environment. The maximum length is - * 500 characters. If exceeded, the request is rejected. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * A list of configurations for flow versions. You should include version - * configs for all flows that are reachable from [`Start - * Flow`][Agent.start_flow] in the agent. Otherwise, an error will be - * returned. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment.VersionConfig version_configs = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVersionConfigs() - { - return $this->version_configs; - } - - /** - * A list of configurations for flow versions. You should include version - * configs for all flows that are reachable from [`Start - * Flow`][Agent.start_flow] in the agent. Otherwise, an error will be - * returned. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment.VersionConfig version_configs = 6; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Environment\VersionConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVersionConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Environment\VersionConfig::class); - $this->version_configs = $arr; - - return $this; - } - - /** - * Output only. Update time of this environment. - * - * 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. Update time of this environment. - * - * 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; - } - - /** - * The test cases config for continuous tests of this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; - * @return \Google\Cloud\Dialogflow\Cx\V3\Environment\TestCasesConfig|null - */ - public function getTestCasesConfig() - { - return $this->test_cases_config; - } - - public function hasTestCasesConfig() - { - return isset($this->test_cases_config); - } - - public function clearTestCasesConfig() - { - unset($this->test_cases_config); - } - - /** - * The test cases config for continuous tests of this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; - * @param \Google\Cloud\Dialogflow\Cx\V3\Environment\TestCasesConfig $var - * @return $this - */ - public function setTestCasesConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Environment\TestCasesConfig::class); - $this->test_cases_config = $var; - - return $this; - } - - /** - * The webhook configuration for this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.WebhookConfig webhook_config = 10; - * @return \Google\Cloud\Dialogflow\Cx\V3\Environment\WebhookConfig|null - */ - public function getWebhookConfig() - { - return $this->webhook_config; - } - - public function hasWebhookConfig() - { - return isset($this->webhook_config); - } - - public function clearWebhookConfig() - { - unset($this->webhook_config); - } - - /** - * The webhook configuration for this environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment.WebhookConfig webhook_config = 10; - * @param \Google\Cloud\Dialogflow\Cx\V3\Environment\WebhookConfig $var - * @return $this - */ - public function setWebhookConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Environment\WebhookConfig::class); - $this->webhook_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/TestCasesConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/TestCasesConfig.php deleted file mode 100644 index 421b8d8587f9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/TestCasesConfig.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig - */ -class TestCasesConfig extends \Google\Protobuf\Internal\Message -{ - /** - * A list of test case names to run. They should be under the same agent. - * Format of each test case name: - * `projects//locations//agents//testCases/` - * - * Generated from protobuf field repeated string test_cases = 1 [(.google.api.resource_reference) = { - */ - private $test_cases; - /** - * Whether to run test cases in - * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] - * periodically. Default false. If set to true, run once a day. - * - * Generated from protobuf field bool enable_continuous_run = 2; - */ - protected $enable_continuous_run = false; - /** - * Whether to run test cases in - * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] - * before deploying a flow version to the environment. Default false. - * - * Generated from protobuf field bool enable_predeployment_run = 3; - */ - protected $enable_predeployment_run = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $test_cases - * A list of test case names to run. They should be under the same agent. - * Format of each test case name: - * `projects//locations//agents//testCases/` - * @type bool $enable_continuous_run - * Whether to run test cases in - * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] - * periodically. Default false. If set to true, run once a day. - * @type bool $enable_predeployment_run - * Whether to run test cases in - * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] - * before deploying a flow version to the environment. Default false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * A list of test case names to run. They should be under the same agent. - * Format of each test case name: - * `projects//locations//agents//testCases/` - * - * Generated from protobuf field repeated string test_cases = 1 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTestCases() - { - return $this->test_cases; - } - - /** - * A list of test case names to run. They should be under the same agent. - * Format of each test case name: - * `projects//locations//agents//testCases/` - * - * Generated from protobuf field repeated string test_cases = 1 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTestCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->test_cases = $arr; - - return $this; - } - - /** - * Whether to run test cases in - * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] - * periodically. Default false. If set to true, run once a day. - * - * Generated from protobuf field bool enable_continuous_run = 2; - * @return bool - */ - public function getEnableContinuousRun() - { - return $this->enable_continuous_run; - } - - /** - * Whether to run test cases in - * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] - * periodically. Default false. If set to true, run once a day. - * - * Generated from protobuf field bool enable_continuous_run = 2; - * @param bool $var - * @return $this - */ - public function setEnableContinuousRun($var) - { - GPBUtil::checkBool($var); - $this->enable_continuous_run = $var; - - return $this; - } - - /** - * Whether to run test cases in - * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] - * before deploying a flow version to the environment. Default false. - * - * Generated from protobuf field bool enable_predeployment_run = 3; - * @return bool - */ - public function getEnablePredeploymentRun() - { - return $this->enable_predeployment_run; - } - - /** - * Whether to run test cases in - * [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] - * before deploying a flow version to the environment. Default false. - * - * Generated from protobuf field bool enable_predeployment_run = 3; - * @param bool $var - * @return $this - */ - public function setEnablePredeploymentRun($var) - { - GPBUtil::checkBool($var); - $this->enable_predeployment_run = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TestCasesConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Environment_TestCasesConfig::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/VersionConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/VersionConfig.php deleted file mode 100644 index 910929155724..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/VersionConfig.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.dialogflow.cx.v3.Environment.VersionConfig - */ -class VersionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Flow, playbook and tool versions are supported. - * Format for flow version: - * projects//locations//agents//flows//versions/. - * Format for playbook version: - * projects//locations//agents//playbooks//versions/. - * Format for tool version: - * projects//locations//agents//tools//versions/. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Required. Flow, playbook and tool versions are supported. - * Format for flow version: - * projects//locations//agents//flows//versions/. - * Format for playbook version: - * projects//locations//agents//playbooks//versions/. - * Format for tool version: - * projects//locations//agents//tools//versions/. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. Flow, playbook and tool versions are supported. - * Format for flow version: - * projects//locations//agents//flows//versions/. - * Format for playbook version: - * projects//locations//agents//playbooks//versions/. - * Format for tool version: - * projects//locations//agents//tools//versions/. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. Flow, playbook and tool versions are supported. - * Format for flow version: - * projects//locations//agents//flows//versions/. - * Format for playbook version: - * projects//locations//agents//playbooks//versions/. - * Format for tool version: - * projects//locations//agents//tools//versions/. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VersionConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Environment_VersionConfig::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/WebhookConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/WebhookConfig.php deleted file mode 100644 index 482aabedcf25..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Environment/WebhookConfig.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - */ -class WebhookConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The list of webhooks to override for the agent environment. The webhook - * must exist in the agent. You can override fields in - * [`generic_web_service`][google.cloud.dialogflow.cx.v3.Webhook.generic_web_service] - * and - * [`service_directory`][google.cloud.dialogflow.cx.v3.Webhook.service_directory]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Webhook webhook_overrides = 1; - */ - private $webhook_overrides; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Webhook>|\Google\Protobuf\Internal\RepeatedField $webhook_overrides - * The list of webhooks to override for the agent environment. The webhook - * must exist in the agent. You can override fields in - * [`generic_web_service`][google.cloud.dialogflow.cx.v3.Webhook.generic_web_service] - * and - * [`service_directory`][google.cloud.dialogflow.cx.v3.Webhook.service_directory]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * The list of webhooks to override for the agent environment. The webhook - * must exist in the agent. You can override fields in - * [`generic_web_service`][google.cloud.dialogflow.cx.v3.Webhook.generic_web_service] - * and - * [`service_directory`][google.cloud.dialogflow.cx.v3.Webhook.service_directory]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Webhook webhook_overrides = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebhookOverrides() - { - return $this->webhook_overrides; - } - - /** - * The list of webhooks to override for the agent environment. The webhook - * must exist in the agent. You can override fields in - * [`generic_web_service`][google.cloud.dialogflow.cx.v3.Webhook.generic_web_service] - * and - * [`service_directory`][google.cloud.dialogflow.cx.v3.Webhook.service_directory]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Webhook webhook_overrides = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Webhook>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebhookOverrides($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Webhook::class); - $this->webhook_overrides = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebhookConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Environment_WebhookConfig::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventHandler.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventHandler.php deleted file mode 100644 index 69dc1970bcfc..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventHandler.php +++ /dev/null @@ -1,297 +0,0 @@ -google.cloud.dialogflow.cx.v3.EventHandler - */ -class EventHandler extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique identifier of this event handler. - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. The name of the event to handle. - * - * Generated from protobuf field string event = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event = ''; - /** - * The fulfillment to call when the event occurs. - * Handling webhook errors with a fulfillment enabled with webhook could - * cause infinite loop. It is invalid to specify such fulfillment for a - * handler handling webhooks. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5; - */ - protected $trigger_fulfillment = null; - protected $target; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique identifier of this event handler. - * @type string $event - * Required. The name of the event to handle. - * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $trigger_fulfillment - * The fulfillment to call when the event occurs. - * Handling webhook errors with a fulfillment enabled with webhook could - * cause infinite loop. It is invalid to specify such fulfillment for a - * handler handling webhooks. - * @type string $target_page - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * @type string $target_flow - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * @type string $target_playbook - * The target playbook to transition to. - * Format: - * `projects//locations//agents//playbooks/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique identifier of this event handler. - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique identifier of this event handler. - * - * Generated from protobuf field string name = 6 [(.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 name of the event to handle. - * - * Generated from protobuf field string event = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEvent() - { - return $this->event; - } - - /** - * Required. The name of the event to handle. - * - * Generated from protobuf field string event = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkString($var, True); - $this->event = $var; - - return $this; - } - - /** - * The fulfillment to call when the event occurs. - * Handling webhook errors with a fulfillment enabled with webhook could - * cause infinite loop. It is invalid to specify such fulfillment for a - * handler handling webhooks. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5; - * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment|null - */ - public function getTriggerFulfillment() - { - return $this->trigger_fulfillment; - } - - public function hasTriggerFulfillment() - { - return isset($this->trigger_fulfillment); - } - - public function clearTriggerFulfillment() - { - unset($this->trigger_fulfillment); - } - - /** - * The fulfillment to call when the event occurs. - * Handling webhook errors with a fulfillment enabled with webhook could - * cause infinite loop. It is invalid to specify such fulfillment for a - * handler handling webhooks. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5; - * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var - * @return $this - */ - public function setTriggerFulfillment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); - $this->trigger_fulfillment = $var; - - return $this; - } - - /** - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string target_page = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetPage() - { - return $this->readOneof(2); - } - - public function hasTargetPage() - { - return $this->hasOneof(2); - } - - /** - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string target_page = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetPage($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string target_flow = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetFlow() - { - return $this->readOneof(3); - } - - public function hasTargetFlow() - { - return $this->hasOneof(3); - } - - /** - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string target_flow = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetFlow($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The target playbook to transition to. - * Format: - * `projects//locations//agents//playbooks/`. - * - * Generated from protobuf field string target_playbook = 7 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetPlaybook() - { - return $this->readOneof(7); - } - - public function hasTargetPlaybook() - { - return $this->hasOneof(7); - } - - /** - * The target playbook to transition to. - * Format: - * `projects//locations//agents//playbooks/`. - * - * Generated from protobuf field string target_playbook = 7 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetPlaybook($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventInput.php deleted file mode 100644 index 235626b202bd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/EventInput.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dialogflow.cx.v3.EventInput - */ -class EventInput extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the event. - * - * Generated from protobuf field string event = 1; - */ - protected $event = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $event - * Name of the event. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Name of the event. - * - * Generated from protobuf field string event = 1; - * @return string - */ - public function getEvent() - { - return $this->event; - } - - /** - * Name of the event. - * - * Generated from protobuf field string event = 1; - * @param string $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkString($var, True); - $this->event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment.php deleted file mode 100644 index 84ed495da596..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment.php +++ /dev/null @@ -1,685 +0,0 @@ -google.cloud.dialogflow.cx.v3.Experiment - */ -class Experiment extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the experiment. - * Format: - * projects//locations//agents//environments//experiments/. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the experiment (unique in an - * environment). Limit of 64 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * The human-readable description of the experiment. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The current state of the experiment. - * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. - * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or - * RUNNING->DONE. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - */ - protected $state = 0; - /** - * The definition of the experiment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - */ - protected $definition = null; - /** - * The configuration for auto rollout. If set, there should be exactly two - * variants in the experiment (control variant being the default version of - * the flow), the traffic allocation for the non-control variant will - * gradually increase to 100% when conditions are met, and eventually - * replace the control variant to become the default version of the flow. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; - */ - protected $rollout_config = null; - /** - * State of the auto rollout process. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; - */ - protected $rollout_state = null; - /** - * The reason why rollout has failed. Should only be set when state is - * ROLLOUT_FAILED. - * - * Generated from protobuf field string rollout_failure_reason = 16; - */ - protected $rollout_failure_reason = ''; - /** - * Inference result of the experiment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - */ - protected $result = null; - /** - * Creation time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - */ - protected $create_time = null; - /** - * Start time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - */ - protected $start_time = null; - /** - * End time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 9; - */ - protected $end_time = null; - /** - * Last update time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 10; - */ - protected $last_update_time = null; - /** - * Maximum number of days to run the experiment/rollout. If auto-rollout is - * not enabled, default value and maximum will be 30 days. If auto-rollout is - * enabled, default value and maximum will be 6 days. - * - * Generated from protobuf field .google.protobuf.Duration experiment_length = 11; - */ - protected $experiment_length = null; - /** - * The history of updates to the experiment variants. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - */ - private $variants_history; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the experiment. - * Format: - * projects//locations//agents//environments//experiments/. - * @type string $display_name - * Required. The human-readable name of the experiment (unique in an - * environment). Limit of 64 characters. - * @type string $description - * The human-readable description of the experiment. - * @type int $state - * The current state of the experiment. - * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. - * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or - * RUNNING->DONE. - * @type \Google\Cloud\Dialogflow\Cx\V3\Experiment\Definition $definition - * The definition of the experiment. - * @type \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig $rollout_config - * The configuration for auto rollout. If set, there should be exactly two - * variants in the experiment (control variant being the default version of - * the flow), the traffic allocation for the non-control variant will - * gradually increase to 100% when conditions are met, and eventually - * replace the control variant to become the default version of the flow. - * @type \Google\Cloud\Dialogflow\Cx\V3\RolloutState $rollout_state - * State of the auto rollout process. - * @type string $rollout_failure_reason - * The reason why rollout has failed. Should only be set when state is - * ROLLOUT_FAILED. - * @type \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result $result - * Inference result of the experiment. - * @type \Google\Protobuf\Timestamp $create_time - * Creation time of this experiment. - * @type \Google\Protobuf\Timestamp $start_time - * Start time of this experiment. - * @type \Google\Protobuf\Timestamp $end_time - * End time of this experiment. - * @type \Google\Protobuf\Timestamp $last_update_time - * Last update time of this experiment. - * @type \Google\Protobuf\Duration $experiment_length - * Maximum number of days to run the experiment/rollout. If auto-rollout is - * not enabled, default value and maximum will be 30 days. If auto-rollout is - * enabled, default value and maximum will be 6 days. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\VariantsHistory>|\Google\Protobuf\Internal\RepeatedField $variants_history - * The history of updates to the experiment variants. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * The name of the experiment. - * Format: - * projects//locations//agents//environments//experiments/. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the experiment. - * Format: - * projects//locations//agents//environments//experiments/. - * - * 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 human-readable name of the experiment (unique in an - * environment). Limit of 64 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the experiment (unique in an - * environment). Limit of 64 characters. - * - * 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; - } - - /** - * The human-readable description of the experiment. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The human-readable description of the experiment. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The current state of the experiment. - * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. - * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or - * RUNNING->DONE. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the experiment. - * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. - * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or - * RUNNING->DONE. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\State::class); - $this->state = $var; - - return $this; - } - - /** - * The definition of the experiment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - * @return \Google\Cloud\Dialogflow\Cx\V3\Experiment\Definition|null - */ - public function getDefinition() - { - return $this->definition; - } - - public function hasDefinition() - { - return isset($this->definition); - } - - public function clearDefinition() - { - unset($this->definition); - } - - /** - * The definition of the experiment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Definition definition = 5; - * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment\Definition $var - * @return $this - */ - public function setDefinition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Definition::class); - $this->definition = $var; - - return $this; - } - - /** - * The configuration for auto rollout. If set, there should be exactly two - * variants in the experiment (control variant being the default version of - * the flow), the traffic allocation for the non-control variant will - * gradually increase to 100% when conditions are met, and eventually - * replace the control variant to become the default version of the flow. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; - * @return \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig|null - */ - public function getRolloutConfig() - { - return $this->rollout_config; - } - - public function hasRolloutConfig() - { - return isset($this->rollout_config); - } - - public function clearRolloutConfig() - { - unset($this->rollout_config); - } - - /** - * The configuration for auto rollout. If set, there should be exactly two - * variants in the experiment (control variant being the default version of - * the flow), the traffic allocation for the non-control variant will - * gradually increase to 100% when conditions are met, and eventually - * replace the control variant to become the default version of the flow. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; - * @param \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig $var - * @return $this - */ - public function setRolloutConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig::class); - $this->rollout_config = $var; - - return $this; - } - - /** - * State of the auto rollout process. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; - * @return \Google\Cloud\Dialogflow\Cx\V3\RolloutState|null - */ - public function getRolloutState() - { - return $this->rollout_state; - } - - public function hasRolloutState() - { - return isset($this->rollout_state); - } - - public function clearRolloutState() - { - unset($this->rollout_state); - } - - /** - * State of the auto rollout process. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; - * @param \Google\Cloud\Dialogflow\Cx\V3\RolloutState $var - * @return $this - */ - public function setRolloutState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\RolloutState::class); - $this->rollout_state = $var; - - return $this; - } - - /** - * The reason why rollout has failed. Should only be set when state is - * ROLLOUT_FAILED. - * - * Generated from protobuf field string rollout_failure_reason = 16; - * @return string - */ - public function getRolloutFailureReason() - { - return $this->rollout_failure_reason; - } - - /** - * The reason why rollout has failed. Should only be set when state is - * ROLLOUT_FAILED. - * - * Generated from protobuf field string rollout_failure_reason = 16; - * @param string $var - * @return $this - */ - public function setRolloutFailureReason($var) - { - GPBUtil::checkString($var, True); - $this->rollout_failure_reason = $var; - - return $this; - } - - /** - * Inference result of the experiment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - * @return \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result|null - */ - public function getResult() - { - return $this->result; - } - - public function hasResult() - { - return isset($this->result); - } - - public function clearResult() - { - unset($this->result); - } - - /** - * Inference result of the experiment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result result = 6; - * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result::class); - $this->result = $var; - - return $this; - } - - /** - * Creation time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - * @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); - } - - /** - * Creation time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Start time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - * @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); - } - - /** - * Start time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * End time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 9; - * @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); - } - - /** - * End time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Last update time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastUpdateTime() - { - return $this->last_update_time; - } - - public function hasLastUpdateTime() - { - return isset($this->last_update_time); - } - - public function clearLastUpdateTime() - { - unset($this->last_update_time); - } - - /** - * Last update time of this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_update_time = $var; - - return $this; - } - - /** - * Maximum number of days to run the experiment/rollout. If auto-rollout is - * not enabled, default value and maximum will be 30 days. If auto-rollout is - * enabled, default value and maximum will be 6 days. - * - * Generated from protobuf field .google.protobuf.Duration experiment_length = 11; - * @return \Google\Protobuf\Duration|null - */ - public function getExperimentLength() - { - return $this->experiment_length; - } - - public function hasExperimentLength() - { - return isset($this->experiment_length); - } - - public function clearExperimentLength() - { - unset($this->experiment_length); - } - - /** - * Maximum number of days to run the experiment/rollout. If auto-rollout is - * not enabled, default value and maximum will be 30 days. If auto-rollout is - * enabled, default value and maximum will be 6 days. - * - * Generated from protobuf field .google.protobuf.Duration experiment_length = 11; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setExperimentLength($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->experiment_length = $var; - - return $this; - } - - /** - * The history of updates to the experiment variants. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVariantsHistory() - { - return $this->variants_history; - } - - /** - * The history of updates to the experiment variants. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VariantsHistory variants_history = 12; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\VariantsHistory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVariantsHistory($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\VariantsHistory::class); - $this->variants_history = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Definition.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Definition.php deleted file mode 100644 index 172590bccc9a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Definition.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dialogflow.cx.v3.Experiment.Definition - */ -class Definition extends \Google\Protobuf\Internal\Message -{ - /** - * The condition defines which subset of sessions are selected for - * this experiment. If not specified, all sessions are eligible. E.g. - * "query_input.language_code=en" See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string condition = 1; - */ - protected $condition = ''; - protected $variants; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $condition - * The condition defines which subset of sessions are selected for - * this experiment. If not specified, all sessions are eligible. E.g. - * "query_input.language_code=en" See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * @type \Google\Cloud\Dialogflow\Cx\V3\VersionVariants $version_variants - * The flow versions as the variants of this experiment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * The condition defines which subset of sessions are selected for - * this experiment. If not specified, all sessions are eligible. E.g. - * "query_input.language_code=en" See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string condition = 1; - * @return string - */ - public function getCondition() - { - return $this->condition; - } - - /** - * The condition defines which subset of sessions are selected for - * this experiment. If not specified, all sessions are eligible. E.g. - * "query_input.language_code=en" See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string condition = 1; - * @param string $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkString($var, True); - $this->condition = $var; - - return $this; - } - - /** - * The flow versions as the variants of this experiment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\VersionVariants|null - */ - public function getVersionVariants() - { - return $this->readOneof(2); - } - - public function hasVersionVariants() - { - return $this->hasOneof(2); - } - - /** - * The flow versions as the variants of this experiment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\VersionVariants $var - * @return $this - */ - public function setVersionVariants($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\VersionVariants::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getVariants() - { - return $this->whichOneof("variants"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Definition::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Definition::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result.php deleted file mode 100644 index 611a18954cf4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.dialogflow.cx.v3.Experiment.Result - */ -class Result extends \Google\Protobuf\Internal\Message -{ - /** - * Version variants and metrics. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - */ - private $version_metrics; - /** - * The last time the experiment's stats data was updated. Will have default - * value if stats have never been computed for this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2; - */ - protected $last_update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\VersionMetrics>|\Google\Protobuf\Internal\RepeatedField $version_metrics - * Version variants and metrics. - * @type \Google\Protobuf\Timestamp $last_update_time - * The last time the experiment's stats data was updated. Will have default - * value if stats have never been computed for this experiment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Version variants and metrics. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVersionMetrics() - { - return $this->version_metrics; - } - - /** - * Version variants and metrics. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics version_metrics = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\VersionMetrics>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVersionMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\VersionMetrics::class); - $this->version_metrics = $arr; - - return $this; - } - - /** - * The last time the experiment's stats data was updated. Will have default - * value if stats have never been computed for this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastUpdateTime() - { - return $this->last_update_time; - } - - public function hasLastUpdateTime() - { - return isset($this->last_update_time); - } - - public function clearLastUpdateTime() - { - unset($this->last_update_time); - } - - /** - * The last time the experiment's stats data was updated. Will have default - * value if stats have never been computed for this experiment. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_update_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Result::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/ConfidenceInterval.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/ConfidenceInterval.php deleted file mode 100644 index 4f033010b23a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/ConfidenceInterval.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - */ -class ConfidenceInterval extends \Google\Protobuf\Internal\Message -{ - /** - * The confidence level used to construct the interval, i.e. there is X% - * chance that the true value is within this interval. - * - * Generated from protobuf field double confidence_level = 1; - */ - protected $confidence_level = 0.0; - /** - * The percent change between an experiment metric's value and the value - * for its control. - * - * Generated from protobuf field double ratio = 2; - */ - protected $ratio = 0.0; - /** - * Lower bound of the interval. - * - * Generated from protobuf field double lower_bound = 3; - */ - protected $lower_bound = 0.0; - /** - * Upper bound of the interval. - * - * Generated from protobuf field double upper_bound = 4; - */ - protected $upper_bound = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $confidence_level - * The confidence level used to construct the interval, i.e. there is X% - * chance that the true value is within this interval. - * @type float $ratio - * The percent change between an experiment metric's value and the value - * for its control. - * @type float $lower_bound - * Lower bound of the interval. - * @type float $upper_bound - * Upper bound of the interval. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * The confidence level used to construct the interval, i.e. there is X% - * chance that the true value is within this interval. - * - * Generated from protobuf field double confidence_level = 1; - * @return float - */ - public function getConfidenceLevel() - { - return $this->confidence_level; - } - - /** - * The confidence level used to construct the interval, i.e. there is X% - * chance that the true value is within this interval. - * - * Generated from protobuf field double confidence_level = 1; - * @param float $var - * @return $this - */ - public function setConfidenceLevel($var) - { - GPBUtil::checkDouble($var); - $this->confidence_level = $var; - - return $this; - } - - /** - * The percent change between an experiment metric's value and the value - * for its control. - * - * Generated from protobuf field double ratio = 2; - * @return float - */ - public function getRatio() - { - return $this->ratio; - } - - /** - * The percent change between an experiment metric's value and the value - * for its control. - * - * Generated from protobuf field double ratio = 2; - * @param float $var - * @return $this - */ - public function setRatio($var) - { - GPBUtil::checkDouble($var); - $this->ratio = $var; - - return $this; - } - - /** - * Lower bound of the interval. - * - * Generated from protobuf field double lower_bound = 3; - * @return float - */ - public function getLowerBound() - { - return $this->lower_bound; - } - - /** - * Lower bound of the interval. - * - * Generated from protobuf field double lower_bound = 3; - * @param float $var - * @return $this - */ - public function setLowerBound($var) - { - GPBUtil::checkDouble($var); - $this->lower_bound = $var; - - return $this; - } - - /** - * Upper bound of the interval. - * - * Generated from protobuf field double upper_bound = 4; - * @return float - */ - public function getUpperBound() - { - return $this->upper_bound; - } - - /** - * Upper bound of the interval. - * - * Generated from protobuf field double upper_bound = 4; - * @param float $var - * @return $this - */ - public function setUpperBound($var) - { - GPBUtil::checkDouble($var); - $this->upper_bound = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConfidenceInterval::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result_ConfidenceInterval::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/CountType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/CountType.php deleted file mode 100644 index 00c5ab3ddc33..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/CountType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.cx.v3.Experiment.Result.CountType - */ -class CountType -{ - /** - * Count type unspecified. - * - * Generated from protobuf enum COUNT_TYPE_UNSPECIFIED = 0; - */ - const COUNT_TYPE_UNSPECIFIED = 0; - /** - * Total number of occurrences of a 'NO_MATCH'. - * - * Generated from protobuf enum TOTAL_NO_MATCH_COUNT = 1; - */ - const TOTAL_NO_MATCH_COUNT = 1; - /** - * Total number of turn counts. - * - * Generated from protobuf enum TOTAL_TURN_COUNT = 2; - */ - const TOTAL_TURN_COUNT = 2; - /** - * Average turn count in a session. - * - * Generated from protobuf enum AVERAGE_TURN_COUNT = 3; - */ - const AVERAGE_TURN_COUNT = 3; - - private static $valueToName = [ - self::COUNT_TYPE_UNSPECIFIED => 'COUNT_TYPE_UNSPECIFIED', - self::TOTAL_NO_MATCH_COUNT => 'TOTAL_NO_MATCH_COUNT', - self::TOTAL_TURN_COUNT => 'TOTAL_TURN_COUNT', - self::AVERAGE_TURN_COUNT => 'AVERAGE_TURN_COUNT', - ]; - - 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(CountType::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result_CountType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/Metric.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/Metric.php deleted file mode 100644 index 60ee2f923168..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/Metric.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - */ -class Metric extends \Google\Protobuf\Internal\Message -{ - /** - * Ratio-based metric type. Only one of type or count_type is specified in - * each Metric. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - */ - protected $type = 0; - /** - * Count-based metric type. Only one of type or count_type is specified in - * each Metric. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; - */ - protected $count_type = 0; - /** - * The probability that the treatment is better than all other treatments - * in the experiment - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - */ - protected $confidence_interval = null; - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Ratio-based metric type. Only one of type or count_type is specified in - * each Metric. - * @type int $count_type - * Count-based metric type. Only one of type or count_type is specified in - * each Metric. - * @type float $ratio - * Ratio value of a metric. - * @type float $count - * Count value of a metric. - * @type \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\ConfidenceInterval $confidence_interval - * The probability that the treatment is better than all other treatments - * in the experiment - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Ratio-based metric type. Only one of type or count_type is specified in - * each Metric. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Ratio-based metric type. Only one of type or count_type is specified in - * each Metric. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\MetricType::class); - $this->type = $var; - - return $this; - } - - /** - * Count-based metric type. Only one of type or count_type is specified in - * each Metric. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; - * @return int - */ - public function getCountType() - { - return $this->count_type; - } - - /** - * Count-based metric type. Only one of type or count_type is specified in - * each Metric. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.CountType count_type = 5; - * @param int $var - * @return $this - */ - public function setCountType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\CountType::class); - $this->count_type = $var; - - return $this; - } - - /** - * Ratio value of a metric. - * - * Generated from protobuf field double ratio = 2; - * @return float - */ - public function getRatio() - { - return $this->readOneof(2); - } - - public function hasRatio() - { - return $this->hasOneof(2); - } - - /** - * Ratio value of a metric. - * - * Generated from protobuf field double ratio = 2; - * @param float $var - * @return $this - */ - public function setRatio($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Count value of a metric. - * - * Generated from protobuf field double count = 4; - * @return float - */ - public function getCount() - { - return $this->readOneof(4); - } - - public function hasCount() - { - return $this->hasOneof(4); - } - - /** - * Count value of a metric. - * - * Generated from protobuf field double count = 4; - * @param float $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The probability that the treatment is better than all other treatments - * in the experiment - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\ConfidenceInterval|null - */ - public function getConfidenceInterval() - { - return $this->confidence_interval; - } - - public function hasConfidenceInterval() - { - return isset($this->confidence_interval); - } - - public function clearConfidenceInterval() - { - unset($this->confidence_interval); - } - - /** - * The probability that the treatment is better than all other treatments - * in the experiment - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval confidence_interval = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\ConfidenceInterval $var - * @return $this - */ - public function setConfidenceInterval($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\ConfidenceInterval::class); - $this->confidence_interval = $var; - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Metric::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result_Metric::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/MetricType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/MetricType.php deleted file mode 100644 index 7f79de48fa8f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/MetricType.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType - */ -class MetricType -{ - /** - * Metric unspecified. - * - * Generated from protobuf enum METRIC_UNSPECIFIED = 0; - */ - const METRIC_UNSPECIFIED = 0; - /** - * Percentage of contained sessions without user calling back in 24 hours. - * - * Generated from protobuf enum CONTAINED_SESSION_NO_CALLBACK_RATE = 1; - */ - const CONTAINED_SESSION_NO_CALLBACK_RATE = 1; - /** - * Percentage of sessions that were handed to a human agent. - * - * Generated from protobuf enum LIVE_AGENT_HANDOFF_RATE = 2; - */ - const LIVE_AGENT_HANDOFF_RATE = 2; - /** - * Percentage of sessions with the same user calling back. - * - * Generated from protobuf enum CALLBACK_SESSION_RATE = 3; - */ - const CALLBACK_SESSION_RATE = 3; - /** - * Percentage of sessions where user hung up. - * - * Generated from protobuf enum ABANDONED_SESSION_RATE = 4; - */ - const ABANDONED_SESSION_RATE = 4; - /** - * Percentage of sessions reached Dialogflow 'END_PAGE' or - * 'END_SESSION'. - * - * Generated from protobuf enum SESSION_END_RATE = 5; - */ - const SESSION_END_RATE = 5; - - private static $valueToName = [ - self::METRIC_UNSPECIFIED => 'METRIC_UNSPECIFIED', - self::CONTAINED_SESSION_NO_CALLBACK_RATE => 'CONTAINED_SESSION_NO_CALLBACK_RATE', - self::LIVE_AGENT_HANDOFF_RATE => 'LIVE_AGENT_HANDOFF_RATE', - self::CALLBACK_SESSION_RATE => 'CALLBACK_SESSION_RATE', - self::ABANDONED_SESSION_RATE => 'ABANDONED_SESSION_RATE', - self::SESSION_END_RATE => 'SESSION_END_RATE', - ]; - - 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(MetricType::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result_MetricType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/VersionMetrics.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/VersionMetrics.php deleted file mode 100644 index c8b37c557518..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/Result/VersionMetrics.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - */ -class VersionMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { - */ - protected $version = ''; - /** - * The metrics and corresponding confidence intervals in the inference - * result. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - */ - private $metrics; - /** - * Number of sessions that were allocated to this version. - * - * Generated from protobuf field int32 session_count = 3; - */ - protected $session_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. - * Format: - * `projects//locations//agents//flows//versions/`. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\Metric>|\Google\Protobuf\Internal\RepeatedField $metrics - * The metrics and corresponding confidence intervals in the inference - * result. - * @type int $session_count - * Number of sessions that were allocated to this version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string version = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * The metrics and corresponding confidence intervals in the inference - * result. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetrics() - { - return $this->metrics; - } - - /** - * The metrics and corresponding confidence intervals in the inference - * result. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment.Result.Metric metrics = 2; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\Metric>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Experiment\Result\Metric::class); - $this->metrics = $arr; - - return $this; - } - - /** - * Number of sessions that were allocated to this version. - * - * Generated from protobuf field int32 session_count = 3; - * @return int - */ - public function getSessionCount() - { - return $this->session_count; - } - - /** - * Number of sessions that were allocated to this version. - * - * Generated from protobuf field int32 session_count = 3; - * @param int $var - * @return $this - */ - public function setSessionCount($var) - { - GPBUtil::checkInt32($var); - $this->session_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VersionMetrics::class, \Google\Cloud\Dialogflow\Cx\V3\Experiment_Result_VersionMetrics::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/State.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/State.php deleted file mode 100644 index 02f99268812a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Experiment/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dialogflow.cx.v3.Experiment.State - */ -class State -{ - /** - * State unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The experiment is created but not started yet. - * - * Generated from protobuf enum DRAFT = 1; - */ - const DRAFT = 1; - /** - * The experiment is running. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The experiment is done. - * - * Generated from protobuf enum DONE = 3; - */ - const DONE = 3; - /** - * The experiment with auto-rollout enabled has failed. - * - * Generated from protobuf enum ROLLOUT_FAILED = 4; - */ - const ROLLOUT_FAILED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::DRAFT => 'DRAFT', - self::RUNNING => 'RUNNING', - self::DONE => 'DONE', - self::ROLLOUT_FAILED => 'ROLLOUT_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\Cx\V3\Experiment_State::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest.php deleted file mode 100644 index fbeb8f65dc9b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest.php +++ /dev/null @@ -1,296 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportAgentRequest - */ -class ExportAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the agent to export. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. 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) = OPTIONAL]; - */ - protected $agent_uri = ''; - /** - * Optional. The data format of the exported agent. If not specified, `BLOB` - * is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_format = 0; - /** - * Optional. Environment name. If not set, draft environment is assumed. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $environment = ''; - /** - * Optional. The Git branch to export the agent to. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.GitDestination git_destination = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $git_destination = null; - /** - * Optional. Whether to include BigQuery Export setting. - * - * Generated from protobuf field bool include_bigquery_export_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $include_bigquery_export_settings = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the agent to export. - * Format: `projects//locations//agents/`. - * @type string $agent_uri - * Optional. 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). - * @type int $data_format - * Optional. The data format of the exported agent. If not specified, `BLOB` - * is assumed. - * @type string $environment - * Optional. Environment name. If not set, draft environment is assumed. - * Format: - * `projects//locations//agents//environments/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest\GitDestination $git_destination - * Optional. The Git branch to export the agent to. - * @type bool $include_bigquery_export_settings - * Optional. Whether to include BigQuery Export setting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the agent to export. - * Format: `projects//locations//agents/`. - * - * 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 agent to export. - * Format: `projects//locations//agents/`. - * - * 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 [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) = OPTIONAL]; - * @return string - */ - public function getAgentUri() - { - return $this->agent_uri; - } - - /** - * Optional. 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) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAgentUri($var) - { - GPBUtil::checkString($var, True); - $this->agent_uri = $var; - - return $this; - } - - /** - * Optional. The data format of the exported agent. If not specified, `BLOB` - * is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * Optional. The data format of the exported agent. If not specified, `BLOB` - * is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * Optional. Environment name. If not set, draft environment is assumed. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Optional. Environment name. If not set, draft environment is assumed. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - - /** - * Optional. The Git branch to export the agent to. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.GitDestination git_destination = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest\GitDestination|null - */ - public function getGitDestination() - { - return $this->git_destination; - } - - public function hasGitDestination() - { - return isset($this->git_destination); - } - - public function clearGitDestination() - { - unset($this->git_destination); - } - - /** - * Optional. The Git branch to export the agent to. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportAgentRequest.GitDestination git_destination = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest\GitDestination $var - * @return $this - */ - public function setGitDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest\GitDestination::class); - $this->git_destination = $var; - - return $this; - } - - /** - * Optional. Whether to include BigQuery Export setting. - * - * Generated from protobuf field bool include_bigquery_export_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIncludeBigqueryExportSettings() - { - return $this->include_bigquery_export_settings; - } - - /** - * Optional. Whether to include BigQuery Export setting. - * - * Generated from protobuf field bool include_bigquery_export_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIncludeBigqueryExportSettings($var) - { - GPBUtil::checkBool($var); - $this->include_bigquery_export_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/DataFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/DataFormat.php deleted file mode 100644 index d4ddefd918ca..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/DataFormat.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat - */ -class DataFormat -{ - /** - * Unspecified format. - * - * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; - */ - const DATA_FORMAT_UNSPECIFIED = 0; - /** - * Agent content will be exported as raw bytes. - * - * Generated from protobuf enum BLOB = 1; - */ - const BLOB = 1; - /** - * Agent content will be exported in JSON Package format. - * - * Generated from protobuf enum JSON_PACKAGE = 4; - */ - const JSON_PACKAGE = 4; - - private static $valueToName = [ - self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', - self::BLOB => 'BLOB', - self::JSON_PACKAGE => 'JSON_PACKAGE', - ]; - - 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(DataFormat::class, \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest_DataFormat::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/GitDestination.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/GitDestination.php deleted file mode 100644 index 7ddfe1c3a33b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentRequest/GitDestination.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportAgentRequest.GitDestination - */ -class GitDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Tracking branch for the git push. - * - * Generated from protobuf field string tracking_branch = 1; - */ - protected $tracking_branch = ''; - /** - * Commit message for the git push. - * - * Generated from protobuf field string commit_message = 2; - */ - protected $commit_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $tracking_branch - * Tracking branch for the git push. - * @type string $commit_message - * Commit message for the git push. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Tracking branch for the git push. - * - * Generated from protobuf field string tracking_branch = 1; - * @return string - */ - public function getTrackingBranch() - { - return $this->tracking_branch; - } - - /** - * Tracking branch for the git push. - * - * Generated from protobuf field string tracking_branch = 1; - * @param string $var - * @return $this - */ - public function setTrackingBranch($var) - { - GPBUtil::checkString($var, True); - $this->tracking_branch = $var; - - return $this; - } - - /** - * Commit message for the git push. - * - * Generated from protobuf field string commit_message = 2; - * @return string - */ - public function getCommitMessage() - { - return $this->commit_message; - } - - /** - * Commit message for the git push. - * - * Generated from protobuf field string commit_message = 2; - * @param string $var - * @return $this - */ - public function setCommitMessage($var) - { - GPBUtil::checkString($var, True); - $this->commit_message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GitDestination::class, \Google\Cloud\Dialogflow\Cx\V3\ExportAgentRequest_GitDestination::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentResponse.php deleted file mode 100644 index 934b8c9d04d3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportAgentResponse.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.dialogflow.cx.v3.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 - * if `agent_uri` is specified in - * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. - * @type string $agent_content - * Uncompressed raw byte content for agent. This field is populated - * if none of `agent_uri` and `git_destination` are specified in - * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. - * @type string $commit_sha - * Commit SHA of the git push. This field is populated if - * `git_destination` is specified in - * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * The URI to a file containing the exported agent. This field is populated - * if `agent_uri` is specified in - * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.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 - * if `agent_uri` is specified in - * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.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; - } - - /** - * Uncompressed raw byte content for agent. This field is populated - * if none of `agent_uri` and `git_destination` are specified in - * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. - * - * Generated from protobuf field bytes agent_content = 2; - * @return string - */ - public function getAgentContent() - { - return $this->readOneof(2); - } - - public function hasAgentContent() - { - return $this->hasOneof(2); - } - - /** - * Uncompressed raw byte content for agent. This field is populated - * if none of `agent_uri` and `git_destination` are specified in - * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. - * - * 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; - } - - /** - * Commit SHA of the git push. This field is populated if - * `git_destination` is specified in - * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. - * - * Generated from protobuf field string commit_sha = 3; - * @return string - */ - public function getCommitSha() - { - return $this->readOneof(3); - } - - public function hasCommitSha() - { - return $this->hasOneof(3); - } - - /** - * Commit SHA of the git push. This field is populated if - * `git_destination` is specified in - * [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. - * - * Generated from protobuf field string commit_sha = 3; - * @param string $var - * @return $this - */ - public function setCommitSha($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getAgent() - { - return $this->whichOneof("agent"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesMetadata.php deleted file mode 100644 index e57e46a31ee8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata - */ -class ExportEntityTypesMetadata 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\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest.php deleted file mode 100644 index abd0830d226c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest - */ -class ExportEntityTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent agent to export entity types. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The name of the entity types to export. - * Format: - * `projects//locations//agents//entityTypes/`. - * - * Generated from protobuf field repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entity_types; - /** - * Optional. The data format of the exported entity types. If not specified, - * `BLOB` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_format = 0; - /** - * Optional. The language to retrieve the entity type for. The following - * fields are language dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, all language dependent fields will be retrieved. - * [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 = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent agent to export entity types. - * Format: `projects//locations//agents/`. - * @type array|\Google\Protobuf\Internal\RepeatedField $entity_types - * Required. The name of the entity types to export. - * Format: - * `projects//locations//agents//entityTypes/`. - * @type string $entity_types_uri - * Optional. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the entity - * types to. The format of this URI must be - * `gs:///`. - * 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). - * @type bool $entity_types_content_inline - * Optional. The option to return the serialized entity types inline. - * @type int $data_format - * Optional. The data format of the exported entity types. If not specified, - * `BLOB` is assumed. - * @type string $language_code - * Optional. The language to retrieve the entity type for. The following - * fields are language dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, all language dependent fields will be retrieved. - * [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\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent agent to export entity types. - * Format: `projects//locations//agents/`. - * - * 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 parent agent to export entity types. - * Format: `projects//locations//agents/`. - * - * 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 the entity types to export. - * Format: - * `projects//locations//agents//entityTypes/`. - * - * Generated from protobuf field repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityTypes() - { - return $this->entity_types; - } - - /** - * Required. The name of the entity types to export. - * Format: - * `projects//locations//agents//entityTypes/`. - * - * Generated from protobuf field repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->entity_types = $arr; - - return $this; - } - - /** - * Optional. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the entity - * types to. The format of this URI must be - * `gs:///`. - * 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 entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEntityTypesUri() - { - return $this->readOneof(3); - } - - public function hasEntityTypesUri() - { - return $this->hasOneof(3); - } - - /** - * Optional. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the entity - * types to. The format of this URI must be - * `gs:///`. - * 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 entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEntityTypesUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. The option to return the serialized entity types inline. - * - * Generated from protobuf field bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEntityTypesContentInline() - { - return $this->readOneof(4); - } - - public function hasEntityTypesContentInline() - { - return $this->hasOneof(4); - } - - /** - * Optional. The option to return the serialized entity types inline. - * - * Generated from protobuf field bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEntityTypesContentInline($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. The data format of the exported entity types. If not specified, - * `BLOB` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * Optional. The data format of the exported entity types. If not specified, - * `BLOB` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ExportEntityTypesRequest\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * Optional. The language to retrieve the entity type for. The following - * fields are language dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, all language dependent fields will be retrieved. - * [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 = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language to retrieve the entity type for. The following - * fields are language dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, all language dependent fields will be retrieved. - * [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 = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest/DataFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest/DataFormat.php deleted file mode 100644 index 8739cd3e6684..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesRequest/DataFormat.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat - */ -class DataFormat -{ - /** - * Unspecified format. Treated as `BLOB`. - * - * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; - */ - const DATA_FORMAT_UNSPECIFIED = 0; - /** - * EntityTypes will be exported as raw bytes. - * - * Generated from protobuf enum BLOB = 1; - */ - const BLOB = 1; - /** - * EntityTypes will be exported in JSON Package format. - * - * Generated from protobuf enum JSON_PACKAGE = 5; - */ - const JSON_PACKAGE = 5; - - private static $valueToName = [ - self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', - self::BLOB => 'BLOB', - self::JSON_PACKAGE => 'JSON_PACKAGE', - ]; - - 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(DataFormat::class, \Google\Cloud\Dialogflow\Cx\V3\ExportEntityTypesRequest_DataFormat::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesResponse.php deleted file mode 100644 index 0d57a8fe6781..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportEntityTypesResponse.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse - */ -class ExportEntityTypesResponse extends \Google\Protobuf\Internal\Message -{ - protected $exported_entity_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity_types_uri - * The URI to a file containing the exported entity types. This field is - * populated only if `entity_types_uri` is specified in - * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. - * @type \Google\Cloud\Dialogflow\Cx\V3\InlineDestination $entity_types_content - * Uncompressed byte content for entity types. This field is populated only - * if `entity_types_content_inline` is set to true in - * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * The URI to a file containing the exported entity types. This field is - * populated only if `entity_types_uri` is specified in - * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. - * - * Generated from protobuf field string entity_types_uri = 1; - * @return string - */ - public function getEntityTypesUri() - { - return $this->readOneof(1); - } - - public function hasEntityTypesUri() - { - return $this->hasOneof(1); - } - - /** - * The URI to a file containing the exported entity types. This field is - * populated only if `entity_types_uri` is specified in - * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. - * - * Generated from protobuf field string entity_types_uri = 1; - * @param string $var - * @return $this - */ - public function setEntityTypesUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Uncompressed byte content for entity types. This field is populated only - * if `entity_types_content_inline` is set to true in - * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\InlineDestination|null - */ - public function getEntityTypesContent() - { - return $this->readOneof(2); - } - - public function hasEntityTypesContent() - { - return $this->hasOneof(2); - } - - /** - * Uncompressed byte content for entity types. This field is populated only - * if `entity_types_content_inline` is set to true in - * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\InlineDestination $var - * @return $this - */ - public function setEntityTypesContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InlineDestination::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getExportedEntityTypes() - { - return $this->whichOneof("exported_entity_types"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowRequest.php deleted file mode 100644 index 52a18b27dc1e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowRequest.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportFlowRequest - */ -class ExportFlowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the flow to export. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the flow to. - * The format of this URI must be `gs:///`. If left - * unspecified, the serialized flow 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 flow_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $flow_uri = ''; - /** - * Optional. Whether to export flows referenced by the specified flow. - * - * Generated from protobuf field bool include_referenced_flows = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $include_referenced_flows = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the flow to export. - * Format: - * `projects//locations//agents//flows/`. - * @type string $flow_uri - * Optional. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the flow to. - * The format of this URI must be `gs:///`. If left - * unspecified, the serialized flow 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). - * @type bool $include_referenced_flows - * Optional. Whether to export flows referenced by the specified flow. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the flow to export. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 flow to export. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the flow to. - * The format of this URI must be `gs:///`. If left - * unspecified, the serialized flow 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 flow_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFlowUri() - { - return $this->flow_uri; - } - - /** - * Optional. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the flow to. - * The format of this URI must be `gs:///`. If left - * unspecified, the serialized flow 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 flow_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFlowUri($var) - { - GPBUtil::checkString($var, True); - $this->flow_uri = $var; - - return $this; - } - - /** - * Optional. Whether to export flows referenced by the specified flow. - * - * Generated from protobuf field bool include_referenced_flows = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIncludeReferencedFlows() - { - return $this->include_referenced_flows; - } - - /** - * Optional. Whether to export flows referenced by the specified flow. - * - * Generated from protobuf field bool include_referenced_flows = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIncludeReferencedFlows($var) - { - GPBUtil::checkBool($var); - $this->include_referenced_flows = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowResponse.php deleted file mode 100644 index c849cee8ef79..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportFlowResponse.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportFlowResponse - */ -class ExportFlowResponse extends \Google\Protobuf\Internal\Message -{ - protected $flow; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $flow_uri - * The URI to a file containing the exported flow. This field is populated - * only if `flow_uri` is specified in - * [ExportFlowRequest][google.cloud.dialogflow.cx.v3.ExportFlowRequest]. - * @type string $flow_content - * Uncompressed raw byte content for flow. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * The URI to a file containing the exported flow. This field is populated - * only if `flow_uri` is specified in - * [ExportFlowRequest][google.cloud.dialogflow.cx.v3.ExportFlowRequest]. - * - * Generated from protobuf field string flow_uri = 1; - * @return string - */ - public function getFlowUri() - { - return $this->readOneof(1); - } - - public function hasFlowUri() - { - return $this->hasOneof(1); - } - - /** - * The URI to a file containing the exported flow. This field is populated - * only if `flow_uri` is specified in - * [ExportFlowRequest][google.cloud.dialogflow.cx.v3.ExportFlowRequest]. - * - * Generated from protobuf field string flow_uri = 1; - * @param string $var - * @return $this - */ - public function setFlowUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Uncompressed raw byte content for flow. - * - * Generated from protobuf field bytes flow_content = 2; - * @return string - */ - public function getFlowContent() - { - return $this->readOneof(2); - } - - public function hasFlowContent() - { - return $this->hasOneof(2); - } - - /** - * Uncompressed raw byte content for flow. - * - * Generated from protobuf field bytes flow_content = 2; - * @param string $var - * @return $this - */ - public function setFlowContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getFlow() - { - return $this->whichOneof("flow"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsMetadata.php deleted file mode 100644 index af1c826764e4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - */ -class ExportIntentsMetadata 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\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest.php deleted file mode 100644 index 4b9f7ca27d1a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest.php +++ /dev/null @@ -1,251 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportIntentsRequest - */ -class ExportIntentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent agent to export intents. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The name of the intents to export. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $intents; - /** - * Optional. The data format of the exported intents. If not specified, `BLOB` - * is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_format = 0; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent agent to export intents. - * Format: `projects//locations//agents/`. - * @type array|\Google\Protobuf\Internal\RepeatedField $intents - * Required. The name of the intents to export. - * Format: - * `projects//locations//agents//intents/`. - * @type string $intents_uri - * Optional. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the - * intents to. The format of this URI must be - * `gs:///`. - * 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). - * @type bool $intents_content_inline - * Optional. The option to return the serialized intents inline. - * @type int $data_format - * Optional. The data format of the exported intents. If not specified, `BLOB` - * is assumed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent agent to export intents. - * Format: `projects//locations//agents/`. - * - * 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 parent agent to export intents. - * Format: `projects//locations//agents/`. - * - * 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 the intents to export. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntents() - { - return $this->intents; - } - - /** - * Required. The name of the intents to export. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->intents = $arr; - - return $this; - } - - /** - * Optional. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the - * intents to. The format of this URI must be - * `gs:///`. - * 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 intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIntentsUri() - { - return $this->readOneof(3); - } - - public function hasIntentsUri() - { - return $this->hasOneof(3); - } - - /** - * Optional. The [Google Cloud - * Storage](https://cloud.google.com/storage/docs/) URI to export the - * intents to. The format of this URI must be - * `gs:///`. - * 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 intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIntentsUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. The option to return the serialized intents inline. - * - * Generated from protobuf field bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIntentsContentInline() - { - return $this->readOneof(4); - } - - public function hasIntentsContentInline() - { - return $this->hasOneof(4); - } - - /** - * Optional. The option to return the serialized intents inline. - * - * Generated from protobuf field bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIntentsContentInline($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. The data format of the exported intents. If not specified, `BLOB` - * is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * Optional. The data format of the exported intents. If not specified, `BLOB` - * is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ExportIntentsRequest\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest/DataFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest/DataFormat.php deleted file mode 100644 index 05837d20e807..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsRequest/DataFormat.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat - */ -class DataFormat -{ - /** - * Unspecified format. Treated as `BLOB`. - * - * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; - */ - const DATA_FORMAT_UNSPECIFIED = 0; - /** - * Intents will be exported as raw bytes. - * - * Generated from protobuf enum BLOB = 1; - */ - const BLOB = 1; - /** - * Intents will be exported in JSON format. - * - * Generated from protobuf enum JSON = 2; - */ - const JSON = 2; - /** - * Intents will be exported in CSV format. - * - * Generated from protobuf enum CSV = 3; - */ - const CSV = 3; - - private static $valueToName = [ - self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', - self::BLOB => 'BLOB', - self::JSON => 'JSON', - self::CSV => 'CSV', - ]; - - 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(DataFormat::class, \Google\Cloud\Dialogflow\Cx\V3\ExportIntentsRequest_DataFormat::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsResponse.php deleted file mode 100644 index 6700f6cc1ba1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportIntentsResponse.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportIntentsResponse - */ -class ExportIntentsResponse extends \Google\Protobuf\Internal\Message -{ - protected $intents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $intents_uri - * The URI to a file containing the exported intents. This field is - * populated only if `intents_uri` is specified in - * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. - * @type \Google\Cloud\Dialogflow\Cx\V3\InlineDestination $intents_content - * Uncompressed byte content for intents. This field is populated only if - * `intents_content_inline` is set to true in - * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * The URI to a file containing the exported intents. This field is - * populated only if `intents_uri` is specified in - * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. - * - * Generated from protobuf field string intents_uri = 1; - * @return string - */ - public function getIntentsUri() - { - return $this->readOneof(1); - } - - public function hasIntentsUri() - { - return $this->hasOneof(1); - } - - /** - * The URI to a file containing the exported intents. This field is - * populated only if `intents_uri` is specified in - * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. - * - * Generated from protobuf field string intents_uri = 1; - * @param string $var - * @return $this - */ - public function setIntentsUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Uncompressed byte content for intents. This field is populated only if - * `intents_content_inline` is set to true in - * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineDestination intents_content = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\InlineDestination|null - */ - public function getIntentsContent() - { - return $this->readOneof(2); - } - - public function hasIntentsContent() - { - return $this->hasOneof(2); - } - - /** - * Uncompressed byte content for intents. This field is populated only if - * `intents_content_inline` is set to true in - * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3.ExportIntentsRequest]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineDestination intents_content = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\InlineDestination $var - * @return $this - */ - public function setIntentsContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InlineDestination::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getIntents() - { - return $this->whichOneof("intents"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesMetadata.php deleted file mode 100644 index b4c4d009858d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata - */ -class ExportTestCasesMetadata 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\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest.php deleted file mode 100644 index 00969237f19d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportTestCasesRequest - */ -class ExportTestCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent where to export test cases from. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The data format of the exported test cases. If not specified, `BLOB` is - * assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; - */ - protected $data_format = 0; - /** - * The filter expression used to filter exported test cases, see - * [API Filtering](https://aip.dev/160). The expression is case insensitive - * and supports the following syntax: - * name = [OR name = ] ... - * For example: - * * "name = t1 OR name = t2" matches the test case with the exact resource - * name "t1" or "t2". - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent where to export test cases from. - * Format: `projects//locations//agents/`. - * @type string $gcs_uri - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to - * export the test cases to. The format of this URI must be - * `gs:///`. If unspecified, the serialized test - * cases 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). - * @type int $data_format - * The data format of the exported test cases. If not specified, `BLOB` is - * assumed. - * @type string $filter - * The filter expression used to filter exported test cases, see - * [API Filtering](https://aip.dev/160). The expression is case insensitive - * and supports the following syntax: - * name = [OR name = ] ... - * For example: - * * "name = t1 OR name = t2" matches the test case with the exact resource - * name "t1" or "t2". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent where to export test cases from. - * Format: `projects//locations//agents/`. - * - * 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 where to export test cases from. - * Format: `projects//locations//agents/`. - * - * 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](https://cloud.google.com/storage/docs/) URI to - * export the test cases to. The format of this URI must be - * `gs:///`. If unspecified, the serialized test - * cases 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 gcs_uri = 2; - * @return string - */ - public function getGcsUri() - { - return $this->readOneof(2); - } - - public function hasGcsUri() - { - return $this->hasOneof(2); - } - - /** - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to - * export the test cases to. The format of this URI must be - * `gs:///`. If unspecified, the serialized test - * cases 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 gcs_uri = 2; - * @param string $var - * @return $this - */ - public function setGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The data format of the exported test cases. If not specified, `BLOB` is - * assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * The data format of the exported test cases. If not specified, `BLOB` is - * assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat data_format = 3; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ExportTestCasesRequest\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * The filter expression used to filter exported test cases, see - * [API Filtering](https://aip.dev/160). The expression is case insensitive - * and supports the following syntax: - * name = [OR name = ] ... - * For example: - * * "name = t1 OR name = t2" matches the test case with the exact resource - * name "t1" or "t2". - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression used to filter exported test cases, see - * [API Filtering](https://aip.dev/160). The expression is case insensitive - * and supports the following syntax: - * name = [OR name = ] ... - * For example: - * * "name = t1 OR name = t2" matches the test case with the exact resource - * name "t1" or "t2". - * - * 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; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest/DataFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest/DataFormat.php deleted file mode 100644 index 9dca1dd0c7b9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesRequest/DataFormat.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat - */ -class DataFormat -{ - /** - * Unspecified format. - * - * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; - */ - const DATA_FORMAT_UNSPECIFIED = 0; - /** - * Raw bytes. - * - * Generated from protobuf enum BLOB = 1; - */ - const BLOB = 1; - /** - * JSON format. - * - * Generated from protobuf enum JSON = 2; - */ - const JSON = 2; - - private static $valueToName = [ - self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', - self::BLOB => 'BLOB', - 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(DataFormat::class, \Google\Cloud\Dialogflow\Cx\V3\ExportTestCasesRequest_DataFormat::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesResponse.php deleted file mode 100644 index 5fbeeedaea5e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ExportTestCasesResponse.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.dialogflow.cx.v3.ExportTestCasesResponse - */ -class ExportTestCasesResponse extends \Google\Protobuf\Internal\Message -{ - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_uri - * The URI to a file containing the exported test cases. This field is - * populated only if `gcs_uri` is specified in - * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. - * @type string $content - * Uncompressed raw byte content for test cases. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The URI to a file containing the exported test cases. This field is - * populated only if `gcs_uri` is specified in - * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. - * - * Generated from protobuf field string gcs_uri = 1; - * @return string - */ - public function getGcsUri() - { - return $this->readOneof(1); - } - - public function hasGcsUri() - { - return $this->hasOneof(1); - } - - /** - * The URI to a file containing the exported test cases. This field is - * populated only if `gcs_uri` is specified in - * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. - * - * Generated from protobuf field string gcs_uri = 1; - * @param string $var - * @return $this - */ - public function setGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Uncompressed raw byte content for test cases. - * - * Generated from protobuf field bytes content = 2; - * @return string - */ - public function getContent() - { - return $this->readOneof(2); - } - - public function hasContent() - { - return $this->hasOneof(2); - } - - /** - * Uncompressed raw byte content for test cases. - * - * Generated from protobuf field bytes content = 2; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FilterSpecs.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FilterSpecs.php deleted file mode 100644 index a77bd97fae07..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FilterSpecs.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.dialogflow.cx.v3.FilterSpecs - */ -class FilterSpecs extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Data Stores where the boosting configuration is applied. The full - * names of the referenced data stores. Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * - * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $data_stores; - /** - * Optional. The filter expression to be applied. - * Expression syntax is documented at - * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $data_stores - * Optional. Data Stores where the boosting configuration is applied. The full - * names of the referenced data stores. Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * @type string $filter - * Optional. The filter expression to be applied. - * Expression syntax is documented at - * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Data Stores where the boosting configuration is applied. The full - * names of the referenced data stores. Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * - * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataStores() - { - return $this->data_stores; - } - - /** - * Optional. Data Stores where the boosting configuration is applied. The full - * names of the referenced data stores. Formats: - * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` - * `projects/{project}/locations/{location}/dataStores/{data_store}` - * - * Generated from protobuf field repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataStores($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_stores = $arr; - - return $this; - } - - /** - * Optional. The filter expression to be applied. - * Expression syntax is documented at - * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter expression to be applied. - * Expression syntax is documented at - * https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow.php deleted file mode 100644 index f2e0f44fc815..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow.php +++ /dev/null @@ -1,670 +0,0 @@ -google.cloud.dialogflow.cx.v3.Flow - */ -class Flow extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the flow. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the flow. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * The description of the flow. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * A flow's transition routes serve two purposes: - * * They are responsible for matching the user's first utterances in the - * flow. - * * They are inherited by every page's [transition - * routes][Page.transition_routes] and can support use cases such as the user - * saying "help" or "can I talk to a human?", which can be handled in a common - * way regardless of the current page. Transition routes defined in the page - * have higher priority than those defined in the flow. - * TransitionRoutes are evaluated in the following order: - * * TransitionRoutes with intent specified. - * * TransitionRoutes with only condition specified. - * TransitionRoutes with intent specified are inherited by pages in the flow. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4; - */ - private $transition_routes; - /** - * A flow's event handlers serve two purposes: - * * They are responsible for handling events (e.g. no match, - * webhook errors) in the flow. - * * They are inherited by every page's [event - * handlers][Page.event_handlers], which can be used to handle common events - * regardless of the current page. Event handlers defined in the page - * have higher priority than those defined in the flow. - * Unlike - * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], - * these handlers are evaluated on a first-match basis. The first one that - * matches the event get executed, with the rest being ignored. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; - */ - private $event_handlers; - /** - * A flow's transition route group serve two purposes: - * * They are responsible for matching the user's first utterances in the - * flow. - * * They are inherited by every page's [transition - * route groups][Page.transition_route_groups]. Transition route groups - * defined in the page have higher priority than those defined in the flow. - * Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/` - * for agent-level groups. - * - * Generated from protobuf field repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { - */ - private $transition_route_groups; - /** - * NLU related settings of the flow. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; - */ - protected $nlu_settings = null; - /** - * Hierarchical advanced settings for this flow. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 14; - */ - protected $advanced_settings = null; - /** - * Optional. Knowledge connector configuration. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $knowledge_connector_settings = null; - /** - * Optional. Defined structured input parameters for this flow. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $input_parameter_definitions; - /** - * Optional. Defined structured output parameters for this flow. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $output_parameter_definitions; - /** - * Optional. Multi-lingual agent settings for this flow. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $multi_language_settings = null; - /** - * Indicates whether the flow is locked for changes. If the flow is locked, - * modifications to the flow will be rejected. - * - * Generated from protobuf field bool locked = 30; - */ - protected $locked = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the flow. - * Format: - * `projects//locations//agents//flows/`. - * @type string $display_name - * Required. The human-readable name of the flow. - * @type string $description - * The description of the flow. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $transition_routes - * A flow's transition routes serve two purposes: - * * They are responsible for matching the user's first utterances in the - * flow. - * * They are inherited by every page's [transition - * routes][Page.transition_routes] and can support use cases such as the user - * saying "help" or "can I talk to a human?", which can be handled in a common - * way regardless of the current page. Transition routes defined in the page - * have higher priority than those defined in the flow. - * TransitionRoutes are evaluated in the following order: - * * TransitionRoutes with intent specified. - * * TransitionRoutes with only condition specified. - * TransitionRoutes with intent specified are inherited by pages in the flow. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $event_handlers - * A flow's event handlers serve two purposes: - * * They are responsible for handling events (e.g. no match, - * webhook errors) in the flow. - * * They are inherited by every page's [event - * handlers][Page.event_handlers], which can be used to handle common events - * regardless of the current page. Event handlers defined in the page - * have higher priority than those defined in the flow. - * Unlike - * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], - * these handlers are evaluated on a first-match basis. The first one that - * matches the event get executed, with the rest being ignored. - * @type array|\Google\Protobuf\Internal\RepeatedField $transition_route_groups - * A flow's transition route group serve two purposes: - * * They are responsible for matching the user's first utterances in the - * flow. - * * They are inherited by every page's [transition - * route groups][Page.transition_route_groups]. Transition route groups - * defined in the page have higher priority than those defined in the flow. - * Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/` - * for agent-level groups. - * @type \Google\Cloud\Dialogflow\Cx\V3\NluSettings $nlu_settings - * NLU related settings of the flow. - * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings - * Hierarchical advanced settings for this flow. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * @type \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings $knowledge_connector_settings - * Optional. Knowledge connector configuration. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $input_parameter_definitions - * Optional. Defined structured input parameters for this flow. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $output_parameter_definitions - * Optional. Defined structured output parameters for this flow. - * @type \Google\Cloud\Dialogflow\Cx\V3\Flow\MultiLanguageSettings $multi_language_settings - * Optional. Multi-lingual agent settings for this flow. - * @type bool $locked - * Indicates whether the flow is locked for changes. If the flow is locked, - * modifications to the flow will be rejected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the flow. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the flow. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 human-readable name of the flow. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the flow. - * - * 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; - } - - /** - * The description of the flow. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the flow. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * A flow's transition routes serve two purposes: - * * They are responsible for matching the user's first utterances in the - * flow. - * * They are inherited by every page's [transition - * routes][Page.transition_routes] and can support use cases such as the user - * saying "help" or "can I talk to a human?", which can be handled in a common - * way regardless of the current page. Transition routes defined in the page - * have higher priority than those defined in the flow. - * TransitionRoutes are evaluated in the following order: - * * TransitionRoutes with intent specified. - * * TransitionRoutes with only condition specified. - * TransitionRoutes with intent specified are inherited by pages in the flow. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitionRoutes() - { - return $this->transition_routes; - } - - /** - * A flow's transition routes serve two purposes: - * * They are responsible for matching the user's first utterances in the - * flow. - * * They are inherited by every page's [transition - * routes][Page.transition_routes] and can support use cases such as the user - * saying "help" or "can I talk to a human?", which can be handled in a common - * way regardless of the current page. Transition routes defined in the page - * have higher priority than those defined in the flow. - * TransitionRoutes are evaluated in the following order: - * * TransitionRoutes with intent specified. - * * TransitionRoutes with only condition specified. - * TransitionRoutes with intent specified are inherited by pages in the flow. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitionRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute::class); - $this->transition_routes = $arr; - - return $this; - } - - /** - * A flow's event handlers serve two purposes: - * * They are responsible for handling events (e.g. no match, - * webhook errors) in the flow. - * * They are inherited by every page's [event - * handlers][Page.event_handlers], which can be used to handle common events - * regardless of the current page. Event handlers defined in the page - * have higher priority than those defined in the flow. - * Unlike - * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], - * these handlers are evaluated on a first-match basis. The first one that - * matches the event get executed, with the rest being ignored. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventHandlers() - { - return $this->event_handlers; - } - - /** - * A flow's event handlers serve two purposes: - * * They are responsible for handling events (e.g. no match, - * webhook errors) in the flow. - * * They are inherited by every page's [event - * handlers][Page.event_handlers], which can be used to handle common events - * regardless of the current page. Event handlers defined in the page - * have higher priority than those defined in the flow. - * Unlike - * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], - * these handlers are evaluated on a first-match basis. The first one that - * matches the event get executed, with the rest being ignored. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventHandlers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\EventHandler::class); - $this->event_handlers = $arr; - - return $this; - } - - /** - * A flow's transition route group serve two purposes: - * * They are responsible for matching the user's first utterances in the - * flow. - * * They are inherited by every page's [transition - * route groups][Page.transition_route_groups]. Transition route groups - * defined in the page have higher priority than those defined in the flow. - * Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/` - * for agent-level groups. - * - * Generated from protobuf field repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitionRouteGroups() - { - return $this->transition_route_groups; - } - - /** - * A flow's transition route group serve two purposes: - * * They are responsible for matching the user's first utterances in the - * flow. - * * They are inherited by every page's [transition - * route groups][Page.transition_route_groups]. Transition route groups - * defined in the page have higher priority than those defined in the flow. - * Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/` - * for agent-level groups. - * - * Generated from protobuf field repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitionRouteGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->transition_route_groups = $arr; - - return $this; - } - - /** - * NLU related settings of the flow. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; - * @return \Google\Cloud\Dialogflow\Cx\V3\NluSettings|null - */ - public function getNluSettings() - { - return $this->nlu_settings; - } - - public function hasNluSettings() - { - return isset($this->nlu_settings); - } - - public function clearNluSettings() - { - unset($this->nlu_settings); - } - - /** - * NLU related settings of the flow. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; - * @param \Google\Cloud\Dialogflow\Cx\V3\NluSettings $var - * @return $this - */ - public function setNluSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\NluSettings::class); - $this->nlu_settings = $var; - - return $this; - } - - /** - * Hierarchical advanced settings for this flow. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 14; - * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null - */ - public function getAdvancedSettings() - { - return $this->advanced_settings; - } - - public function hasAdvancedSettings() - { - return isset($this->advanced_settings); - } - - public function clearAdvancedSettings() - { - unset($this->advanced_settings); - } - - /** - * Hierarchical advanced settings for this flow. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 14; - * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var - * @return $this - */ - public function setAdvancedSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); - $this->advanced_settings = $var; - - return $this; - } - - /** - * Optional. Knowledge connector configuration. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings|null - */ - public function getKnowledgeConnectorSettings() - { - return $this->knowledge_connector_settings; - } - - public function hasKnowledgeConnectorSettings() - { - return isset($this->knowledge_connector_settings); - } - - public function clearKnowledgeConnectorSettings() - { - unset($this->knowledge_connector_settings); - } - - /** - * Optional. Knowledge connector configuration. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings $var - * @return $this - */ - public function setKnowledgeConnectorSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings::class); - $this->knowledge_connector_settings = $var; - - return $this; - } - - /** - * Optional. Defined structured input parameters for this flow. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputParameterDefinitions() - { - return $this->input_parameter_definitions; - } - - /** - * Optional. Defined structured input parameters for this flow. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputParameterDefinitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::class); - $this->input_parameter_definitions = $arr; - - return $this; - } - - /** - * Optional. Defined structured output parameters for this flow. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOutputParameterDefinitions() - { - return $this->output_parameter_definitions; - } - - /** - * Optional. Defined structured output parameters for this flow. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOutputParameterDefinitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ParameterDefinition::class); - $this->output_parameter_definitions = $arr; - - return $this; - } - - /** - * Optional. Multi-lingual agent settings for this flow. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Flow\MultiLanguageSettings|null - */ - public function getMultiLanguageSettings() - { - return $this->multi_language_settings; - } - - public function hasMultiLanguageSettings() - { - return isset($this->multi_language_settings); - } - - public function clearMultiLanguageSettings() - { - unset($this->multi_language_settings); - } - - /** - * Optional. Multi-lingual agent settings for this flow. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Flow\MultiLanguageSettings $var - * @return $this - */ - public function setMultiLanguageSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Flow\MultiLanguageSettings::class); - $this->multi_language_settings = $var; - - return $this; - } - - /** - * Indicates whether the flow is locked for changes. If the flow is locked, - * modifications to the flow will be rejected. - * - * Generated from protobuf field bool locked = 30; - * @return bool - */ - public function getLocked() - { - return $this->locked; - } - - /** - * Indicates whether the flow is locked for changes. If the flow is locked, - * modifications to the flow will be rejected. - * - * Generated from protobuf field bool locked = 30; - * @param bool $var - * @return $this - */ - public function setLocked($var) - { - GPBUtil::checkBool($var); - $this->locked = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow/MultiLanguageSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow/MultiLanguageSettings.php deleted file mode 100644 index 7ddd34148664..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Flow/MultiLanguageSettings.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings - */ -class MultiLanguageSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Enable multi-language detection for this flow. This can be set - * only if [agent level multi language - * setting][Agent.enable_multi_language_training] is enabled. - * - * Generated from protobuf field bool enable_multi_language_detection = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_multi_language_detection = false; - /** - * Optional. Agent will respond in the detected language if the detected - * language code is in the supported resolved languages for this flow. This - * will be used only if multi-language training is enabled in the - * [agent][google.cloud.dialogflow.cx.v3.Agent.enable_multi_language_training] - * and multi-language detection is enabled in the - * [flow][google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.enable_multi_language_detection]. - * The supported languages must be a subset of the languages supported by - * the agent. - * - * Generated from protobuf field repeated string supported_response_language_codes = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $supported_response_language_codes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_multi_language_detection - * Optional. Enable multi-language detection for this flow. This can be set - * only if [agent level multi language - * setting][Agent.enable_multi_language_training] is enabled. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_response_language_codes - * Optional. Agent will respond in the detected language if the detected - * language code is in the supported resolved languages for this flow. This - * will be used only if multi-language training is enabled in the - * [agent][google.cloud.dialogflow.cx.v3.Agent.enable_multi_language_training] - * and multi-language detection is enabled in the - * [flow][google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.enable_multi_language_detection]. - * The supported languages must be a subset of the languages supported by - * the agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Enable multi-language detection for this flow. This can be set - * only if [agent level multi language - * setting][Agent.enable_multi_language_training] is enabled. - * - * Generated from protobuf field bool enable_multi_language_detection = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableMultiLanguageDetection() - { - return $this->enable_multi_language_detection; - } - - /** - * Optional. Enable multi-language detection for this flow. This can be set - * only if [agent level multi language - * setting][Agent.enable_multi_language_training] is enabled. - * - * Generated from protobuf field bool enable_multi_language_detection = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableMultiLanguageDetection($var) - { - GPBUtil::checkBool($var); - $this->enable_multi_language_detection = $var; - - return $this; - } - - /** - * Optional. Agent will respond in the detected language if the detected - * language code is in the supported resolved languages for this flow. This - * will be used only if multi-language training is enabled in the - * [agent][google.cloud.dialogflow.cx.v3.Agent.enable_multi_language_training] - * and multi-language detection is enabled in the - * [flow][google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.enable_multi_language_detection]. - * The supported languages must be a subset of the languages supported by - * the agent. - * - * Generated from protobuf field repeated string supported_response_language_codes = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedResponseLanguageCodes() - { - return $this->supported_response_language_codes; - } - - /** - * Optional. Agent will respond in the detected language if the detected - * language code is in the supported resolved languages for this flow. This - * will be used only if multi-language training is enabled in the - * [agent][google.cloud.dialogflow.cx.v3.Agent.enable_multi_language_training] - * and multi-language detection is enabled in the - * [flow][google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.enable_multi_language_detection]. - * The supported languages must be a subset of the languages supported by - * the agent. - * - * Generated from protobuf field repeated string supported_response_language_codes = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedResponseLanguageCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->supported_response_language_codes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MultiLanguageSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Flow_MultiLanguageSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowImportStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowImportStrategy.php deleted file mode 100644 index 8967acb7001e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowImportStrategy.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.dialogflow.cx.v3.FlowImportStrategy - */ -class FlowImportStrategy extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Import strategy for resource conflict resolution, applied - * globally throughout the flow. It will be applied for all display name - * conflicts in the imported content. If not specified, 'CREATE_NEW' is - * assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $global_import_strategy = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $global_import_strategy - * Optional. Import strategy for resource conflict resolution, applied - * globally throughout the flow. It will be applied for all display name - * conflicts in the imported content. If not specified, 'CREATE_NEW' is - * assumed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Import strategy for resource conflict resolution, applied - * globally throughout the flow. It will be applied for all display name - * conflicts in the imported content. If not specified, 'CREATE_NEW' is - * assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getGlobalImportStrategy() - { - return $this->global_import_strategy; - } - - /** - * Optional. Import strategy for resource conflict resolution, applied - * globally throughout the flow. It will be applied for all display name - * conflicts in the imported content. If not specified, 'CREATE_NEW' is - * assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportStrategy global_import_strategy = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setGlobalImportStrategy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportStrategy::class); - $this->global_import_strategy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowValidationResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowValidationResult.php deleted file mode 100644 index 63ce87551bc0..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FlowValidationResult.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.dialogflow.cx.v3.FlowValidationResult - */ -class FlowValidationResult extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the flow validation result. - * Format: - * `projects//locations//agents//flows//validationResult`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Contains all validation messages. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; - */ - private $validation_messages; - /** - * Last time the flow was validated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the flow validation result. - * Format: - * `projects//locations//agents//flows//validationResult`. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ValidationMessage>|\Google\Protobuf\Internal\RepeatedField $validation_messages - * Contains all validation messages. - * @type \Google\Protobuf\Timestamp $update_time - * Last time the flow was validated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the flow validation result. - * Format: - * `projects//locations//agents//flows//validationResult`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the flow validation result. - * Format: - * `projects//locations//agents//flows//validationResult`. - * - * 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; - } - - /** - * Contains all validation messages. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidationMessages() - { - return $this->validation_messages; - } - - /** - * Contains all validation messages. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ValidationMessage validation_messages = 2; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ValidationMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidationMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ValidationMessage::class); - $this->validation_messages = $arr; - - return $this; - } - - /** - * Last time the flow was validated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @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); - } - - /** - * Last time the flow was validated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form.php deleted file mode 100644 index a2f44b1d9c2a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.cx.v3.Form - */ -class Form extends \Google\Protobuf\Internal\Message -{ - /** - * Parameters to collect from the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Form.Parameter parameters = 1; - */ - private $parameters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Form\Parameter>|\Google\Protobuf\Internal\RepeatedField $parameters - * Parameters to collect from the user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Parameters to collect from the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Form.Parameter parameters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Parameters to collect from the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Form.Parameter parameters = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Form\Parameter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Form\Parameter::class); - $this->parameters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter.php deleted file mode 100644 index 47ef2c349094..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter.php +++ /dev/null @@ -1,402 +0,0 @@ -google.cloud.dialogflow.cx.v3.Form.Parameter - */ -class Parameter extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The human-readable name of the parameter, unique within the - * form. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Indicates whether the parameter is required. Optional parameters will not - * trigger prompts; however, they are filled if the user specifies them. - * Required parameters must be filled before form filling concludes. - * - * Generated from protobuf field bool required = 2; - */ - protected $required = false; - /** - * Required. The entity type of the parameter. - * Format: - * `projects/-/locations/-/agents/-/entityTypes/` for - * system entity types (for example, - * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or - * `projects//locations//agents//entityTypes/` - * for developer entity types. - * - * Generated from protobuf field string entity_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $entity_type = ''; - /** - * Indicates whether the parameter represents a list of values. - * - * Generated from protobuf field bool is_list = 4; - */ - protected $is_list = false; - /** - * Required. Defines fill behavior for the parameter. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior fill_behavior = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fill_behavior = null; - /** - * The default value of an optional parameter. If the parameter is required, - * the default value will be ignored. - * - * Generated from protobuf field .google.protobuf.Value default_value = 9; - */ - protected $default_value = null; - /** - * Indicates whether the parameter content should be redacted in log. If - * redaction is enabled, the parameter content will be replaced by parameter - * name during logging. - * Note: the parameter content is subject to redaction if either parameter - * level redaction or [entity type level - * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. - * - * Generated from protobuf field bool redact = 11; - */ - protected $redact = false; - /** - * Hierarchical advanced settings for this parameter. The settings exposed - * at the lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 12; - */ - protected $advanced_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Required. The human-readable name of the parameter, unique within the - * form. - * @type bool $required - * Indicates whether the parameter is required. Optional parameters will not - * trigger prompts; however, they are filled if the user specifies them. - * Required parameters must be filled before form filling concludes. - * @type string $entity_type - * Required. The entity type of the parameter. - * Format: - * `projects/-/locations/-/agents/-/entityTypes/` for - * system entity types (for example, - * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or - * `projects//locations//agents//entityTypes/` - * for developer entity types. - * @type bool $is_list - * Indicates whether the parameter represents a list of values. - * @type \Google\Cloud\Dialogflow\Cx\V3\Form\Parameter\FillBehavior $fill_behavior - * Required. Defines fill behavior for the parameter. - * @type \Google\Protobuf\Value $default_value - * The default value of an optional parameter. If the parameter is required, - * the default value will be ignored. - * @type bool $redact - * Indicates whether the parameter content should be redacted in log. If - * redaction is enabled, the parameter content will be replaced by parameter - * name during logging. - * Note: the parameter content is subject to redaction if either parameter - * level redaction or [entity type level - * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. - * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings - * Hierarchical advanced settings for this parameter. The settings exposed - * at the lower level overrides the settings exposed at the higher level. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Required. The human-readable name of the parameter, unique within the - * form. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the parameter, unique within the - * form. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Indicates whether the parameter is required. Optional parameters will not - * trigger prompts; however, they are filled if the user specifies them. - * Required parameters must be filled before form filling concludes. - * - * Generated from protobuf field bool required = 2; - * @return bool - */ - public function getRequired() - { - return $this->required; - } - - /** - * Indicates whether the parameter is required. Optional parameters will not - * trigger prompts; however, they are filled if the user specifies them. - * Required parameters must be filled before form filling concludes. - * - * Generated from protobuf field bool required = 2; - * @param bool $var - * @return $this - */ - public function setRequired($var) - { - GPBUtil::checkBool($var); - $this->required = $var; - - return $this; - } - - /** - * Required. The entity type of the parameter. - * Format: - * `projects/-/locations/-/agents/-/entityTypes/` for - * system entity types (for example, - * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or - * `projects//locations//agents//entityTypes/` - * for developer entity types. - * - * Generated from protobuf field string entity_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getEntityType() - { - return $this->entity_type; - } - - /** - * Required. The entity type of the parameter. - * Format: - * `projects/-/locations/-/agents/-/entityTypes/` for - * system entity types (for example, - * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or - * `projects//locations//agents//entityTypes/` - * for developer entity types. - * - * Generated from protobuf field string entity_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEntityType($var) - { - GPBUtil::checkString($var, True); - $this->entity_type = $var; - - return $this; - } - - /** - * Indicates whether the parameter represents a list of values. - * - * Generated from protobuf field bool is_list = 4; - * @return bool - */ - public function getIsList() - { - return $this->is_list; - } - - /** - * Indicates whether the parameter represents a list of values. - * - * Generated from protobuf field bool is_list = 4; - * @param bool $var - * @return $this - */ - public function setIsList($var) - { - GPBUtil::checkBool($var); - $this->is_list = $var; - - return $this; - } - - /** - * Required. Defines fill behavior for the parameter. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior fill_behavior = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Form\Parameter\FillBehavior|null - */ - public function getFillBehavior() - { - return $this->fill_behavior; - } - - public function hasFillBehavior() - { - return isset($this->fill_behavior); - } - - public function clearFillBehavior() - { - unset($this->fill_behavior); - } - - /** - * Required. Defines fill behavior for the parameter. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior fill_behavior = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Form\Parameter\FillBehavior $var - * @return $this - */ - public function setFillBehavior($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Form\Parameter\FillBehavior::class); - $this->fill_behavior = $var; - - return $this; - } - - /** - * The default value of an optional parameter. If the parameter is required, - * the default value will be ignored. - * - * Generated from protobuf field .google.protobuf.Value default_value = 9; - * @return \Google\Protobuf\Value|null - */ - public function getDefaultValue() - { - return $this->default_value; - } - - public function hasDefaultValue() - { - return isset($this->default_value); - } - - public function clearDefaultValue() - { - unset($this->default_value); - } - - /** - * The default value of an optional parameter. If the parameter is required, - * the default value will be ignored. - * - * Generated from protobuf field .google.protobuf.Value default_value = 9; - * @param \Google\Protobuf\Value $var - * @return $this - */ - public function setDefaultValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); - $this->default_value = $var; - - return $this; - } - - /** - * Indicates whether the parameter content should be redacted in log. If - * redaction is enabled, the parameter content will be replaced by parameter - * name during logging. - * Note: the parameter content is subject to redaction if either parameter - * level redaction or [entity type level - * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. - * - * Generated from protobuf field bool redact = 11; - * @return bool - */ - public function getRedact() - { - return $this->redact; - } - - /** - * Indicates whether the parameter content should be redacted in log. If - * redaction is enabled, the parameter content will be replaced by parameter - * name during logging. - * Note: the parameter content is subject to redaction if either parameter - * level redaction or [entity type level - * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. - * - * Generated from protobuf field bool redact = 11; - * @param bool $var - * @return $this - */ - public function setRedact($var) - { - GPBUtil::checkBool($var); - $this->redact = $var; - - return $this; - } - - /** - * Hierarchical advanced settings for this parameter. The settings exposed - * at the lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 12; - * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null - */ - public function getAdvancedSettings() - { - return $this->advanced_settings; - } - - public function hasAdvancedSettings() - { - return isset($this->advanced_settings); - } - - public function clearAdvancedSettings() - { - unset($this->advanced_settings); - } - - /** - * Hierarchical advanced settings for this parameter. The settings exposed - * at the lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 12; - * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var - * @return $this - */ - public function setAdvancedSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); - $this->advanced_settings = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Parameter::class, \Google\Cloud\Dialogflow\Cx\V3\Form_Parameter::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter/FillBehavior.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter/FillBehavior.php deleted file mode 100644 index 25908b3d5388..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Form/Parameter/FillBehavior.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - */ -class FillBehavior extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fulfillment to provide the initial prompt that the agent - * can present to the user in order to fill the parameter. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment initial_prompt_fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $initial_prompt_fulfillment = null; - /** - * The handlers for parameter-level events, used to provide reprompt for - * the parameter or transition to a different page/flow. The supported - * events are: - * * `sys.no-match-`, where N can be from 1 to 6 - * * `sys.no-match-default` - * * `sys.no-input-`, where N can be from 1 to 6 - * * `sys.no-input-default` - * * `sys.invalid-parameter` - * `initial_prompt_fulfillment` provides the first prompt for the - * parameter. - * If the user's response does not fill the parameter, a - * no-match/no-input event will be triggered, and the fulfillment - * associated with the `sys.no-match-1`/`sys.no-input-1` handler (if - * defined) will be called to provide a prompt. The - * `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to - * the next no-match/no-input event, and so on. - * A `sys.no-match-default` or `sys.no-input-default` handler will be used - * to handle all following no-match/no-input events after all numbered - * no-match/no-input handlers for the parameter are consumed. - * A `sys.invalid-parameter` handler can be defined to handle the case - * where the parameter values have been `invalidated` by webhook. For - * example, if the user's response fill the parameter, however the - * parameter was invalidated by webhook, the fulfillment associated with - * the `sys.invalid-parameter` handler (if defined) will be called to - * provide a prompt. - * If the event handler for the corresponding event can't be found on the - * parameter, `initial_prompt_fulfillment` will be re-prompted. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler reprompt_event_handlers = 5; - */ - private $reprompt_event_handlers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $initial_prompt_fulfillment - * Required. The fulfillment to provide the initial prompt that the agent - * can present to the user in order to fill the parameter. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $reprompt_event_handlers - * The handlers for parameter-level events, used to provide reprompt for - * the parameter or transition to a different page/flow. The supported - * events are: - * * `sys.no-match-`, where N can be from 1 to 6 - * * `sys.no-match-default` - * * `sys.no-input-`, where N can be from 1 to 6 - * * `sys.no-input-default` - * * `sys.invalid-parameter` - * `initial_prompt_fulfillment` provides the first prompt for the - * parameter. - * If the user's response does not fill the parameter, a - * no-match/no-input event will be triggered, and the fulfillment - * associated with the `sys.no-match-1`/`sys.no-input-1` handler (if - * defined) will be called to provide a prompt. The - * `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to - * the next no-match/no-input event, and so on. - * A `sys.no-match-default` or `sys.no-input-default` handler will be used - * to handle all following no-match/no-input events after all numbered - * no-match/no-input handlers for the parameter are consumed. - * A `sys.invalid-parameter` handler can be defined to handle the case - * where the parameter values have been `invalidated` by webhook. For - * example, if the user's response fill the parameter, however the - * parameter was invalidated by webhook, the fulfillment associated with - * the `sys.invalid-parameter` handler (if defined) will be called to - * provide a prompt. - * If the event handler for the corresponding event can't be found on the - * parameter, `initial_prompt_fulfillment` will be re-prompted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fulfillment to provide the initial prompt that the agent - * can present to the user in order to fill the parameter. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment initial_prompt_fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment|null - */ - public function getInitialPromptFulfillment() - { - return $this->initial_prompt_fulfillment; - } - - public function hasInitialPromptFulfillment() - { - return isset($this->initial_prompt_fulfillment); - } - - public function clearInitialPromptFulfillment() - { - unset($this->initial_prompt_fulfillment); - } - - /** - * Required. The fulfillment to provide the initial prompt that the agent - * can present to the user in order to fill the parameter. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment initial_prompt_fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var - * @return $this - */ - public function setInitialPromptFulfillment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); - $this->initial_prompt_fulfillment = $var; - - return $this; - } - - /** - * The handlers for parameter-level events, used to provide reprompt for - * the parameter or transition to a different page/flow. The supported - * events are: - * * `sys.no-match-`, where N can be from 1 to 6 - * * `sys.no-match-default` - * * `sys.no-input-`, where N can be from 1 to 6 - * * `sys.no-input-default` - * * `sys.invalid-parameter` - * `initial_prompt_fulfillment` provides the first prompt for the - * parameter. - * If the user's response does not fill the parameter, a - * no-match/no-input event will be triggered, and the fulfillment - * associated with the `sys.no-match-1`/`sys.no-input-1` handler (if - * defined) will be called to provide a prompt. The - * `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to - * the next no-match/no-input event, and so on. - * A `sys.no-match-default` or `sys.no-input-default` handler will be used - * to handle all following no-match/no-input events after all numbered - * no-match/no-input handlers for the parameter are consumed. - * A `sys.invalid-parameter` handler can be defined to handle the case - * where the parameter values have been `invalidated` by webhook. For - * example, if the user's response fill the parameter, however the - * parameter was invalidated by webhook, the fulfillment associated with - * the `sys.invalid-parameter` handler (if defined) will be called to - * provide a prompt. - * If the event handler for the corresponding event can't be found on the - * parameter, `initial_prompt_fulfillment` will be re-prompted. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler reprompt_event_handlers = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRepromptEventHandlers() - { - return $this->reprompt_event_handlers; - } - - /** - * The handlers for parameter-level events, used to provide reprompt for - * the parameter or transition to a different page/flow. The supported - * events are: - * * `sys.no-match-`, where N can be from 1 to 6 - * * `sys.no-match-default` - * * `sys.no-input-`, where N can be from 1 to 6 - * * `sys.no-input-default` - * * `sys.invalid-parameter` - * `initial_prompt_fulfillment` provides the first prompt for the - * parameter. - * If the user's response does not fill the parameter, a - * no-match/no-input event will be triggered, and the fulfillment - * associated with the `sys.no-match-1`/`sys.no-input-1` handler (if - * defined) will be called to provide a prompt. The - * `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to - * the next no-match/no-input event, and so on. - * A `sys.no-match-default` or `sys.no-input-default` handler will be used - * to handle all following no-match/no-input events after all numbered - * no-match/no-input handlers for the parameter are consumed. - * A `sys.invalid-parameter` handler can be defined to handle the case - * where the parameter values have been `invalidated` by webhook. For - * example, if the user's response fill the parameter, however the - * parameter was invalidated by webhook, the fulfillment associated with - * the `sys.invalid-parameter` handler (if defined) will be called to - * provide a prompt. - * If the event handler for the corresponding event can't be found on the - * parameter, `initial_prompt_fulfillment` will be re-prompted. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler reprompt_event_handlers = 5; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRepromptEventHandlers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\EventHandler::class); - $this->reprompt_event_handlers = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FillBehavior::class, \Google\Cloud\Dialogflow\Cx\V3\Form_Parameter_FillBehavior::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentRequest.php deleted file mode 100644 index c6f30da68ac9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.dialogflow.cx.v3.FulfillIntentRequest - */ -class FulfillIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Must be same as the corresponding MatchIntent request, otherwise the - * behavior is undefined. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.MatchIntentRequest match_intent_request = 1; - */ - protected $match_intent_request = null; - /** - * The matched intent/event to fulfill. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 2; - */ - protected $match = null; - /** - * Instructs the speech synthesizer how to generate output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 3; - */ - protected $output_audio_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\MatchIntentRequest $match_intent_request - * Must be same as the corresponding MatchIntent request, otherwise the - * behavior is undefined. - * @type \Google\Cloud\Dialogflow\Cx\V3\PBMatch $match - * The matched intent/event to fulfill. - * @type \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $output_audio_config - * Instructs the speech synthesizer how to generate output audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Must be same as the corresponding MatchIntent request, otherwise the - * behavior is undefined. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.MatchIntentRequest match_intent_request = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\MatchIntentRequest|null - */ - public function getMatchIntentRequest() - { - return $this->match_intent_request; - } - - public function hasMatchIntentRequest() - { - return isset($this->match_intent_request); - } - - public function clearMatchIntentRequest() - { - unset($this->match_intent_request); - } - - /** - * Must be same as the corresponding MatchIntent request, otherwise the - * behavior is undefined. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.MatchIntentRequest match_intent_request = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\MatchIntentRequest $var - * @return $this - */ - public function setMatchIntentRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\MatchIntentRequest::class); - $this->match_intent_request = $var; - - return $this; - } - - /** - * The matched intent/event to fulfill. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\PBMatch|null - */ - public function getMatch() - { - return $this->match; - } - - public function hasMatch() - { - return isset($this->match); - } - - public function clearMatch() - { - unset($this->match); - } - - /** - * The matched intent/event to fulfill. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\PBMatch $var - * @return $this - */ - public function setMatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PBMatch::class); - $this->match = $var; - - return $this; - } - - /** - * Instructs the speech synthesizer how to generate output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\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 output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $var - * @return $this - */ - public function setOutputAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig::class); - $this->output_audio_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentResponse.php deleted file mode 100644 index 9840a9a3b515..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/FulfillIntentResponse.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.dialogflow.cx.v3.FulfillIntentResponse - */ -class FulfillIntentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. 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 the conversational query. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; - */ - protected $query_result = 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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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 = 3; - */ - protected $output_audio = ''; - /** - * The config used by the speech synthesizer to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; - */ - protected $output_audio_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $response_id - * Output only. 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\Cx\V3\QueryResult $query_result - * The result of the conversational query. - * @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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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\Cx\V3\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\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Output only. 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; - } - - /** - * Output only. 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 the conversational query. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\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. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryResult query_result = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\QueryResult $var - * @return $this - */ - public function setQueryResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryResult::class); - $this->query_result = $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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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 = 3; - * @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.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_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 = 3; - * @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.cx.v3.OutputAudioConfig output_audio_config = 4; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.OutputAudioConfig output_audio_config = 4; - * @param \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $var - * @return $this - */ - public function setOutputAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig::class); - $this->output_audio_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php deleted file mode 100644 index 3b4e807f161c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment.php +++ /dev/null @@ -1,445 +0,0 @@ -google.cloud.dialogflow.cx.v3.Fulfillment - */ -class Fulfillment extends \Google\Protobuf\Internal\Message -{ - /** - * The list of rich message responses to present to the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; - */ - private $messages; - /** - * The webhook to call. - * Format: - * `projects//locations//agents//webhooks/`. - * - * Generated from protobuf field string webhook = 2 [(.google.api.resource_reference) = { - */ - protected $webhook = ''; - /** - * Whether Dialogflow should return currently queued fulfillment response - * messages in streaming APIs. If a webhook is specified, it happens before - * Dialogflow invokes webhook. - * Warning: - * 1) This flag only affects streaming API. Responses are still queued - * and returned once in non-streaming API. - * 2) The flag can be enabled in any fulfillment but only the first 3 partial - * responses will be returned. You may only want to apply it to fulfillments - * that have slow webhooks. - * - * Generated from protobuf field bool return_partial_responses = 8; - */ - protected $return_partial_responses = false; - /** - * The value of this field will be populated in the - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] - * `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is - * called. - * The tag is typically used by the webhook service to identify which - * fulfillment is being called, but it could be used for other purposes. - * This field is required if `webhook` is specified. - * - * Generated from protobuf field string tag = 3; - */ - protected $tag = ''; - /** - * Set parameter values before executing the webhook. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4; - */ - private $set_parameter_actions; - /** - * Conditional cases for this fulfillment. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5; - */ - private $conditional_cases; - /** - * Hierarchical advanced settings for this fulfillment. The settings exposed - * at the lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 7; - */ - protected $advanced_settings = null; - /** - * If the flag is true, the agent will utilize LLM to generate a text - * response. If LLM generation fails, the defined - * [responses][google.cloud.dialogflow.cx.v3.Fulfillment.messages] in the - * fulfillment will be respected. This flag is only useful for fulfillments - * associated with no-match event handlers. - * - * Generated from protobuf field bool enable_generative_fallback = 12; - */ - protected $enable_generative_fallback = false; - /** - * A list of Generators to be called during this fulfillment. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings generators = 13; - */ - private $generators; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $messages - * The list of rich message responses to present to the user. - * @type string $webhook - * The webhook to call. - * Format: - * `projects//locations//agents//webhooks/`. - * @type bool $return_partial_responses - * Whether Dialogflow should return currently queued fulfillment response - * messages in streaming APIs. If a webhook is specified, it happens before - * Dialogflow invokes webhook. - * Warning: - * 1) This flag only affects streaming API. Responses are still queued - * and returned once in non-streaming API. - * 2) The flag can be enabled in any fulfillment but only the first 3 partial - * responses will be returned. You may only want to apply it to fulfillments - * that have slow webhooks. - * @type string $tag - * The value of this field will be populated in the - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] - * `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is - * called. - * The tag is typically used by the webhook service to identify which - * fulfillment is being called, but it could be used for other purposes. - * This field is required if `webhook` is specified. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\SetParameterAction>|\Google\Protobuf\Internal\RepeatedField $set_parameter_actions - * Set parameter values before executing the webhook. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases>|\Google\Protobuf\Internal\RepeatedField $conditional_cases - * Conditional cases for this fulfillment. - * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings - * Hierarchical advanced settings for this fulfillment. The settings exposed - * at the lower level overrides the settings exposed at the higher level. - * @type bool $enable_generative_fallback - * If the flag is true, the agent will utilize LLM to generate a text - * response. If LLM generation fails, the defined - * [responses][google.cloud.dialogflow.cx.v3.Fulfillment.messages] in the - * fulfillment will be respected. This flag is only useful for fulfillments - * associated with no-match event handlers. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\GeneratorSettings>|\Google\Protobuf\Internal\RepeatedField $generators - * A list of Generators to be called during this fulfillment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * The list of rich message responses to present to the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessages() - { - return $this->messages; - } - - /** - * The list of rich message responses to present to the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::class); - $this->messages = $arr; - - return $this; - } - - /** - * The webhook to call. - * Format: - * `projects//locations//agents//webhooks/`. - * - * Generated from protobuf field string webhook = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getWebhook() - { - return $this->webhook; - } - - /** - * The webhook to call. - * Format: - * `projects//locations//agents//webhooks/`. - * - * Generated from protobuf field string webhook = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWebhook($var) - { - GPBUtil::checkString($var, True); - $this->webhook = $var; - - return $this; - } - - /** - * Whether Dialogflow should return currently queued fulfillment response - * messages in streaming APIs. If a webhook is specified, it happens before - * Dialogflow invokes webhook. - * Warning: - * 1) This flag only affects streaming API. Responses are still queued - * and returned once in non-streaming API. - * 2) The flag can be enabled in any fulfillment but only the first 3 partial - * responses will be returned. You may only want to apply it to fulfillments - * that have slow webhooks. - * - * Generated from protobuf field bool return_partial_responses = 8; - * @return bool - */ - public function getReturnPartialResponses() - { - return $this->return_partial_responses; - } - - /** - * Whether Dialogflow should return currently queued fulfillment response - * messages in streaming APIs. If a webhook is specified, it happens before - * Dialogflow invokes webhook. - * Warning: - * 1) This flag only affects streaming API. Responses are still queued - * and returned once in non-streaming API. - * 2) The flag can be enabled in any fulfillment but only the first 3 partial - * responses will be returned. You may only want to apply it to fulfillments - * that have slow webhooks. - * - * Generated from protobuf field bool return_partial_responses = 8; - * @param bool $var - * @return $this - */ - public function setReturnPartialResponses($var) - { - GPBUtil::checkBool($var); - $this->return_partial_responses = $var; - - return $this; - } - - /** - * The value of this field will be populated in the - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] - * `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is - * called. - * The tag is typically used by the webhook service to identify which - * fulfillment is being called, but it could be used for other purposes. - * This field is required if `webhook` is specified. - * - * Generated from protobuf field string tag = 3; - * @return string - */ - public function getTag() - { - return $this->tag; - } - - /** - * The value of this field will be populated in the - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] - * `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is - * called. - * The tag is typically used by the webhook service to identify which - * fulfillment is being called, but it could be used for other purposes. - * This field is required if `webhook` is specified. - * - * Generated from protobuf field string tag = 3; - * @param string $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkString($var, True); - $this->tag = $var; - - return $this; - } - - /** - * Set parameter values before executing the webhook. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSetParameterActions() - { - return $this->set_parameter_actions; - } - - /** - * Set parameter values before executing the webhook. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction set_parameter_actions = 4; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\SetParameterAction>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSetParameterActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\SetParameterAction::class); - $this->set_parameter_actions = $arr; - - return $this; - } - - /** - * Conditional cases for this fulfillment. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditionalCases() - { - return $this->conditional_cases; - } - - /** - * Conditional cases for this fulfillment. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases conditional_cases = 5; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditionalCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases::class); - $this->conditional_cases = $arr; - - return $this; - } - - /** - * Hierarchical advanced settings for this fulfillment. The settings exposed - * at the lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 7; - * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null - */ - public function getAdvancedSettings() - { - return $this->advanced_settings; - } - - public function hasAdvancedSettings() - { - return isset($this->advanced_settings); - } - - public function clearAdvancedSettings() - { - unset($this->advanced_settings); - } - - /** - * Hierarchical advanced settings for this fulfillment. The settings exposed - * at the lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 7; - * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var - * @return $this - */ - public function setAdvancedSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); - $this->advanced_settings = $var; - - return $this; - } - - /** - * If the flag is true, the agent will utilize LLM to generate a text - * response. If LLM generation fails, the defined - * [responses][google.cloud.dialogflow.cx.v3.Fulfillment.messages] in the - * fulfillment will be respected. This flag is only useful for fulfillments - * associated with no-match event handlers. - * - * Generated from protobuf field bool enable_generative_fallback = 12; - * @return bool - */ - public function getEnableGenerativeFallback() - { - return $this->enable_generative_fallback; - } - - /** - * If the flag is true, the agent will utilize LLM to generate a text - * response. If LLM generation fails, the defined - * [responses][google.cloud.dialogflow.cx.v3.Fulfillment.messages] in the - * fulfillment will be respected. This flag is only useful for fulfillments - * associated with no-match event handlers. - * - * Generated from protobuf field bool enable_generative_fallback = 12; - * @param bool $var - * @return $this - */ - public function setEnableGenerativeFallback($var) - { - GPBUtil::checkBool($var); - $this->enable_generative_fallback = $var; - - return $this; - } - - /** - * A list of Generators to be called during this fulfillment. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings generators = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGenerators() - { - return $this->generators; - } - - /** - * A list of Generators to be called during this fulfillment. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings generators = 13; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\GeneratorSettings>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGenerators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\GeneratorSettings::class); - $this->generators = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases.php deleted file mode 100644 index b0086c08edd4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - */ -class ConditionalCases extends \Google\Protobuf\Internal\Message -{ - /** - * A list of cascading if-else conditions. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case cases = 1; - */ - private $cases; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase>|\Google\Protobuf\Internal\RepeatedField $cases - * A list of cascading if-else conditions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * A list of cascading if-else conditions. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case cases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCases() - { - return $this->cases; - } - - /** - * A list of cascading if-else conditions. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case cases = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase::class); - $this->cases = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConditionalCases::class, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment_ConditionalCases::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase.php deleted file mode 100644 index f856088de549..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - */ -class PBCase extends \Google\Protobuf\Internal\Message -{ - /** - * The condition to activate and select this case. Empty means the - * condition is always true. The condition is evaluated against [form - * parameters][Form.parameters] or [session - * parameters][SessionInfo.parameters]. - * See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string condition = 1; - */ - protected $condition = ''; - /** - * A list of case content. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent case_content = 2; - */ - private $case_content; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $condition - * The condition to activate and select this case. Empty means the - * condition is always true. The condition is evaluated against [form - * parameters][Form.parameters] or [session - * parameters][SessionInfo.parameters]. - * See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase\CaseContent>|\Google\Protobuf\Internal\RepeatedField $case_content - * A list of case content. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * The condition to activate and select this case. Empty means the - * condition is always true. The condition is evaluated against [form - * parameters][Form.parameters] or [session - * parameters][SessionInfo.parameters]. - * See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string condition = 1; - * @return string - */ - public function getCondition() - { - return $this->condition; - } - - /** - * The condition to activate and select this case. Empty means the - * condition is always true. The condition is evaluated against [form - * parameters][Form.parameters] or [session - * parameters][SessionInfo.parameters]. - * See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string condition = 1; - * @param string $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkString($var, True); - $this->condition = $var; - - return $this; - } - - /** - * A list of case content. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent case_content = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCaseContent() - { - return $this->case_content; - } - - /** - * A list of case content. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent case_content = 2; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase\CaseContent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCaseContent($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases\PBCase\CaseContent::class); - $this->case_content = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBCase::class, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment_ConditionalCases_Case::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase/CaseContent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase/CaseContent.php deleted file mode 100644 index 593cb50927b1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/ConditionalCases/PBCase/CaseContent.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - */ -class CaseContent extends \Google\Protobuf\Internal\Message -{ - protected $cases_or_message; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage $message - * Returned message. - * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases $additional_cases - * Additional cases to be evaluated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * Returned message. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage message = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage|null - */ - public function getMessage() - { - return $this->readOneof(1); - } - - public function hasMessage() - { - return $this->hasOneof(1); - } - - /** - * Returned message. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage message = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Additional cases to be evaluated. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases additional_cases = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases|null - */ - public function getAdditionalCases() - { - return $this->readOneof(2); - } - - public function hasAdditionalCases() - { - return $this->hasOneof(2); - } - - /** - * Additional cases to be evaluated. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases additional_cases = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases $var - * @return $this - */ - public function setAdditionalCases($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getCasesOrMessage() - { - return $this->whichOneof("cases_or_message"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CaseContent::class, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment_ConditionalCases_Case_CaseContent::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/GeneratorSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/GeneratorSettings.php deleted file mode 100644 index 2f7f66ba85d3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/GeneratorSettings.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings - */ -class GeneratorSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The generator to call. - * Format: - * `projects//locations//agents//generators/`. - * - * Generated from protobuf field string generator = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $generator = ''; - /** - * Map from [placeholder parameter][Generator.Parameter.id] in the - * [Generator][google.cloud.dialogflow.cx.v3.Generator] to corresponding - * session parameters. By default, Dialogflow uses the session parameter - * with the same name to fill in the generator template. e.g. If there is a - * placeholder parameter `city` in the Generator, Dialogflow default to fill - * in the `$city` with - * `$session.params.city`. However, you may choose to fill `$city` with - * `$session.params.desination-city`. - * - Map key: [parameter ID][Genrator.Parameter.id] - * - Map value: session parameter name - * - * Generated from protobuf field map input_parameters = 2; - */ - private $input_parameters; - /** - * Required. Output parameter which should contain the generator response. - * - * Generated from protobuf field string output_parameter = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_parameter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $generator - * Required. The generator to call. - * Format: - * `projects//locations//agents//generators/`. - * @type array|\Google\Protobuf\Internal\MapField $input_parameters - * Map from [placeholder parameter][Generator.Parameter.id] in the - * [Generator][google.cloud.dialogflow.cx.v3.Generator] to corresponding - * session parameters. By default, Dialogflow uses the session parameter - * with the same name to fill in the generator template. e.g. If there is a - * placeholder parameter `city` in the Generator, Dialogflow default to fill - * in the `$city` with - * `$session.params.city`. However, you may choose to fill `$city` with - * `$session.params.desination-city`. - * - Map key: [parameter ID][Genrator.Parameter.id] - * - Map value: session parameter name - * @type string $output_parameter - * Required. Output parameter which should contain the generator response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The generator to call. - * Format: - * `projects//locations//agents//generators/`. - * - * Generated from protobuf field string generator = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGenerator() - { - return $this->generator; - } - - /** - * Required. The generator to call. - * Format: - * `projects//locations//agents//generators/`. - * - * Generated from protobuf field string generator = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGenerator($var) - { - GPBUtil::checkString($var, True); - $this->generator = $var; - - return $this; - } - - /** - * Map from [placeholder parameter][Generator.Parameter.id] in the - * [Generator][google.cloud.dialogflow.cx.v3.Generator] to corresponding - * session parameters. By default, Dialogflow uses the session parameter - * with the same name to fill in the generator template. e.g. If there is a - * placeholder parameter `city` in the Generator, Dialogflow default to fill - * in the `$city` with - * `$session.params.city`. However, you may choose to fill `$city` with - * `$session.params.desination-city`. - * - Map key: [parameter ID][Genrator.Parameter.id] - * - Map value: session parameter name - * - * Generated from protobuf field map input_parameters = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getInputParameters() - { - return $this->input_parameters; - } - - /** - * Map from [placeholder parameter][Generator.Parameter.id] in the - * [Generator][google.cloud.dialogflow.cx.v3.Generator] to corresponding - * session parameters. By default, Dialogflow uses the session parameter - * with the same name to fill in the generator template. e.g. If there is a - * placeholder parameter `city` in the Generator, Dialogflow default to fill - * in the `$city` with - * `$session.params.city`. However, you may choose to fill `$city` with - * `$session.params.desination-city`. - * - Map key: [parameter ID][Genrator.Parameter.id] - * - Map value: session parameter name - * - * Generated from protobuf field map input_parameters = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setInputParameters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->input_parameters = $arr; - - return $this; - } - - /** - * Required. Output parameter which should contain the generator response. - * - * Generated from protobuf field string output_parameter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOutputParameter() - { - return $this->output_parameter; - } - - /** - * Required. Output parameter which should contain the generator response. - * - * Generated from protobuf field string output_parameter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOutputParameter($var) - { - GPBUtil::checkString($var, True); - $this->output_parameter = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GeneratorSettings::class, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment_GeneratorSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/SetParameterAction.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/SetParameterAction.php deleted file mode 100644 index 4d41e2c153a3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Fulfillment/SetParameterAction.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - */ -class SetParameterAction extends \Google\Protobuf\Internal\Message -{ - /** - * Display name of the parameter. - * - * Generated from protobuf field string parameter = 1; - */ - protected $parameter = ''; - /** - * The new value of the parameter. A null value clears the parameter. - * - * Generated from protobuf field .google.protobuf.Value value = 2; - */ - protected $value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parameter - * Display name of the parameter. - * @type \Google\Protobuf\Value $value - * The new value of the parameter. A null value clears the parameter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Fulfillment::initOnce(); - parent::__construct($data); - } - - /** - * Display name of the parameter. - * - * Generated from protobuf field string parameter = 1; - * @return string - */ - public function getParameter() - { - return $this->parameter; - } - - /** - * Display name of the parameter. - * - * Generated from protobuf field string parameter = 1; - * @param string $var - * @return $this - */ - public function setParameter($var) - { - GPBUtil::checkString($var, True); - $this->parameter = $var; - - return $this; - } - - /** - * The new value of the parameter. A null value clears the parameter. - * - * Generated from protobuf field .google.protobuf.Value value = 2; - * @return \Google\Protobuf\Value|null - */ - public function getValue() - { - return $this->value; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * The new value of the parameter. A null value clears the parameter. - * - * Generated from protobuf field .google.protobuf.Value value = 2; - * @param \Google\Protobuf\Value $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SetParameterAction::class, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment_SetParameterAction::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GcsDestination.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GcsDestination.php deleted file mode 100644 index b69c376b01ac..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GcsDestination.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.cx.v3.GcsDestination - */ -class GcsDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Google Cloud Storage URI for the exported objects. A URI is - * of the form: `gs://bucket/object-name-or-prefix` Whether a full object - * name, or just a prefix, its usage depends on the Dialogflow operation. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. The Google Cloud Storage URI for the exported objects. A URI is - * of the form: `gs://bucket/object-name-or-prefix` Whether a full object - * name, or just a prefix, its usage depends on the Dialogflow operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Gcs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Google Cloud Storage URI for the exported objects. A URI is - * of the form: `gs://bucket/object-name-or-prefix` Whether a full object - * name, or just a prefix, its usage depends on the Dialogflow operation. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. The Google Cloud Storage URI for the exported objects. A URI is - * of the form: `gs://bucket/object-name-or-prefix` Whether a full object - * name, or just a prefix, its usage depends on the Dialogflow operation. - * - * 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php deleted file mode 100644 index 6d92099d4244..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings.php +++ /dev/null @@ -1,281 +0,0 @@ -google.cloud.dialogflow.cx.v3.GenerativeSettings - */ -class GenerativeSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Format: - * `projects//locations//agents//generativeSettings`. - * - * Generated from protobuf field string name = 5; - */ - protected $name = ''; - /** - * Settings for Generative Fallback. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; - */ - protected $fallback_settings = null; - /** - * Settings for Generative Safety. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; - */ - protected $generative_safety_settings = null; - /** - * Settings for knowledge connector. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; - */ - protected $knowledge_connector_settings = null; - /** - * Language for this settings. - * - * Generated from protobuf field string language_code = 4; - */ - protected $language_code = ''; - /** - * LLM model settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; - */ - protected $llm_model_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Format: - * `projects//locations//agents//generativeSettings`. - * @type \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings $fallback_settings - * Settings for Generative Fallback. - * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings $generative_safety_settings - * Settings for Generative Safety. - * @type \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\KnowledgeConnectorSettings $knowledge_connector_settings - * Settings for knowledge connector. - * @type string $language_code - * Language for this settings. - * @type \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $llm_model_settings - * LLM model settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::initOnce(); - parent::__construct($data); - } - - /** - * Format: - * `projects//locations//agents//generativeSettings`. - * - * Generated from protobuf field string name = 5; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Format: - * `projects//locations//agents//generativeSettings`. - * - * Generated from protobuf field string name = 5; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Settings for Generative Fallback. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings|null - */ - public function getFallbackSettings() - { - return $this->fallback_settings; - } - - public function hasFallbackSettings() - { - return isset($this->fallback_settings); - } - - public function clearFallbackSettings() - { - unset($this->fallback_settings); - } - - /** - * Settings for Generative Fallback. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings $var - * @return $this - */ - public function setFallbackSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings::class); - $this->fallback_settings = $var; - - return $this; - } - - /** - * Settings for Generative Safety. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings|null - */ - public function getGenerativeSafetySettings() - { - return $this->generative_safety_settings; - } - - public function hasGenerativeSafetySettings() - { - return isset($this->generative_safety_settings); - } - - public function clearGenerativeSafetySettings() - { - unset($this->generative_safety_settings); - } - - /** - * Settings for Generative Safety. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings $var - * @return $this - */ - public function setGenerativeSafetySettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings::class); - $this->generative_safety_settings = $var; - - return $this; - } - - /** - * Settings for knowledge connector. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; - * @return \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\KnowledgeConnectorSettings|null - */ - public function getKnowledgeConnectorSettings() - { - return $this->knowledge_connector_settings; - } - - public function hasKnowledgeConnectorSettings() - { - return isset($this->knowledge_connector_settings); - } - - public function clearKnowledgeConnectorSettings() - { - unset($this->knowledge_connector_settings); - } - - /** - * Settings for knowledge connector. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7; - * @param \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\KnowledgeConnectorSettings $var - * @return $this - */ - public function setKnowledgeConnectorSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\KnowledgeConnectorSettings::class); - $this->knowledge_connector_settings = $var; - - return $this; - } - - /** - * Language for this settings. - * - * Generated from protobuf field string language_code = 4; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Language for this settings. - * - * 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; - } - - /** - * LLM model settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; - * @return \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings|null - */ - public function getLlmModelSettings() - { - return $this->llm_model_settings; - } - - public function hasLlmModelSettings() - { - return isset($this->llm_model_settings); - } - - public function clearLlmModelSettings() - { - unset($this->llm_model_settings); - } - - /** - * LLM model settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; - * @param \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $var - * @return $this - */ - public function setLlmModelSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings::class); - $this->llm_model_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings.php deleted file mode 100644 index c63b3365fbd6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings - */ -class FallbackSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Display name of the selected prompt. - * - * Generated from protobuf field string selected_prompt = 3; - */ - protected $selected_prompt = ''; - /** - * Stored prompts that can be selected, for example default templates like - * "conservative" or "chatty", or user defined ones. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; - */ - private $prompt_templates; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $selected_prompt - * Display name of the selected prompt. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings\PromptTemplate>|\Google\Protobuf\Internal\RepeatedField $prompt_templates - * Stored prompts that can be selected, for example default templates like - * "conservative" or "chatty", or user defined ones. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::initOnce(); - parent::__construct($data); - } - - /** - * Display name of the selected prompt. - * - * Generated from protobuf field string selected_prompt = 3; - * @return string - */ - public function getSelectedPrompt() - { - return $this->selected_prompt; - } - - /** - * Display name of the selected prompt. - * - * Generated from protobuf field string selected_prompt = 3; - * @param string $var - * @return $this - */ - public function setSelectedPrompt($var) - { - GPBUtil::checkString($var, True); - $this->selected_prompt = $var; - - return $this; - } - - /** - * Stored prompts that can be selected, for example default templates like - * "conservative" or "chatty", or user defined ones. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPromptTemplates() - { - return $this->prompt_templates; - } - - /** - * Stored prompts that can be selected, for example default templates like - * "conservative" or "chatty", or user defined ones. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings\PromptTemplate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPromptTemplates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings\FallbackSettings\PromptTemplate::class); - $this->prompt_templates = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FallbackSettings::class, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings_FallbackSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings/PromptTemplate.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings/PromptTemplate.php deleted file mode 100644 index ecda9e522486..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/FallbackSettings/PromptTemplate.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - */ -class PromptTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Prompt name. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * Prompt text that is sent to a LLM on no-match default, placeholders are - * filled downstream. For example: "Here is a conversation $conversation, - * a response is: " - * - * Generated from protobuf field string prompt_text = 2; - */ - protected $prompt_text = ''; - /** - * If the flag is true, the prompt is frozen and cannot be modified by - * users. - * - * Generated from protobuf field bool frozen = 3; - */ - protected $frozen = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Prompt name. - * @type string $prompt_text - * Prompt text that is sent to a LLM on no-match default, placeholders are - * filled downstream. For example: "Here is a conversation $conversation, - * a response is: " - * @type bool $frozen - * If the flag is true, the prompt is frozen and cannot be modified by - * users. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::initOnce(); - parent::__construct($data); - } - - /** - * Prompt name. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Prompt name. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Prompt text that is sent to a LLM on no-match default, placeholders are - * filled downstream. For example: "Here is a conversation $conversation, - * a response is: " - * - * Generated from protobuf field string prompt_text = 2; - * @return string - */ - public function getPromptText() - { - return $this->prompt_text; - } - - /** - * Prompt text that is sent to a LLM on no-match default, placeholders are - * filled downstream. For example: "Here is a conversation $conversation, - * a response is: " - * - * Generated from protobuf field string prompt_text = 2; - * @param string $var - * @return $this - */ - public function setPromptText($var) - { - GPBUtil::checkString($var, True); - $this->prompt_text = $var; - - return $this; - } - - /** - * If the flag is true, the prompt is frozen and cannot be modified by - * users. - * - * Generated from protobuf field bool frozen = 3; - * @return bool - */ - public function getFrozen() - { - return $this->frozen; - } - - /** - * If the flag is true, the prompt is frozen and cannot be modified by - * users. - * - * Generated from protobuf field bool frozen = 3; - * @param bool $var - * @return $this - */ - public function setFrozen($var) - { - GPBUtil::checkBool($var); - $this->frozen = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PromptTemplate::class, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings_FallbackSettings_PromptTemplate::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/KnowledgeConnectorSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/KnowledgeConnectorSettings.php deleted file mode 100644 index 2703e8eb1766..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GenerativeSettings/KnowledgeConnectorSettings.php +++ /dev/null @@ -1,263 +0,0 @@ -. You are a helpful and verbose at - * , . Your task is to help humans on - * ". - * - * Generated from protobuf message google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - */ -class KnowledgeConnectorSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the company, organization or other entity that the agent - * represents. Used for knowledge connector LLM prompt and for knowledge - * search. - * - * Generated from protobuf field string business = 1; - */ - protected $business = ''; - /** - * Name of the virtual agent. Used for LLM prompt. Can be left empty. - * - * Generated from protobuf field string agent = 2; - */ - protected $agent = ''; - /** - * Identity of the agent, e.g. "virtual agent", "AI assistant". - * - * Generated from protobuf field string agent_identity = 3; - */ - protected $agent_identity = ''; - /** - * Company description, used for LLM prompt, e.g. "a family company selling - * freshly roasted coffee beans". - * - * Generated from protobuf field string business_description = 4; - */ - protected $business_description = ''; - /** - * Agent scope, e.g. "Example company website", "internal Example - * company website for employees", "manual of car owner". - * - * Generated from protobuf field string agent_scope = 5; - */ - protected $agent_scope = ''; - /** - * Whether to disable fallback to Data Store search results (in case the LLM - * couldn't pick a proper answer). Per default the feature is enabled. - * - * Generated from protobuf field bool disable_data_store_fallback = 8; - */ - protected $disable_data_store_fallback = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $business - * Name of the company, organization or other entity that the agent - * represents. Used for knowledge connector LLM prompt and for knowledge - * search. - * @type string $agent - * Name of the virtual agent. Used for LLM prompt. Can be left empty. - * @type string $agent_identity - * Identity of the agent, e.g. "virtual agent", "AI assistant". - * @type string $business_description - * Company description, used for LLM prompt, e.g. "a family company selling - * freshly roasted coffee beans". - * @type string $agent_scope - * Agent scope, e.g. "Example company website", "internal Example - * company website for employees", "manual of car owner". - * @type bool $disable_data_store_fallback - * Whether to disable fallback to Data Store search results (in case the LLM - * couldn't pick a proper answer). Per default the feature is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::initOnce(); - parent::__construct($data); - } - - /** - * Name of the company, organization or other entity that the agent - * represents. Used for knowledge connector LLM prompt and for knowledge - * search. - * - * Generated from protobuf field string business = 1; - * @return string - */ - public function getBusiness() - { - return $this->business; - } - - /** - * Name of the company, organization or other entity that the agent - * represents. Used for knowledge connector LLM prompt and for knowledge - * search. - * - * Generated from protobuf field string business = 1; - * @param string $var - * @return $this - */ - public function setBusiness($var) - { - GPBUtil::checkString($var, True); - $this->business = $var; - - return $this; - } - - /** - * Name of the virtual agent. Used for LLM prompt. Can be left empty. - * - * Generated from protobuf field string agent = 2; - * @return string - */ - public function getAgent() - { - return $this->agent; - } - - /** - * Name of the virtual agent. Used for LLM prompt. Can be left empty. - * - * Generated from protobuf field string agent = 2; - * @param string $var - * @return $this - */ - public function setAgent($var) - { - GPBUtil::checkString($var, True); - $this->agent = $var; - - return $this; - } - - /** - * Identity of the agent, e.g. "virtual agent", "AI assistant". - * - * Generated from protobuf field string agent_identity = 3; - * @return string - */ - public function getAgentIdentity() - { - return $this->agent_identity; - } - - /** - * Identity of the agent, e.g. "virtual agent", "AI assistant". - * - * Generated from protobuf field string agent_identity = 3; - * @param string $var - * @return $this - */ - public function setAgentIdentity($var) - { - GPBUtil::checkString($var, True); - $this->agent_identity = $var; - - return $this; - } - - /** - * Company description, used for LLM prompt, e.g. "a family company selling - * freshly roasted coffee beans". - * - * Generated from protobuf field string business_description = 4; - * @return string - */ - public function getBusinessDescription() - { - return $this->business_description; - } - - /** - * Company description, used for LLM prompt, e.g. "a family company selling - * freshly roasted coffee beans". - * - * Generated from protobuf field string business_description = 4; - * @param string $var - * @return $this - */ - public function setBusinessDescription($var) - { - GPBUtil::checkString($var, True); - $this->business_description = $var; - - return $this; - } - - /** - * Agent scope, e.g. "Example company website", "internal Example - * company website for employees", "manual of car owner". - * - * Generated from protobuf field string agent_scope = 5; - * @return string - */ - public function getAgentScope() - { - return $this->agent_scope; - } - - /** - * Agent scope, e.g. "Example company website", "internal Example - * company website for employees", "manual of car owner". - * - * Generated from protobuf field string agent_scope = 5; - * @param string $var - * @return $this - */ - public function setAgentScope($var) - { - GPBUtil::checkString($var, True); - $this->agent_scope = $var; - - return $this; - } - - /** - * Whether to disable fallback to Data Store search results (in case the LLM - * couldn't pick a proper answer). Per default the feature is enabled. - * - * Generated from protobuf field bool disable_data_store_fallback = 8; - * @return bool - */ - public function getDisableDataStoreFallback() - { - return $this->disable_data_store_fallback; - } - - /** - * Whether to disable fallback to Data Store search results (in case the LLM - * couldn't pick a proper answer). Per default the feature is enabled. - * - * Generated from protobuf field bool disable_data_store_fallback = 8; - * @param bool $var - * @return $this - */ - public function setDisableDataStoreFallback($var) - { - GPBUtil::checkBool($var); - $this->disable_data_store_fallback = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KnowledgeConnectorSettings::class, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings_KnowledgeConnectorSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator.php deleted file mode 100644 index 4dbfcbb0f94e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator.php +++ /dev/null @@ -1,302 +0,0 @@ -google.cloud.dialogflow.cx.v3.Generator - */ -class Generator extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the generator. - * Must be set for the - * [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] - * method. [Generators.CreateGenerate][] populates the name automatically. - * Format: - * `projects//locations//agents//generators/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the generator, unique within the - * agent. The prompt contains pre-defined parameters such as $conversation, - * $last-user-utterance, etc. populated by Dialogflow. It can also contain - * custom placeholders which will be resolved during fulfillment. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Required. Prompt for the LLM model. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $prompt_text = null; - /** - * Optional. List of custom placeholders in the prompt text. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $placeholders; - /** - * The LLM model settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; - */ - protected $llm_model_settings = null; - /** - * Parameters passed to the LLM to configure its behavior. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator.ModelParameter model_parameter = 8; - */ - protected $model_parameter = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the generator. - * Must be set for the - * [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] - * method. [Generators.CreateGenerate][] populates the name automatically. - * Format: - * `projects//locations//agents//generators/`. - * @type string $display_name - * Required. The human-readable name of the generator, unique within the - * agent. The prompt contains pre-defined parameters such as $conversation, - * $last-user-utterance, etc. populated by Dialogflow. It can also contain - * custom placeholders which will be resolved during fulfillment. - * @type \Google\Cloud\Dialogflow\Cx\V3\Phrase $prompt_text - * Required. Prompt for the LLM model. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Generator\Placeholder>|\Google\Protobuf\Internal\RepeatedField $placeholders - * Optional. List of custom placeholders in the prompt text. - * @type \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $llm_model_settings - * The LLM model settings. - * @type \Google\Cloud\Dialogflow\Cx\V3\Generator\ModelParameter $model_parameter - * Parameters passed to the LLM to configure its behavior. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the generator. - * Must be set for the - * [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] - * method. [Generators.CreateGenerate][] populates the name automatically. - * Format: - * `projects//locations//agents//generators/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the generator. - * Must be set for the - * [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] - * method. [Generators.CreateGenerate][] populates the name automatically. - * Format: - * `projects//locations//agents//generators/`. - * - * 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 human-readable name of the generator, unique within the - * agent. The prompt contains pre-defined parameters such as $conversation, - * $last-user-utterance, etc. populated by Dialogflow. It can also contain - * custom placeholders which will be resolved during fulfillment. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the generator, unique within the - * agent. The prompt contains pre-defined parameters such as $conversation, - * $last-user-utterance, etc. populated by Dialogflow. It can also contain - * custom placeholders which will be resolved during fulfillment. - * - * 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. Prompt for the LLM model. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Phrase|null - */ - public function getPromptText() - { - return $this->prompt_text; - } - - public function hasPromptText() - { - return isset($this->prompt_text); - } - - public function clearPromptText() - { - unset($this->prompt_text); - } - - /** - * Required. Prompt for the LLM model. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Phrase $var - * @return $this - */ - public function setPromptText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Phrase::class); - $this->prompt_text = $var; - - return $this; - } - - /** - * Optional. List of custom placeholders in the prompt text. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPlaceholders() - { - return $this->placeholders; - } - - /** - * Optional. List of custom placeholders in the prompt text. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Generator\Placeholder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPlaceholders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Generator\Placeholder::class); - $this->placeholders = $arr; - - return $this; - } - - /** - * The LLM model settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; - * @return \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings|null - */ - public function getLlmModelSettings() - { - return $this->llm_model_settings; - } - - public function hasLlmModelSettings() - { - return isset($this->llm_model_settings); - } - - public function clearLlmModelSettings() - { - unset($this->llm_model_settings); - } - - /** - * The LLM model settings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; - * @param \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $var - * @return $this - */ - public function setLlmModelSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings::class); - $this->llm_model_settings = $var; - - return $this; - } - - /** - * Parameters passed to the LLM to configure its behavior. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator.ModelParameter model_parameter = 8; - * @return \Google\Cloud\Dialogflow\Cx\V3\Generator\ModelParameter|null - */ - public function getModelParameter() - { - return $this->model_parameter; - } - - public function hasModelParameter() - { - return isset($this->model_parameter); - } - - public function clearModelParameter() - { - unset($this->model_parameter); - } - - /** - * Parameters passed to the LLM to configure its behavior. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator.ModelParameter model_parameter = 8; - * @param \Google\Cloud\Dialogflow\Cx\V3\Generator\ModelParameter $var - * @return $this - */ - public function setModelParameter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Generator\ModelParameter::class); - $this->model_parameter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/ModelParameter.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/ModelParameter.php deleted file mode 100644 index e2edd6e3cabc..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/ModelParameter.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.dialogflow.cx.v3.Generator.ModelParameter - */ -class ModelParameter extends \Google\Protobuf\Internal\Message -{ - /** - * The temperature used for sampling. Temperature sampling occurs after both - * topP and topK have been applied. - * Valid range: [0.0, 1.0] - * Low temperature = less random. High temperature = more random. - * - * Generated from protobuf field optional float temperature = 1; - */ - protected $temperature = null; - /** - * The maximum number of tokens to generate. - * - * Generated from protobuf field optional int32 max_decode_steps = 2; - */ - protected $max_decode_steps = null; - /** - * If set, only the tokens comprising the top top_p probability mass are - * considered. If both top_p and top_k are - * set, top_p will be used for further refining candidates selected with - * top_k. - * Valid range: (0.0, 1.0]. - * Small topP = less random. Large topP = more random. - * - * Generated from protobuf field optional float top_p = 3; - */ - protected $top_p = null; - /** - * If set, the sampling process in each step is limited to the top_k tokens - * with highest probabilities. - * Valid range: [1, 40] or 1000+. - * Small topK = less random. Large topK = more random. - * - * Generated from protobuf field optional int32 top_k = 4; - */ - protected $top_k = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $temperature - * The temperature used for sampling. Temperature sampling occurs after both - * topP and topK have been applied. - * Valid range: [0.0, 1.0] - * Low temperature = less random. High temperature = more random. - * @type int $max_decode_steps - * The maximum number of tokens to generate. - * @type float $top_p - * If set, only the tokens comprising the top top_p probability mass are - * considered. If both top_p and top_k are - * set, top_p will be used for further refining candidates selected with - * top_k. - * Valid range: (0.0, 1.0]. - * Small topP = less random. Large topP = more random. - * @type int $top_k - * If set, the sampling process in each step is limited to the top_k tokens - * with highest probabilities. - * Valid range: [1, 40] or 1000+. - * Small topK = less random. Large topK = more random. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); - parent::__construct($data); - } - - /** - * The temperature used for sampling. Temperature sampling occurs after both - * topP and topK have been applied. - * Valid range: [0.0, 1.0] - * Low temperature = less random. High temperature = more random. - * - * Generated from protobuf field optional float temperature = 1; - * @return float - */ - public function getTemperature() - { - return isset($this->temperature) ? $this->temperature : 0.0; - } - - public function hasTemperature() - { - return isset($this->temperature); - } - - public function clearTemperature() - { - unset($this->temperature); - } - - /** - * The temperature used for sampling. Temperature sampling occurs after both - * topP and topK have been applied. - * Valid range: [0.0, 1.0] - * Low temperature = less random. High temperature = more random. - * - * Generated from protobuf field optional float temperature = 1; - * @param float $var - * @return $this - */ - public function setTemperature($var) - { - GPBUtil::checkFloat($var); - $this->temperature = $var; - - return $this; - } - - /** - * The maximum number of tokens to generate. - * - * Generated from protobuf field optional int32 max_decode_steps = 2; - * @return int - */ - public function getMaxDecodeSteps() - { - return isset($this->max_decode_steps) ? $this->max_decode_steps : 0; - } - - public function hasMaxDecodeSteps() - { - return isset($this->max_decode_steps); - } - - public function clearMaxDecodeSteps() - { - unset($this->max_decode_steps); - } - - /** - * The maximum number of tokens to generate. - * - * Generated from protobuf field optional int32 max_decode_steps = 2; - * @param int $var - * @return $this - */ - public function setMaxDecodeSteps($var) - { - GPBUtil::checkInt32($var); - $this->max_decode_steps = $var; - - return $this; - } - - /** - * If set, only the tokens comprising the top top_p probability mass are - * considered. If both top_p and top_k are - * set, top_p will be used for further refining candidates selected with - * top_k. - * Valid range: (0.0, 1.0]. - * Small topP = less random. Large topP = more random. - * - * Generated from protobuf field optional float top_p = 3; - * @return float - */ - public function getTopP() - { - return isset($this->top_p) ? $this->top_p : 0.0; - } - - public function hasTopP() - { - return isset($this->top_p); - } - - public function clearTopP() - { - unset($this->top_p); - } - - /** - * If set, only the tokens comprising the top top_p probability mass are - * considered. If both top_p and top_k are - * set, top_p will be used for further refining candidates selected with - * top_k. - * Valid range: (0.0, 1.0]. - * Small topP = less random. Large topP = more random. - * - * Generated from protobuf field optional float top_p = 3; - * @param float $var - * @return $this - */ - public function setTopP($var) - { - GPBUtil::checkFloat($var); - $this->top_p = $var; - - return $this; - } - - /** - * If set, the sampling process in each step is limited to the top_k tokens - * with highest probabilities. - * Valid range: [1, 40] or 1000+. - * Small topK = less random. Large topK = more random. - * - * Generated from protobuf field optional int32 top_k = 4; - * @return int - */ - public function getTopK() - { - return isset($this->top_k) ? $this->top_k : 0; - } - - public function hasTopK() - { - return isset($this->top_k); - } - - public function clearTopK() - { - unset($this->top_k); - } - - /** - * If set, the sampling process in each step is limited to the top_k tokens - * with highest probabilities. - * Valid range: [1, 40] or 1000+. - * Small topK = less random. Large topK = more random. - * - * Generated from protobuf field optional int32 top_k = 4; - * @param int $var - * @return $this - */ - public function setTopK($var) - { - GPBUtil::checkInt32($var); - $this->top_k = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ModelParameter::class, \Google\Cloud\Dialogflow\Cx\V3\Generator_ModelParameter::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/Placeholder.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/Placeholder.php deleted file mode 100644 index ef18647f4cad..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Generator/Placeholder.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dialogflow.cx.v3.Generator.Placeholder - */ -class Placeholder extends \Google\Protobuf\Internal\Message -{ - /** - * Unique ID used to map custom placeholder to parameters in fulfillment. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * Custom placeholder value in the prompt text. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Unique ID used to map custom placeholder to parameters in fulfillment. - * @type string $name - * Custom placeholder value in the prompt text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); - parent::__construct($data); - } - - /** - * Unique ID used to map custom placeholder to parameters in fulfillment. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Unique ID used to map custom placeholder to parameters in fulfillment. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Custom placeholder value in the prompt text. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Custom placeholder value in the prompt text. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Placeholder::class, \Google\Cloud\Dialogflow\Cx\V3\Generator_Placeholder::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentRequest.php deleted file mode 100644 index 66d7b0b06484..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetAgentRequest - */ -class GetAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the agent. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the agent. - * Format: `projects//locations//agents/`. Please see - * {@see AgentsClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetAgentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the agent. - * Format: `projects//locations//agents/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the agent. - * Format: `projects//locations//agents/`. - * - * 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 agent. - * Format: `projects//locations//agents/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentValidationResultRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentValidationResultRequest.php deleted file mode 100644 index c77940ba4421..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetAgentValidationResultRequest.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest - */ -class GetAgentValidationResultRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent name. - * Format: - * `projects//locations//agents//validationResult`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - - /** - * @param string $name Required. The agent name. - * Format: - * `projects//locations//agents//validationResult`. Please see - * {@see AgentsClient::agentValidationResultName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetAgentValidationResultRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The agent name. - * Format: - * `projects//locations//agents//validationResult`. - * @type string $language_code - * If not specified, the agent's default language is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent name. - * Format: - * `projects//locations//agents//validationResult`. - * - * 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 agent name. - * Format: - * `projects//locations//agents//validationResult`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetChangelogRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetChangelogRequest.php deleted file mode 100644 index f1224cb4e1f2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetChangelogRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetChangelogRequest - */ -class GetChangelogRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the changelog to get. - * Format: - * `projects//locations//agents//changelogs/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the changelog to get. - * Format: - * `projects//locations//agents//changelogs/`. Please see - * {@see ChangelogsClient::changelogName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetChangelogRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the changelog to get. - * Format: - * `projects//locations//agents//changelogs/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Changelog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the changelog to get. - * Format: - * `projects//locations//agents//changelogs/`. - * - * 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 changelog to get. - * Format: - * `projects//locations//agents//changelogs/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetDeploymentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetDeploymentRequest.php deleted file mode 100644 index ce855c20c702..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetDeploymentRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetDeploymentRequest - */ -class GetDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - * `projects//locations//agents//environments//deployments/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - * `projects//locations//agents//environments//deployments/`. Please see - * {@see DeploymentsClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetDeploymentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - * `projects//locations//agents//environments//deployments/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Deployment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - * `projects//locations//agents//environments//deployments/`. - * - * 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 - * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - * `projects//locations//agents//environments//deployments/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEntityTypeRequest.php deleted file mode 100644 index 7effab8cda78..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEntityTypeRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - */ -class GetEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entity type. - * Format: - * `projects//locations//agents//entityTypes/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The language to retrieve the entity type for. The following fields are - * language dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - - /** - * @param string $name Required. The name of the entity type. - * Format: - * `projects//locations//agents//entityTypes/`. Please see - * {@see EntityTypesClient::entityTypeName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetEntityTypeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entity type. - * Format: - * `projects//locations//agents//entityTypes/`. - * @type string $language_code - * The language to retrieve the entity type for. The following fields are - * language dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entity type. - * Format: - * `projects//locations//agents//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//locations//agents//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; - } - - /** - * The language to retrieve the entity type for. The following fields are - * language dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to retrieve the entity type for. The following fields are - * language dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEnvironmentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEnvironmentRequest.php deleted file mode 100644 index 946c76f070c4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetEnvironmentRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetEnvironmentRequest - */ -class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - * `projects//locations//agents//environments/`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetEnvironmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - * `projects//locations//agents//environments/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - * `projects//locations//agents//environments/`. - * - * 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][google.cloud.dialogflow.cx.v3.Environment]. Format: - * `projects//locations//agents//environments/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExperimentRequest.php deleted file mode 100644 index a3e27c2aa6d5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetExperimentRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetExperimentRequest - */ -class GetExperimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - * `projects//locations//agents//environments//experiments/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - * `projects//locations//agents//environments//experiments/`. Please see - * {@see ExperimentsClient::experimentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetExperimentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - * `projects//locations//agents//environments//experiments/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - * `projects//locations//agents//environments//experiments/`. - * - * 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][google.cloud.dialogflow.cx.v3.Environment]. Format: - * `projects//locations//agents//environments//experiments/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowRequest.php deleted file mode 100644 index 6c4411625a6e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetFlowRequest - */ -class GetFlowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the flow to get. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The language to retrieve the flow for. The following fields are language - * dependent: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - - /** - * @param string $name Required. The name of the flow to get. - * Format: - * `projects//locations//agents//flows/`. Please see - * {@see FlowsClient::flowName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetFlowRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the flow to get. - * Format: - * `projects//locations//agents//flows/`. - * @type string $language_code - * The language to retrieve the flow for. The following fields are language - * dependent: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the flow to get. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 flow to get. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The language to retrieve the flow for. The following fields are language - * dependent: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to retrieve the flow for. The following fields are language - * dependent: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowValidationResultRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowValidationResultRequest.php deleted file mode 100644 index 386b8d583a84..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetFlowValidationResultRequest.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest - */ -class GetFlowValidationResultRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The flow name. - * Format: - * `projects//locations//agents//flows//validationResult`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - - /** - * @param string $name Required. The flow name. - * Format: - * `projects//locations//agents//flows//validationResult`. Please see - * {@see FlowsClient::flowValidationResultName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetFlowValidationResultRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The flow name. - * Format: - * `projects//locations//agents//flows//validationResult`. - * @type string $language_code - * If not specified, the agent's default language is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Required. The flow name. - * Format: - * `projects//locations//agents//flows//validationResult`. - * - * 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 flow name. - * Format: - * `projects//locations//agents//flows//validationResult`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGenerativeSettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGenerativeSettingsRequest.php deleted file mode 100644 index d48839cc64e2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGenerativeSettingsRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest - */ -class GetGenerativeSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects//locations//agents//generativeSettings`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Language code of the generative settings. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $language_code = ''; - - /** - * @param string $name Required. Format: - * `projects//locations//agents//generativeSettings`. Please see - * {@see AgentsClient::agentGenerativeSettingsName()} for help formatting this field. - * @param string $languageCode Required. Language code of the generative settings. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetGenerativeSettingsRequest - * - * @experimental - */ - public static function build(string $name, string $languageCode): self - { - return (new self()) - ->setName($name) - ->setLanguageCode($languageCode); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects//locations//agents//generativeSettings`. - * @type string $language_code - * Required. Language code of the generative settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects//locations//agents//generativeSettings`. - * - * 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. Format: - * `projects//locations//agents//generativeSettings`. - * - * 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. Language code of the generative settings. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Required. Language code of the generative settings. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGeneratorRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGeneratorRequest.php deleted file mode 100644 index 78213756fbee..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetGeneratorRequest.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetGeneratorRequest - */ -class GetGeneratorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the generator. - * Format: - * `projects//locations//agents//generators/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The language to list generators for. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - - /** - * @param string $name Required. The name of the generator. - * Format: - * `projects//locations//agents//generators/`. Please see - * {@see GeneratorsClient::generatorName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetGeneratorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the generator. - * Format: - * `projects//locations//agents//generators/`. - * @type string $language_code - * The language to list generators for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the generator. - * Format: - * `projects//locations//agents//generators/`. - * - * 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 generator. - * Format: - * `projects//locations//agents//generators/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The language to list generators for. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to list generators for. - * - * Generated from protobuf field string language_code = 2; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetIntentRequest.php deleted file mode 100644 index 9a87d6268651..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetIntentRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetIntentRequest - */ -class GetIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the intent. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The language to retrieve the intent for. The following fields are language - * dependent: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - - /** - * @param string $name Required. The name of the intent. - * Format: - * `projects//locations//agents//intents/`. Please see - * {@see IntentsClient::intentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetIntentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the intent. - * Format: - * `projects//locations//agents//intents/`. - * @type string $language_code - * The language to retrieve the intent for. The following fields are language - * dependent: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the intent. - * Format: - * `projects//locations//agents//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//locations//agents//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; - } - - /** - * The language to retrieve the intent for. The following fields are language - * dependent: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to retrieve the intent for. The following fields are language - * dependent: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPageRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPageRequest.php deleted file mode 100644 index d5d22c9a3d98..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetPageRequest.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetPageRequest - */ -class GetPageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the page. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The language to retrieve the page for. The following fields are language - * dependent: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - - /** - * @param string $name Required. The name of the page. - * Format: - * `projects//locations//agents//flows//pages/`. Please see - * {@see PagesClient::pageName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetPageRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the page. - * Format: - * `projects//locations//agents//flows//pages/`. - * @type string $language_code - * The language to retrieve the page for. The following fields are language - * dependent: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the page. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * 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 page. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The language to retrieve the page for. The following fields are language - * dependent: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to retrieve the page for. The following fields are language - * dependent: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSecuritySettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSecuritySettingsRequest.php deleted file mode 100644 index 8c64d8ed1b53..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSecuritySettingsRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - */ -class GetSecuritySettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the settings. - * Format: - * `projects//locations//securitySettings/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the settings. - * Format: - * `projects//locations//securitySettings/`. Please see - * {@see SecuritySettingsServiceClient::securitySettingsName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetSecuritySettingsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the settings. - * Format: - * `projects//locations//securitySettings/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the settings. - * Format: - * `projects//locations//securitySettings/`. - * - * 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 name of the settings. - * Format: - * `projects//locations//securitySettings/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSessionEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSessionEntityTypeRequest.php deleted file mode 100644 index 13dc7ecc6a3f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetSessionEntityTypeRequest.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest - */ -class GetSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session entity type. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the session entity type. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. Please see - * {@see SessionEntityTypesClient::sessionEntityTypeName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetSessionEntityTypeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the session entity type. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session entity type. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * - * 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//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseRequest.php deleted file mode 100644 index 30997320b4ef..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetTestCaseRequest - */ -class GetTestCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the testcase. - * Format: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the testcase. - * Format: - * `projects//locations//agents//testCases/`. Please see - * {@see TestCasesClient::testCaseName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetTestCaseRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the testcase. - * Format: - * `projects//locations//agents//testCases/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the testcase. - * Format: - * `projects//locations//agents//testCases/`. - * - * 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 testcase. - * Format: - * `projects//locations//agents//testCases/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseResultRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseResultRequest.php deleted file mode 100644 index a5b229faf6a6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTestCaseResultRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest - */ -class GetTestCaseResultRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the testcase. - * Format: - * `projects//locations//agents//testCases//results/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the testcase. - * Format: - * `projects//locations//agents//testCases//results/`. Please see - * {@see TestCasesClient::testCaseResultName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetTestCaseResultRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the testcase. - * Format: - * `projects//locations//agents//testCases//results/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the testcase. - * Format: - * `projects//locations//agents//testCases//results/`. - * - * 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 testcase. - * Format: - * `projects//locations//agents//testCases//results/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTransitionRouteGroupRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTransitionRouteGroupRequest.php deleted file mode 100644 index 6a2f1a533b0d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetTransitionRouteGroupRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest - */ -class GetTransitionRouteGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The language to retrieve the transition route group for. The following - * fields are language dependent: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - - /** - * @param string $name Required. The name of the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. Please see - * {@see TransitionRouteGroupsClient::transitionRouteGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetTransitionRouteGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. - * @type string $language_code - * The language to retrieve the transition route group for. The following - * fields are language dependent: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\TransitionRouteGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. - * - * 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 - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The language to retrieve the transition route group for. The following - * fields are language dependent: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to retrieve the transition route group for. The following - * fields are language dependent: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetVersionRequest.php deleted file mode 100644 index 5936c66c863d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetVersionRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetVersionRequest - */ -class GetVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. - * Format: - * `projects//locations//agents//flows//versions/`. Please see - * {@see VersionsClient::versionName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. - * Format: - * `projects//locations//agents//flows//versions/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. - * Format: - * `projects//locations//agents//flows//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][google.cloud.dialogflow.cx.v3.Version]. - * Format: - * `projects//locations//agents//flows//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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetWebhookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetWebhookRequest.php deleted file mode 100644 index 88404bd3075f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/GetWebhookRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.GetWebhookRequest - */ -class GetWebhookRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the webhook. - * Format: - * `projects//locations//agents//webhooks/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the webhook. - * Format: - * `projects//locations//agents//webhooks/`. Please see - * {@see WebhooksClient::webhookName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\GetWebhookRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the webhook. - * Format: - * `projects//locations//agents//webhooks/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the webhook. - * Format: - * `projects//locations//agents//webhooks/`. - * - * 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 webhook. - * Format: - * `projects//locations//agents//webhooks/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesMetadata.php deleted file mode 100644 index 119f702293dc..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - */ -class ImportEntityTypesMetadata 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\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest.php deleted file mode 100644 index fc5722d082e1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest.php +++ /dev/null @@ -1,264 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest - */ -class ImportEntityTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to import the entity types into. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Merge option for importing entity types. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $merge_option = 0; - /** - * Optional. The target entity type to import into. - * Format: - * `projects//locations//agents//entity_types/`. - * If set, there should be only one entity type included in - * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], - * of which the type should match the type of the target entity type. All - * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the - * imported entity type will be added to the target entity type. - * - * Generated from protobuf field string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $target_entity_type = ''; - protected $entity_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to import the entity types into. - * Format: `projects//locations//agents/`. - * @type string $entity_types_uri - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to import entity types from. The format of this URI must be - * `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 \Google\Cloud\Dialogflow\Cx\V3\InlineSource $entity_types_content - * Uncompressed byte content of entity types. - * @type int $merge_option - * Required. Merge option for importing entity types. - * @type string $target_entity_type - * Optional. The target entity type to import into. - * Format: - * `projects//locations//agents//entity_types/`. - * If set, there should be only one entity type included in - * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], - * of which the type should match the type of the target entity type. All - * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the - * imported entity type will be added to the target entity type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to import the entity types into. - * Format: `projects//locations//agents/`. - * - * 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 import the entity types into. - * Format: `projects//locations//agents/`. - * - * 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](https://cloud.google.com/storage/docs/) URI - * to import entity types from. The format of this URI must be - * `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 entity_types_uri = 2; - * @return string - */ - public function getEntityTypesUri() - { - return $this->readOneof(2); - } - - public function hasEntityTypesUri() - { - return $this->hasOneof(2); - } - - /** - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to import entity types from. The format of this URI must be - * `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 entity_types_uri = 2; - * @param string $var - * @return $this - */ - public function setEntityTypesUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Uncompressed byte content of entity types. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\InlineSource|null - */ - public function getEntityTypesContent() - { - return $this->readOneof(3); - } - - public function hasEntityTypesContent() - { - return $this->hasOneof(3); - } - - /** - * Uncompressed byte content of entity types. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\InlineSource $var - * @return $this - */ - public function setEntityTypesContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InlineSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. Merge option for importing entity types. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMergeOption() - { - return $this->merge_option; - } - - /** - * Required. Merge option for importing entity types. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMergeOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesRequest\MergeOption::class); - $this->merge_option = $var; - - return $this; - } - - /** - * Optional. The target entity type to import into. - * Format: - * `projects//locations//agents//entity_types/`. - * If set, there should be only one entity type included in - * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], - * of which the type should match the type of the target entity type. All - * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the - * imported entity type will be added to the target entity type. - * - * Generated from protobuf field string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getTargetEntityType() - { - return $this->target_entity_type; - } - - /** - * Optional. The target entity type to import into. - * Format: - * `projects//locations//agents//entity_types/`. - * If set, there should be only one entity type included in - * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], - * of which the type should match the type of the target entity type. All - * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the - * imported entity type will be added to the target entity type. - * - * Generated from protobuf field string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetEntityType($var) - { - GPBUtil::checkString($var, True); - $this->target_entity_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getEntityTypes() - { - return $this->whichOneof("entity_types"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest/MergeOption.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest/MergeOption.php deleted file mode 100644 index 5dcc43f4a90d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesRequest/MergeOption.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption - */ -class MergeOption -{ - /** - * Unspecified. If used, system uses REPORT_CONFLICT as default. - * - * Generated from protobuf enum MERGE_OPTION_UNSPECIFIED = 0; - */ - const MERGE_OPTION_UNSPECIFIED = 0; - /** - * Replace the original entity type in the agent with the new entity type - * when display name conflicts exist. - * - * Generated from protobuf enum REPLACE = 1; - */ - const REPLACE = 1; - /** - * Merge the original entity type with the new entity type when display name - * conflicts exist. - * - * Generated from protobuf enum MERGE = 2; - */ - const MERGE = 2; - /** - * Create new entity types with new display names to differentiate them from - * the existing entity types when display name conflicts exist. - * - * Generated from protobuf enum RENAME = 3; - */ - const RENAME = 3; - /** - * Report conflict information if display names conflict is detected. - * Otherwise, import entity types. - * - * Generated from protobuf enum REPORT_CONFLICT = 4; - */ - const REPORT_CONFLICT = 4; - /** - * Keep the original entity type and discard the conflicting new entity type - * when display name conflicts exist. - * - * Generated from protobuf enum KEEP = 5; - */ - const KEEP = 5; - - private static $valueToName = [ - self::MERGE_OPTION_UNSPECIFIED => 'MERGE_OPTION_UNSPECIFIED', - self::REPLACE => 'REPLACE', - self::MERGE => 'MERGE', - self::RENAME => 'RENAME', - self::REPORT_CONFLICT => 'REPORT_CONFLICT', - self::KEEP => 'KEEP', - ]; - - 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(MergeOption::class, \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesRequest_MergeOption::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse.php deleted file mode 100644 index ad58590898c3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - */ -class ImportEntityTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the imported entity types. - * Format: - * `projects//locations//agents//entity_types/`. - * - * Generated from protobuf field repeated string entity_types = 1 [(.google.api.resource_reference) = { - */ - private $entity_types; - /** - * Info which resources have conflicts when - * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option - * is set in ImportEntityTypesRequest. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; - */ - protected $conflicting_resources = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $entity_types - * The unique identifier of the imported entity types. - * Format: - * `projects//locations//agents//entity_types/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse\ConflictingResources $conflicting_resources - * Info which resources have conflicts when - * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option - * is set in ImportEntityTypesRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the imported entity types. - * Format: - * `projects//locations//agents//entity_types/`. - * - * Generated from protobuf field repeated string entity_types = 1 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityTypes() - { - return $this->entity_types; - } - - /** - * The unique identifier of the imported entity types. - * Format: - * `projects//locations//agents//entity_types/`. - * - * Generated from protobuf field repeated string entity_types = 1 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->entity_types = $arr; - - return $this; - } - - /** - * Info which resources have conflicts when - * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option - * is set in ImportEntityTypesRequest. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse\ConflictingResources|null - */ - public function getConflictingResources() - { - return $this->conflicting_resources; - } - - public function hasConflictingResources() - { - return isset($this->conflicting_resources); - } - - public function clearConflictingResources() - { - unset($this->conflicting_resources); - } - - /** - * Info which resources have conflicts when - * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option - * is set in ImportEntityTypesRequest. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse\ConflictingResources $var - * @return $this - */ - public function setConflictingResources($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse\ConflictingResources::class); - $this->conflicting_resources = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse/ConflictingResources.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse/ConflictingResources.php deleted file mode 100644 index 4217e676872b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportEntityTypesResponse/ConflictingResources.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources - */ -class ConflictingResources extends \Google\Protobuf\Internal\Message -{ - /** - * Display names of conflicting entity types. - * - * Generated from protobuf field repeated string entity_type_display_names = 1; - */ - private $entity_type_display_names; - /** - * Display names of conflicting entities. - * - * Generated from protobuf field repeated string entity_display_names = 2; - */ - private $entity_display_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $entity_type_display_names - * Display names of conflicting entity types. - * @type array|\Google\Protobuf\Internal\RepeatedField $entity_display_names - * Display names of conflicting entities. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Display names of conflicting entity types. - * - * Generated from protobuf field repeated string entity_type_display_names = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityTypeDisplayNames() - { - return $this->entity_type_display_names; - } - - /** - * Display names of conflicting entity types. - * - * Generated from protobuf field repeated string entity_type_display_names = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityTypeDisplayNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->entity_type_display_names = $arr; - - return $this; - } - - /** - * Display names of conflicting entities. - * - * Generated from protobuf field repeated string entity_display_names = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityDisplayNames() - { - return $this->entity_display_names; - } - - /** - * Display names of conflicting entities. - * - * Generated from protobuf field repeated string entity_display_names = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityDisplayNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->entity_display_names = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConflictingResources::class, \Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse_ConflictingResources::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest.php deleted file mode 100644 index 89c1fe18c85a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportFlowRequest - */ -class ImportFlowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to import the flow into. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Flow import mode. If not specified, `KEEP` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption import_option = 4; - */ - protected $import_option = 0; - /** - * Optional. Specifies the import strategy used when resolving resource - * conflicts. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $flow_import_strategy = null; - protected $flow; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to import the flow into. - * Format: `projects//locations//agents/`. - * @type string $flow_uri - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to import flow from. The format of this URI must be - * `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 $flow_content - * Uncompressed raw byte content for flow. - * @type int $import_option - * Flow import mode. If not specified, `KEEP` is assumed. - * @type \Google\Cloud\Dialogflow\Cx\V3\FlowImportStrategy $flow_import_strategy - * Optional. Specifies the import strategy used when resolving resource - * conflicts. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to import the flow into. - * Format: `projects//locations//agents/`. - * - * 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 import the flow into. - * Format: `projects//locations//agents/`. - * - * 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](https://cloud.google.com/storage/docs/) URI - * to import flow from. The format of this URI must be - * `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 flow_uri = 2; - * @return string - */ - public function getFlowUri() - { - return $this->readOneof(2); - } - - public function hasFlowUri() - { - return $this->hasOneof(2); - } - - /** - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to import flow from. The format of this URI must be - * `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 flow_uri = 2; - * @param string $var - * @return $this - */ - public function setFlowUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Uncompressed raw byte content for flow. - * - * Generated from protobuf field bytes flow_content = 3; - * @return string - */ - public function getFlowContent() - { - return $this->readOneof(3); - } - - public function hasFlowContent() - { - return $this->hasOneof(3); - } - - /** - * Uncompressed raw byte content for flow. - * - * Generated from protobuf field bytes flow_content = 3; - * @param string $var - * @return $this - */ - public function setFlowContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Flow import mode. If not specified, `KEEP` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption import_option = 4; - * @return int - */ - public function getImportOption() - { - return $this->import_option; - } - - /** - * Flow import mode. If not specified, `KEEP` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption import_option = 4; - * @param int $var - * @return $this - */ - public function setImportOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportFlowRequest\ImportOption::class); - $this->import_option = $var; - - return $this; - } - - /** - * Optional. Specifies the import strategy used when resolving resource - * conflicts. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\FlowImportStrategy|null - */ - public function getFlowImportStrategy() - { - return $this->flow_import_strategy; - } - - public function hasFlowImportStrategy() - { - return isset($this->flow_import_strategy); - } - - public function clearFlowImportStrategy() - { - unset($this->flow_import_strategy); - } - - /** - * Optional. Specifies the import strategy used when resolving resource - * conflicts. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.FlowImportStrategy flow_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\FlowImportStrategy $var - * @return $this - */ - public function setFlowImportStrategy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\FlowImportStrategy::class); - $this->flow_import_strategy = $var; - - return $this; - } - - /** - * @return string - */ - public function getFlow() - { - return $this->whichOneof("flow"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest/ImportOption.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest/ImportOption.php deleted file mode 100644 index 452eedc24aac..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowRequest/ImportOption.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption - */ -class ImportOption -{ - /** - * Unspecified. Treated as `KEEP`. - * - * Generated from protobuf enum IMPORT_OPTION_UNSPECIFIED = 0; - */ - const IMPORT_OPTION_UNSPECIFIED = 0; - /** - * Always respect settings in exported flow content. It may cause a - * import failure if some settings (e.g. custom NLU) are not supported in - * the agent to import into. - * - * Generated from protobuf enum KEEP = 1; - */ - const KEEP = 1; - /** - * Fallback to default settings if some settings are not supported in the - * agent to import into. E.g. Standard NLU will be used if custom NLU is - * not available. - * - * Generated from protobuf enum FALLBACK = 2; - */ - const FALLBACK = 2; - - private static $valueToName = [ - self::IMPORT_OPTION_UNSPECIFIED => 'IMPORT_OPTION_UNSPECIFIED', - self::KEEP => 'KEEP', - self::FALLBACK => 'FALLBACK', - ]; - - 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(ImportOption::class, \Google\Cloud\Dialogflow\Cx\V3\ImportFlowRequest_ImportOption::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowResponse.php deleted file mode 100644 index bdc4ed0ce833..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportFlowResponse.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportFlowResponse - */ -class ImportFlowResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the new flow. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string flow = 1 [(.google.api.resource_reference) = { - */ - protected $flow = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $flow - * The unique identifier of the new flow. - * Format: - * `projects//locations//agents//flows/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the new flow. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string flow = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getFlow() - { - return $this->flow; - } - - /** - * The unique identifier of the new flow. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string flow = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setFlow($var) - { - GPBUtil::checkString($var, True); - $this->flow = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsMetadata.php deleted file mode 100644 index fcc991e68182..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportIntentsMetadata - */ -class ImportIntentsMetadata 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\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest.php deleted file mode 100644 index 94fec9e77ad9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportIntentsRequest - */ -class ImportIntentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to import the intents into. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Merge option for importing intents. If not specified, `REJECT` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption merge_option = 4; - */ - protected $merge_option = 0; - protected $intents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to import the intents into. - * Format: `projects//locations//agents/`. - * @type string $intents_uri - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to import intents from. The format of this URI must be - * `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 \Google\Cloud\Dialogflow\Cx\V3\InlineSource $intents_content - * Uncompressed byte content of intents. - * @type int $merge_option - * Merge option for importing intents. If not specified, `REJECT` is assumed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to import the intents into. - * Format: `projects//locations//agents/`. - * - * 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 import the intents into. - * Format: `projects//locations//agents/`. - * - * 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](https://cloud.google.com/storage/docs/) URI - * to import intents from. The format of this URI must be - * `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 intents_uri = 2; - * @return string - */ - public function getIntentsUri() - { - return $this->readOneof(2); - } - - public function hasIntentsUri() - { - return $this->hasOneof(2); - } - - /** - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to import intents from. The format of this URI must be - * `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 intents_uri = 2; - * @param string $var - * @return $this - */ - public function setIntentsUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Uncompressed byte content of intents. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineSource intents_content = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\InlineSource|null - */ - public function getIntentsContent() - { - return $this->readOneof(3); - } - - public function hasIntentsContent() - { - return $this->hasOneof(3); - } - - /** - * Uncompressed byte content of intents. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.InlineSource intents_content = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\InlineSource $var - * @return $this - */ - public function setIntentsContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\InlineSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Merge option for importing intents. If not specified, `REJECT` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption merge_option = 4; - * @return int - */ - public function getMergeOption() - { - return $this->merge_option; - } - - /** - * Merge option for importing intents. If not specified, `REJECT` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption merge_option = 4; - * @param int $var - * @return $this - */ - public function setMergeOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsRequest\MergeOption::class); - $this->merge_option = $var; - - return $this; - } - - /** - * @return string - */ - public function getIntents() - { - return $this->whichOneof("intents"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest/MergeOption.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest/MergeOption.php deleted file mode 100644 index c0929b8ea868..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsRequest/MergeOption.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption - */ -class MergeOption -{ - /** - * Unspecified. Should not be used. - * - * Generated from protobuf enum MERGE_OPTION_UNSPECIFIED = 0; - */ - const MERGE_OPTION_UNSPECIFIED = 0; - /** - * DEPRECATED: Please use - * [REPORT_CONFLICT][ImportIntentsRequest.REPORT_CONFLICT] instead. - * Fail the request if there are intents whose display names conflict with - * the display names of intents in the agent. - * - * Generated from protobuf enum REJECT = 1 [deprecated = true]; - */ - const REJECT = 1; - /** - * Replace the original intent in the agent with the new intent when display - * name conflicts exist. - * - * Generated from protobuf enum REPLACE = 2; - */ - const REPLACE = 2; - /** - * Merge the original intent with the new intent when display name conflicts - * exist. - * - * Generated from protobuf enum MERGE = 3; - */ - const MERGE = 3; - /** - * Create new intents with new display names to differentiate them from the - * existing intents when display name conflicts exist. - * - * Generated from protobuf enum RENAME = 4; - */ - const RENAME = 4; - /** - * Report conflict information if display names conflict is detected. - * Otherwise, import intents. - * - * Generated from protobuf enum REPORT_CONFLICT = 5; - */ - const REPORT_CONFLICT = 5; - /** - * Keep the original intent and discard the conflicting new intent when - * display name conflicts exist. - * - * Generated from protobuf enum KEEP = 6; - */ - const KEEP = 6; - - private static $valueToName = [ - self::MERGE_OPTION_UNSPECIFIED => 'MERGE_OPTION_UNSPECIFIED', - self::REJECT => 'REJECT', - self::REPLACE => 'REPLACE', - self::MERGE => 'MERGE', - self::RENAME => 'RENAME', - self::REPORT_CONFLICT => 'REPORT_CONFLICT', - self::KEEP => 'KEEP', - ]; - - 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(MergeOption::class, \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsRequest_MergeOption::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse.php deleted file mode 100644 index 0dedb47f4d78..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportIntentsResponse - */ -class ImportIntentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the imported intents. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field repeated string intents = 1 [(.google.api.resource_reference) = { - */ - private $intents; - /** - * Info which resources have conflicts when - * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is - * set in ImportIntentsRequest. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; - */ - protected $conflicting_resources = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $intents - * The unique identifier of the imported intents. - * Format: - * `projects//locations//agents//intents/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse\ConflictingResources $conflicting_resources - * Info which resources have conflicts when - * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is - * set in ImportIntentsRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the imported intents. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field repeated string intents = 1 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntents() - { - return $this->intents; - } - - /** - * The unique identifier of the imported intents. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field repeated string intents = 1 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->intents = $arr; - - return $this; - } - - /** - * Info which resources have conflicts when - * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is - * set in ImportIntentsRequest. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse\ConflictingResources|null - */ - public function getConflictingResources() - { - return $this->conflicting_resources; - } - - public function hasConflictingResources() - { - return isset($this->conflicting_resources); - } - - public function clearConflictingResources() - { - unset($this->conflicting_resources); - } - - /** - * Info which resources have conflicts when - * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is - * set in ImportIntentsRequest. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse\ConflictingResources $var - * @return $this - */ - public function setConflictingResources($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse\ConflictingResources::class); - $this->conflicting_resources = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse/ConflictingResources.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse/ConflictingResources.php deleted file mode 100644 index 84fe1851d9fa..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportIntentsResponse/ConflictingResources.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - */ -class ConflictingResources extends \Google\Protobuf\Internal\Message -{ - /** - * Display names of conflicting intents. - * - * Generated from protobuf field repeated string intent_display_names = 1; - */ - private $intent_display_names; - /** - * Display names of conflicting entities. - * - * Generated from protobuf field repeated string entity_display_names = 2; - */ - private $entity_display_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $intent_display_names - * Display names of conflicting intents. - * @type array|\Google\Protobuf\Internal\RepeatedField $entity_display_names - * Display names of conflicting entities. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Display names of conflicting intents. - * - * Generated from protobuf field repeated string intent_display_names = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntentDisplayNames() - { - return $this->intent_display_names; - } - - /** - * Display names of conflicting intents. - * - * Generated from protobuf field repeated string intent_display_names = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntentDisplayNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->intent_display_names = $arr; - - return $this; - } - - /** - * Display names of conflicting entities. - * - * Generated from protobuf field repeated string entity_display_names = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityDisplayNames() - { - return $this->entity_display_names; - } - - /** - * Display names of conflicting entities. - * - * Generated from protobuf field repeated string entity_display_names = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityDisplayNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->entity_display_names = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConflictingResources::class, \Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse_ConflictingResources::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php deleted file mode 100644 index d14d8f01de64..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportStrategy.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportStrategy - */ -class ImportStrategy -{ - /** - * Unspecified. Treated as 'CREATE_NEW'. - * - * Generated from protobuf enum IMPORT_STRATEGY_UNSPECIFIED = 0; - */ - const IMPORT_STRATEGY_UNSPECIFIED = 0; - /** - * Create a new resource with a numeric suffix appended to the end of the - * existing display name. - * - * Generated from protobuf enum IMPORT_STRATEGY_CREATE_NEW = 1; - */ - const IMPORT_STRATEGY_CREATE_NEW = 1; - /** - * Replace existing resource with incoming resource in the content to be - * imported. - * - * Generated from protobuf enum IMPORT_STRATEGY_REPLACE = 2; - */ - const IMPORT_STRATEGY_REPLACE = 2; - /** - * Keep existing resource and discard incoming resource in the content to be - * imported. - * - * Generated from protobuf enum IMPORT_STRATEGY_KEEP = 3; - */ - const IMPORT_STRATEGY_KEEP = 3; - /** - * Combine existing and incoming resources when a conflict is encountered. - * - * Generated from protobuf enum IMPORT_STRATEGY_MERGE = 4; - */ - const IMPORT_STRATEGY_MERGE = 4; - /** - * Throw error if a conflict is encountered. - * - * Generated from protobuf enum IMPORT_STRATEGY_THROW_ERROR = 5; - */ - const IMPORT_STRATEGY_THROW_ERROR = 5; - - private static $valueToName = [ - self::IMPORT_STRATEGY_UNSPECIFIED => 'IMPORT_STRATEGY_UNSPECIFIED', - self::IMPORT_STRATEGY_CREATE_NEW => 'IMPORT_STRATEGY_CREATE_NEW', - self::IMPORT_STRATEGY_REPLACE => 'IMPORT_STRATEGY_REPLACE', - self::IMPORT_STRATEGY_KEEP => 'IMPORT_STRATEGY_KEEP', - self::IMPORT_STRATEGY_MERGE => 'IMPORT_STRATEGY_MERGE', - self::IMPORT_STRATEGY_THROW_ERROR => 'IMPORT_STRATEGY_THROW_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); - } -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesMetadata.php deleted file mode 100644 index 5266a067f3d7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesMetadata.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata - */ -class ImportTestCasesMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Errors for failed test cases. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestCaseError>|\Google\Protobuf\Internal\RepeatedField $errors - * Errors for failed test cases. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Errors for failed test cases. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Errors for failed test cases. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseError errors = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestCaseError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestCaseError::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesRequest.php deleted file mode 100644 index 5d14d6f7a6bd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportTestCasesRequest - */ -class ImportTestCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to import test cases to. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to import test cases to. - * Format: `projects//locations//agents/`. - * @type string $gcs_uri - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to import test cases from. The format of this URI must be - * `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 $content - * Uncompressed raw byte content for test cases. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to import test cases to. - * Format: `projects//locations//agents/`. - * - * 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 import test cases to. - * Format: `projects//locations//agents/`. - * - * 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](https://cloud.google.com/storage/docs/) URI - * to import test cases from. The format of this URI must be - * `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 gcs_uri = 2; - * @return string - */ - public function getGcsUri() - { - return $this->readOneof(2); - } - - public function hasGcsUri() - { - return $this->hasOneof(2); - } - - /** - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to import test cases from. The format of this URI must be - * `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 gcs_uri = 2; - * @param string $var - * @return $this - */ - public function setGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Uncompressed raw byte content for test cases. - * - * Generated from protobuf field bytes content = 3; - * @return string - */ - public function getContent() - { - return $this->readOneof(3); - } - - public function hasContent() - { - return $this->hasOneof(3); - } - - /** - * Uncompressed raw byte content for test cases. - * - * Generated from protobuf field bytes content = 3; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesResponse.php deleted file mode 100644 index b0bc9ef0ac80..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ImportTestCasesResponse.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.cx.v3.ImportTestCasesResponse - */ -class ImportTestCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifiers of the new test cases. - * Format: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field repeated string names = 1 [(.google.api.resource_reference) = { - */ - private $names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $names - * The unique identifiers of the new test cases. - * Format: - * `projects//locations//agents//testCases/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifiers of the new test cases. - * Format: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field repeated string names = 1 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNames() - { - return $this->names; - } - - /** - * The unique identifiers of the new test cases. - * Format: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field repeated string names = 1 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineDestination.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineDestination.php deleted file mode 100644 index 7934fa39203a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineDestination.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.cx.v3.InlineDestination - */ -class InlineDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The uncompressed byte content for the objects. - * Only populated in responses. - * - * Generated from protobuf field bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * Output only. The uncompressed byte content for the objects. - * Only populated in responses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Inline::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The uncompressed byte content for the objects. - * Only populated in responses. - * - * Generated from protobuf field bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Output only. The uncompressed byte content for the objects. - * Only populated in responses. - * - * Generated from protobuf field bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSource.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSource.php deleted file mode 100644 index b79064b06e18..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InlineSource.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.dialogflow.cx.v3.InlineSource - */ -class InlineSource extends \Google\Protobuf\Internal\Message -{ - /** - * The uncompressed byte content for the objects. - * - * Generated from protobuf field bytes content = 1; - */ - protected $content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * The uncompressed byte content for the objects. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Inline::initOnce(); - parent::__construct($data); - } - - /** - * The uncompressed byte content for the objects. - * - * Generated from protobuf field bytes content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * The uncompressed byte content for the objects. - * - * Generated from protobuf field bytes content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InputAudioConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InputAudioConfig.php deleted file mode 100644 index 9862e0ebad1c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/InputAudioConfig.php +++ /dev/null @@ -1,457 +0,0 @@ -google.cloud.dialogflow.cx.v3.InputAudioConfig - */ -class InputAudioConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Audio encoding of the audio content to process. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $audio_encoding = 0; - /** - * 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; - /** - * Optional. If `true`, Dialogflow returns - * [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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; - /** - * Optional. 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. - * - * Generated from protobuf field repeated string phrase_hints = 4; - */ - private $phrase_hints; - /** - * Optional. Which Speech model to select for the given request. - * For more information, see - * [Speech - * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). - * - * Generated from protobuf field string model = 7; - */ - protected $model = ''; - /** - * Optional. Which variant of the [Speech - * model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechModelVariant model_variant = 10; - */ - protected $model_variant = 0; - /** - * Optional. 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. - * - * Generated from protobuf field bool single_utterance = 8; - */ - protected $single_utterance = false; - /** - * Configuration of barge-in behavior during the streaming of input audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; - */ - protected $barge_in_config = null; - /** - * If `true`, the request will opt out for STT conformer model migration. - * This field will be deprecated once force migration takes place in June - * 2024. Please refer to [Dialogflow CX Speech model - * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration). - * - * Generated from protobuf field bool opt_out_conformer_model_migration = 26; - */ - protected $opt_out_conformer_model_migration = 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 - * 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 bool $enable_word_info - * Optional. If `true`, Dialogflow returns - * [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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 - * Optional. 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. - * @type string $model - * Optional. Which Speech model to select for the given request. - * For more information, see - * [Speech - * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). - * @type int $model_variant - * Optional. Which variant of the [Speech - * model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. - * @type bool $single_utterance - * Optional. 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. - * @type \Google\Cloud\Dialogflow\Cx\V3\BargeInConfig $barge_in_config - * Configuration of barge-in behavior during the streaming of input audio. - * @type bool $opt_out_conformer_model_migration - * If `true`, the request will opt out for STT conformer model migration. - * This field will be deprecated once force migration takes place in June - * 2024. Please refer to [Dialogflow CX Speech model - * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. Audio encoding of the audio content to process. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @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.cx.v3.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAudioEncoding($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\AudioEncoding::class); - $this->audio_encoding = $var; - - return $this; - } - - /** - * 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; - } - - /** - * 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; - } - - /** - * Optional. If `true`, Dialogflow returns - * [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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; - } - - /** - * Optional. If `true`, Dialogflow returns - * [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in - * [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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; - } - - /** - * Optional. 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. - * - * Generated from protobuf field repeated string phrase_hints = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPhraseHints() - { - return $this->phrase_hints; - } - - /** - * Optional. 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. - * - * Generated from protobuf field repeated string phrase_hints = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPhraseHints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->phrase_hints = $arr; - - return $this; - } - - /** - * Optional. Which Speech model to select for the given request. - * For more information, see - * [Speech - * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). - * - * Generated from protobuf field string model = 7; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Optional. Which Speech model to select for the given request. - * For more information, see - * [Speech - * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). - * - * 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; - } - - /** - * Optional. Which variant of the [Speech - * model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechModelVariant model_variant = 10; - * @return int - */ - public function getModelVariant() - { - return $this->model_variant; - } - - /** - * Optional. Which variant of the [Speech - * model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SpeechModelVariant model_variant = 10; - * @param int $var - * @return $this - */ - public function setModelVariant($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SpeechModelVariant::class); - $this->model_variant = $var; - - return $this; - } - - /** - * Optional. 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. - * - * Generated from protobuf field bool single_utterance = 8; - * @return bool - */ - public function getSingleUtterance() - { - return $this->single_utterance; - } - - /** - * Optional. 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. - * - * 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; - } - - /** - * Configuration of barge-in behavior during the streaming of input audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; - * @return \Google\Cloud\Dialogflow\Cx\V3\BargeInConfig|null - */ - public function getBargeInConfig() - { - return $this->barge_in_config; - } - - public function hasBargeInConfig() - { - return isset($this->barge_in_config); - } - - public function clearBargeInConfig() - { - unset($this->barge_in_config); - } - - /** - * Configuration of barge-in behavior during the streaming of input audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; - * @param \Google\Cloud\Dialogflow\Cx\V3\BargeInConfig $var - * @return $this - */ - public function setBargeInConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\BargeInConfig::class); - $this->barge_in_config = $var; - - return $this; - } - - /** - * If `true`, the request will opt out for STT conformer model migration. - * This field will be deprecated once force migration takes place in June - * 2024. Please refer to [Dialogflow CX Speech model - * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration). - * - * Generated from protobuf field bool opt_out_conformer_model_migration = 26; - * @return bool - */ - public function getOptOutConformerModelMigration() - { - return $this->opt_out_conformer_model_migration; - } - - /** - * If `true`, the request will opt out for STT conformer model migration. - * This field will be deprecated once force migration takes place in June - * 2024. Please refer to [Dialogflow CX Speech model - * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration). - * - * Generated from protobuf field bool opt_out_conformer_model_migration = 26; - * @param bool $var - * @return $this - */ - public function setOptOutConformerModelMigration($var) - { - GPBUtil::checkBool($var); - $this->opt_out_conformer_model_migration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent.php deleted file mode 100644 index 5f4fe761130e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent.php +++ /dev/null @@ -1,428 +0,0 @@ -google.cloud.dialogflow.cx.v3.Intent - */ -class Intent extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the intent. - * Required for the - * [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] - * method. - * [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] - * populates the name automatically. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the intent, unique within the agent. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * The collection of training phrases the agent is trained on to identify the - * intent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3; - */ - private $training_phrases; - /** - * The collection of parameters associated with the intent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4; - */ - private $parameters; - /** - * 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 = 5; - */ - protected $priority = 0; - /** - * Indicates whether this is a fallback intent. Currently only default - * fallback intent is allowed in the agent, which is added upon agent - * creation. - * Adding training phrases to fallback intent is useful in the case of - * requests that are mistakenly matched, since training phrases assigned to - * fallback intents act as negative examples that triggers no-match event. - * - * Generated from protobuf field bool is_fallback = 6; - */ - protected $is_fallback = false; - /** - * The key/value metadata to label an intent. Labels can contain - * lowercase letters, digits and the symbols '-' and '_'. International - * characters are allowed, including letters from unicase alphabets. Keys must - * start with a letter. Keys and values can be no longer than 63 characters - * and no more than 128 bytes. - * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed - * Dialogflow defined labels include: - * * sys-head - * * sys-contextual - * The above labels do not require value. "sys-head" means the intent is a - * head intent. "sys.contextual" means the intent is a contextual intent. - * - * Generated from protobuf field map labels = 7; - */ - private $labels; - /** - * Human readable description for better understanding an intent like its - * scope, content, result etc. Maximum character limit: 140 characters. - * - * Generated from protobuf field string description = 8; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the intent. - * Required for the - * [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] - * method. - * [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] - * populates the name automatically. - * Format: - * `projects//locations//agents//intents/`. - * @type string $display_name - * Required. The human-readable name of the intent, unique within the agent. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Intent\TrainingPhrase>|\Google\Protobuf\Internal\RepeatedField $training_phrases - * The collection of training phrases the agent is trained on to identify the - * intent. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\Intent\Parameter>|\Google\Protobuf\Internal\RepeatedField $parameters - * The collection of parameters associated with the intent. - * @type int $priority - * 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 - * Indicates whether this is a fallback intent. Currently only default - * fallback intent is allowed in the agent, which is added upon agent - * creation. - * Adding training phrases to fallback intent is useful in the case of - * requests that are mistakenly matched, since training phrases assigned to - * fallback intents act as negative examples that triggers no-match event. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The key/value metadata to label an intent. Labels can contain - * lowercase letters, digits and the symbols '-' and '_'. International - * characters are allowed, including letters from unicase alphabets. Keys must - * start with a letter. Keys and values can be no longer than 63 characters - * and no more than 128 bytes. - * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed - * Dialogflow defined labels include: - * * sys-head - * * sys-contextual - * The above labels do not require value. "sys-head" means the intent is a - * head intent. "sys.contextual" means the intent is a contextual intent. - * @type string $description - * Human readable description for better understanding an intent like its - * scope, content, result etc. Maximum character limit: 140 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the intent. - * Required for the - * [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] - * method. - * [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] - * populates the name automatically. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the intent. - * Required for the - * [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] - * method. - * [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] - * populates the name automatically. - * Format: - * `projects//locations//agents//intents/`. - * - * 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 human-readable name of the intent, unique within the 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 human-readable name of the intent, unique within the 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; - } - - /** - * The collection of training phrases the agent is trained on to identify the - * intent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrainingPhrases() - { - return $this->training_phrases; - } - - /** - * The collection of training phrases the agent is trained on to identify the - * intent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\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\Cx\V3\Intent\TrainingPhrase::class); - $this->training_phrases = $arr; - - return $this; - } - - /** - * The collection of parameters associated with the intent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * The collection of parameters associated with the intent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\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\Cx\V3\Intent\Parameter::class); - $this->parameters = $arr; - - return $this; - } - - /** - * 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 = 5; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * 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 = 5; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt32($var); - $this->priority = $var; - - return $this; - } - - /** - * Indicates whether this is a fallback intent. Currently only default - * fallback intent is allowed in the agent, which is added upon agent - * creation. - * Adding training phrases to fallback intent is useful in the case of - * requests that are mistakenly matched, since training phrases assigned to - * fallback intents act as negative examples that triggers no-match event. - * - * Generated from protobuf field bool is_fallback = 6; - * @return bool - */ - public function getIsFallback() - { - return $this->is_fallback; - } - - /** - * Indicates whether this is a fallback intent. Currently only default - * fallback intent is allowed in the agent, which is added upon agent - * creation. - * Adding training phrases to fallback intent is useful in the case of - * requests that are mistakenly matched, since training phrases assigned to - * fallback intents act as negative examples that triggers no-match event. - * - * Generated from protobuf field bool is_fallback = 6; - * @param bool $var - * @return $this - */ - public function setIsFallback($var) - { - GPBUtil::checkBool($var); - $this->is_fallback = $var; - - return $this; - } - - /** - * The key/value metadata to label an intent. Labels can contain - * lowercase letters, digits and the symbols '-' and '_'. International - * characters are allowed, including letters from unicase alphabets. Keys must - * start with a letter. Keys and values can be no longer than 63 characters - * and no more than 128 bytes. - * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed - * Dialogflow defined labels include: - * * sys-head - * * sys-contextual - * The above labels do not require value. "sys-head" means the intent is a - * head intent. "sys.contextual" means the intent is a contextual intent. - * - * Generated from protobuf field map labels = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The key/value metadata to label an intent. Labels can contain - * lowercase letters, digits and the symbols '-' and '_'. International - * characters are allowed, including letters from unicase alphabets. Keys must - * start with a letter. Keys and values can be no longer than 63 characters - * and no more than 128 bytes. - * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed - * Dialogflow defined labels include: - * * sys-head - * * sys-contextual - * The above labels do not require value. "sys-head" means the intent is a - * head intent. "sys.contextual" means the intent is a contextual intent. - * - * Generated from protobuf field map labels = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Human readable description for better understanding an intent like its - * scope, content, result etc. Maximum character limit: 140 characters. - * - * Generated from protobuf field string description = 8; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Human readable description for better understanding an intent like its - * scope, content, result etc. Maximum character limit: 140 characters. - * - * Generated from protobuf field string description = 8; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/Parameter.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/Parameter.php deleted file mode 100644 index ac2996559b91..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/Parameter.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.dialogflow.cx.v3.Intent.Parameter - */ -class Parameter extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier of the parameter. This field - * is used by [training - * phrases][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase] to annotate - * their [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part]. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * Required. The entity type of the parameter. - * Format: - * `projects/-/locations/-/agents/-/entityTypes/` for - * system entity types (for example, - * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or - * `projects//locations//agents//entityTypes/` - * for developer entity types. - * - * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $entity_type = ''; - /** - * Indicates whether the parameter represents a list of values. - * - * Generated from protobuf field bool is_list = 3; - */ - protected $is_list = false; - /** - * Indicates whether the parameter content should be redacted in log. If - * redaction is enabled, the parameter content will be replaced by parameter - * name during logging. - * Note: the parameter content is subject to redaction if either parameter - * level redaction or [entity type level - * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. - * - * Generated from protobuf field bool redact = 4; - */ - protected $redact = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. The unique identifier of the parameter. This field - * is used by [training - * phrases][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase] to annotate - * their [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part]. - * @type string $entity_type - * Required. The entity type of the parameter. - * Format: - * `projects/-/locations/-/agents/-/entityTypes/` for - * system entity types (for example, - * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or - * `projects//locations//agents//entityTypes/` - * for developer entity types. - * @type bool $is_list - * Indicates whether the parameter represents a list of values. - * @type bool $redact - * Indicates whether the parameter content should be redacted in log. If - * redaction is enabled, the parameter content will be replaced by parameter - * name during logging. - * Note: the parameter content is subject to redaction if either parameter - * level redaction or [entity type level - * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier of the parameter. This field - * is used by [training - * phrases][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase] to annotate - * their [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part]. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. The unique identifier of the parameter. This field - * is used by [training - * phrases][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase] to annotate - * their [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part]. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Required. The entity type of the parameter. - * Format: - * `projects/-/locations/-/agents/-/entityTypes/` for - * system entity types (for example, - * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or - * `projects//locations//agents//entityTypes/` - * for developer entity types. - * - * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getEntityType() - { - return $this->entity_type; - } - - /** - * Required. The entity type of the parameter. - * Format: - * `projects/-/locations/-/agents/-/entityTypes/` for - * system entity types (for example, - * `projects/-/locations/-/agents/-/entityTypes/sys.date`), or - * `projects//locations//agents//entityTypes/` - * for developer entity types. - * - * Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEntityType($var) - { - GPBUtil::checkString($var, True); - $this->entity_type = $var; - - return $this; - } - - /** - * Indicates whether the parameter represents a list of values. - * - * Generated from protobuf field bool is_list = 3; - * @return bool - */ - public function getIsList() - { - return $this->is_list; - } - - /** - * Indicates whether the parameter represents a list of values. - * - * Generated from protobuf field bool is_list = 3; - * @param bool $var - * @return $this - */ - public function setIsList($var) - { - GPBUtil::checkBool($var); - $this->is_list = $var; - - return $this; - } - - /** - * Indicates whether the parameter content should be redacted in log. If - * redaction is enabled, the parameter content will be replaced by parameter - * name during logging. - * Note: the parameter content is subject to redaction if either parameter - * level redaction or [entity type level - * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. - * - * Generated from protobuf field bool redact = 4; - * @return bool - */ - public function getRedact() - { - return $this->redact; - } - - /** - * Indicates whether the parameter content should be redacted in log. If - * redaction is enabled, the parameter content will be replaced by parameter - * name during logging. - * Note: the parameter content is subject to redaction if either parameter - * level redaction or [entity type level - * redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled. - * - * Generated from protobuf field bool redact = 4; - * @param bool $var - * @return $this - */ - public function setRedact($var) - { - GPBUtil::checkBool($var); - $this->redact = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Parameter::class, \Google\Cloud\Dialogflow\Cx\V3\Intent_Parameter::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase.php deleted file mode 100644 index b33a5dfda837..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - */ -class TrainingPhrase extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique identifier of the training phrase. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = ''; - /** - * 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.cx.v3.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 `parameter_id` field is set. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $parts; - /** - * Indicates how many times this example was added to the intent. - * - * Generated from protobuf field int32 repeat_count = 3; - */ - protected $repeat_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Output only. The unique identifier of the training phrase. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.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 `parameter_id` field is set. - * @type int $repeat_count - * Indicates how many times this example was added to the intent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique identifier of the training phrase. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. The unique identifier of the training phrase. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $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.cx.v3.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 `parameter_id` field is set. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part parts = 2 [(.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.cx.v3.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 `parameter_id` field is set. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\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\Cx\V3\Intent\TrainingPhrase\Part::class); - $this->parts = $arr; - - return $this; - } - - /** - * Indicates how many times this example was added to the intent. - * - * Generated from protobuf field int32 repeat_count = 3; - * @return int - */ - public function getRepeatCount() - { - return $this->repeat_count; - } - - /** - * Indicates how many times this example was added to the intent. - * - * Generated from protobuf field int32 repeat_count = 3; - * @param int $var - * @return $this - */ - public function setRepeatCount($var) - { - GPBUtil::checkInt32($var); - $this->repeat_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TrainingPhrase::class, \Google\Cloud\Dialogflow\Cx\V3\Intent_TrainingPhrase::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase/Part.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase/Part.php deleted file mode 100644 index ce8637e3116d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Intent/TrainingPhrase/Part.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - */ -class Part extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The text for this part. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $text = ''; - /** - * The [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] used to - * annotate this part of the training phrase. This field is required for - * annotated parts of the training phrase. - * - * Generated from protobuf field string parameter_id = 2; - */ - protected $parameter_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Required. The text for this part. - * @type string $parameter_id - * The [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] used to - * annotate this part of the training phrase. This field is required for - * annotated parts of the training phrase. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The text for this part. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Required. The text for this part. - * - * 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; - } - - /** - * The [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] used to - * annotate this part of the training phrase. This field is required for - * annotated parts of the training phrase. - * - * Generated from protobuf field string parameter_id = 2; - * @return string - */ - public function getParameterId() - { - return $this->parameter_id; - } - - /** - * The [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] used to - * annotate this part of the training phrase. This field is required for - * annotated parts of the training phrase. - * - * Generated from protobuf field string parameter_id = 2; - * @param string $var - * @return $this - */ - public function setParameterId($var) - { - GPBUtil::checkString($var, True); - $this->parameter_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Part::class, \Google\Cloud\Dialogflow\Cx\V3\Intent_TrainingPhrase_Part::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage.php deleted file mode 100644 index cb8489e7802a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.dialogflow.cx.v3.IntentCoverage - */ -class IntentCoverage extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Intents present in the agent - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; - */ - private $intents; - /** - * The percent of intents in the agent that are covered. - * - * Generated from protobuf field float coverage_score = 2; - */ - protected $coverage_score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\IntentCoverage\Intent>|\Google\Protobuf\Internal\RepeatedField $intents - * The list of Intents present in the agent - * @type float $coverage_score - * The percent of intents in the agent that are covered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The list of Intents present in the agent - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntents() - { - return $this->intents; - } - - /** - * The list of Intents present in the agent - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\IntentCoverage\Intent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage\Intent::class); - $this->intents = $arr; - - return $this; - } - - /** - * The percent of intents in the agent that are covered. - * - * Generated from protobuf field float coverage_score = 2; - * @return float - */ - public function getCoverageScore() - { - return $this->coverage_score; - } - - /** - * The percent of intents in the agent that are covered. - * - * Generated from protobuf field float coverage_score = 2; - * @param float $var - * @return $this - */ - public function setCoverageScore($var) - { - GPBUtil::checkFloat($var); - $this->coverage_score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage/Intent.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage/Intent.php deleted file mode 100644 index 9c7ad5628022..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentCoverage/Intent.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - */ -class Intent extends \Google\Protobuf\Internal\Message -{ - /** - * The intent full resource name - * - * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { - */ - protected $intent = ''; - /** - * Whether the intent is covered by at least one of the agent's - * test cases. - * - * Generated from protobuf field bool covered = 2; - */ - protected $covered = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $intent - * The intent full resource name - * @type bool $covered - * Whether the intent is covered by at least one of the agent's - * test cases. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The intent full resource name - * - * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getIntent() - { - return $this->intent; - } - - /** - * The intent full resource name - * - * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkString($var, True); - $this->intent = $var; - - return $this; - } - - /** - * Whether the intent is covered by at least one of the agent's - * test cases. - * - * Generated from protobuf field bool covered = 2; - * @return bool - */ - public function getCovered() - { - return $this->covered; - } - - /** - * Whether the intent is covered by at least one of the agent's - * test cases. - * - * Generated from protobuf field bool covered = 2; - * @param bool $var - * @return $this - */ - public function setCovered($var) - { - GPBUtil::checkBool($var); - $this->covered = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Intent::class, \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage_Intent::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentInput.php deleted file mode 100644 index 9f8ca905c9a9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentInput.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.cx.v3.IntentInput - */ -class IntentInput extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier of the intent. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string intent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $intent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $intent - * Required. The unique identifier of the intent. - * Format: - * `projects//locations//agents//intents/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier of the intent. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string intent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getIntent() - { - return $this->intent; - } - - /** - * Required. The unique identifier of the intent. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string intent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkString($var, True); - $this->intent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentView.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentView.php deleted file mode 100644 index 371193419657..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/IntentView.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.dialogflow.cx.v3.IntentView - */ -class IntentView -{ - /** - * Not specified. Treated as INTENT_VIEW_FULL. - * - * Generated from protobuf enum INTENT_VIEW_UNSPECIFIED = 0; - */ - const INTENT_VIEW_UNSPECIFIED = 0; - /** - * Training phrases field is not populated in the response. - * - * Generated from protobuf enum INTENT_VIEW_PARTIAL = 1; - */ - const INTENT_VIEW_PARTIAL = 1; - /** - * All fields are populated. - * - * Generated from protobuf enum INTENT_VIEW_FULL = 2; - */ - const INTENT_VIEW_FULL = 2; - - private static $valueToName = [ - self::INTENT_VIEW_UNSPECIFIED => 'INTENT_VIEW_UNSPECIFIED', - self::INTENT_VIEW_PARTIAL => 'INTENT_VIEW_PARTIAL', - 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/KnowledgeConnectorSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/KnowledgeConnectorSettings.php deleted file mode 100644 index dab6fef5b467..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/KnowledgeConnectorSettings.php +++ /dev/null @@ -1,254 +0,0 @@ -google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings - */ -class KnowledgeConnectorSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Whether Knowledge Connector is enabled or not. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - /** - * The fulfillment to be triggered. - * When the answers from the Knowledge Connector are selected by Dialogflow, - * you can utitlize the request scoped parameter `$request.knowledge.answers` - * (contains up to the 5 highest confidence answers) and - * `$request.knowledge.questions` (contains the corresponding questions) to - * construct the fulfillment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; - */ - protected $trigger_fulfillment = null; - /** - * Optional. List of related data store connections. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $data_store_connections; - protected $target; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Whether Knowledge Connector is enabled or not. - * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $trigger_fulfillment - * The fulfillment to be triggered. - * When the answers from the Knowledge Connector are selected by Dialogflow, - * you can utitlize the request scoped parameter `$request.knowledge.answers` - * (contains up to the 5 highest confidence answers) and - * `$request.knowledge.questions` (contains the corresponding questions) to - * construct the fulfillment. - * @type string $target_page - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * @type string $target_flow - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection>|\Google\Protobuf\Internal\RepeatedField $data_store_connections - * Optional. List of related data store connections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Whether Knowledge Connector is enabled or not. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Whether Knowledge Connector is enabled or not. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * The fulfillment to be triggered. - * When the answers from the Knowledge Connector are selected by Dialogflow, - * you can utitlize the request scoped parameter `$request.knowledge.answers` - * (contains up to the 5 highest confidence answers) and - * `$request.knowledge.questions` (contains the corresponding questions) to - * construct the fulfillment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment|null - */ - public function getTriggerFulfillment() - { - return $this->trigger_fulfillment; - } - - public function hasTriggerFulfillment() - { - return isset($this->trigger_fulfillment); - } - - public function clearTriggerFulfillment() - { - unset($this->trigger_fulfillment); - } - - /** - * The fulfillment to be triggered. - * When the answers from the Knowledge Connector are selected by Dialogflow, - * you can utitlize the request scoped parameter `$request.knowledge.answers` - * (contains up to the 5 highest confidence answers) and - * `$request.knowledge.questions` (contains the corresponding questions) to - * construct the fulfillment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var - * @return $this - */ - public function setTriggerFulfillment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); - $this->trigger_fulfillment = $var; - - return $this; - } - - /** - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string target_page = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetPage() - { - return $this->readOneof(4); - } - - public function hasTargetPage() - { - return $this->hasOneof(4); - } - - /** - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string target_page = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetPage($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string target_flow = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetFlow() - { - return $this->readOneof(5); - } - - public function hasTargetFlow() - { - return $this->hasOneof(5); - } - - /** - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string target_flow = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetFlow($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. List of related data store connections. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataStoreConnections() - { - return $this->data_store_connections; - } - - /** - * Optional. List of related data store connections. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataStoreConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::class); - $this->data_store_connections = $arr; - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LanguageInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LanguageInfo.php deleted file mode 100644 index 94a80769bbf3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LanguageInfo.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dialogflow.cx.v3.LanguageInfo - */ -class LanguageInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The language code specified in the original - * [request][google.cloud.dialogflow.cx.v3.QueryInput.language_code]. - * - * Generated from protobuf field string input_language_code = 1; - */ - protected $input_language_code = ''; - /** - * The language code detected for this request based on the user - * conversation. - * - * Generated from protobuf field string resolved_language_code = 2; - */ - protected $resolved_language_code = ''; - /** - * The confidence score of the detected language between 0 and 1. - * - * Generated from protobuf field float confidence_score = 3; - */ - protected $confidence_score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_language_code - * The language code specified in the original - * [request][google.cloud.dialogflow.cx.v3.QueryInput.language_code]. - * @type string $resolved_language_code - * The language code detected for this request based on the user - * conversation. - * @type float $confidence_score - * The confidence score of the detected language between 0 and 1. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * The language code specified in the original - * [request][google.cloud.dialogflow.cx.v3.QueryInput.language_code]. - * - * Generated from protobuf field string input_language_code = 1; - * @return string - */ - public function getInputLanguageCode() - { - return $this->input_language_code; - } - - /** - * The language code specified in the original - * [request][google.cloud.dialogflow.cx.v3.QueryInput.language_code]. - * - * Generated from protobuf field string input_language_code = 1; - * @param string $var - * @return $this - */ - public function setInputLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->input_language_code = $var; - - return $this; - } - - /** - * The language code detected for this request based on the user - * conversation. - * - * Generated from protobuf field string resolved_language_code = 2; - * @return string - */ - public function getResolvedLanguageCode() - { - return $this->resolved_language_code; - } - - /** - * The language code detected for this request based on the user - * conversation. - * - * Generated from protobuf field string resolved_language_code = 2; - * @param string $var - * @return $this - */ - public function setResolvedLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->resolved_language_code = $var; - - return $this; - } - - /** - * The confidence score of the detected language between 0 and 1. - * - * Generated from protobuf field float confidence_score = 3; - * @return float - */ - public function getConfidenceScore() - { - return $this->confidence_score; - } - - /** - * The confidence score of the detected language between 0 and 1. - * - * Generated from protobuf field float confidence_score = 3; - * @param float $var - * @return $this - */ - public function setConfidenceScore($var) - { - GPBUtil::checkFloat($var); - $this->confidence_score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsRequest.php deleted file mode 100644 index e6845b2b4c93..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListAgentsRequest - */ -class ListAgentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location to list all agents 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 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 = ''; - - /** - * @param string $parent Required. The location to list all agents for. - * Format: `projects//locations/`. Please see - * {@see AgentsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListAgentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location to list all agents for. - * 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\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location to list all agents 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 location to list all agents 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 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsResponse.php deleted file mode 100644 index 6110935c92d1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListAgentsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListAgentsResponse - */ -class ListAgentsResponse 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.cx.v3.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\Cx\V3\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\Cx\V3\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.cx.v3.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.cx.v3.Agent agents = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Agent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAgents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsRequest.php deleted file mode 100644 index 0bd5b7e00f46..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsRequest.php +++ /dev/null @@ -1,269 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListChangelogsRequest - */ -class ListChangelogsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent containing the changelogs. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter string. Supports filter by user_email, resource, type and - * create_time. Some examples: - * 1. By user email: - * user_email = "someone@google.com" - * 2. By resource name: - * resource = "projects/123/locations/global/agents/456/flows/789" - * 3. By resource display name: - * display_name = "my agent" - * 4. By action: - * action = "Create" - * 5. By type: - * type = "flows" - * 6. By create time. Currently predicates on `create_time` and - * `create_time_epoch_seconds` are supported: - * create_time_epoch_seconds > 1551790877 AND create_time <= - * 2017-01-15T01:30:15.01Z - * 7. Combination of above filters: - * resource = "projects/123/locations/global/agents/456/flows/789" - * AND user_email = "someone@google.com" - * AND create_time <= 2017-01-15T01:30:15.01Z - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * 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; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The agent containing the changelogs. - * Format: `projects//locations//agents/`. Please see - * {@see ChangelogsClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListChangelogsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent containing the changelogs. - * Format: `projects//locations//agents/`. - * @type string $filter - * The filter string. Supports filter by user_email, resource, type and - * create_time. Some examples: - * 1. By user email: - * user_email = "someone@google.com" - * 2. By resource name: - * resource = "projects/123/locations/global/agents/456/flows/789" - * 3. By resource display name: - * display_name = "my agent" - * 4. By action: - * action = "Create" - * 5. By type: - * type = "flows" - * 6. By create time. Currently predicates on `create_time` and - * `create_time_epoch_seconds` are supported: - * create_time_epoch_seconds > 1551790877 AND create_time <= - * 2017-01-15T01:30:15.01Z - * 7. Combination of above filters: - * resource = "projects/123/locations/global/agents/456/flows/789" - * AND user_email = "someone@google.com" - * AND create_time <= 2017-01-15T01:30:15.01Z - * @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\Cx\V3\Changelog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent containing the changelogs. - * Format: `projects//locations//agents/`. - * - * 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 containing the changelogs. - * Format: `projects//locations//agents/`. - * - * 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 filter string. Supports filter by user_email, resource, type and - * create_time. Some examples: - * 1. By user email: - * user_email = "someone@google.com" - * 2. By resource name: - * resource = "projects/123/locations/global/agents/456/flows/789" - * 3. By resource display name: - * display_name = "my agent" - * 4. By action: - * action = "Create" - * 5. By type: - * type = "flows" - * 6. By create time. Currently predicates on `create_time` and - * `create_time_epoch_seconds` are supported: - * create_time_epoch_seconds > 1551790877 AND create_time <= - * 2017-01-15T01:30:15.01Z - * 7. Combination of above filters: - * resource = "projects/123/locations/global/agents/456/flows/789" - * AND user_email = "someone@google.com" - * AND create_time <= 2017-01-15T01:30:15.01Z - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter string. Supports filter by user_email, resource, type and - * create_time. Some examples: - * 1. By user email: - * user_email = "someone@google.com" - * 2. By resource name: - * resource = "projects/123/locations/global/agents/456/flows/789" - * 3. By resource display name: - * display_name = "my agent" - * 4. By action: - * action = "Create" - * 5. By type: - * type = "flows" - * 6. By create time. Currently predicates on `create_time` and - * `create_time_epoch_seconds` are supported: - * create_time_epoch_seconds > 1551790877 AND create_time <= - * 2017-01-15T01:30:15.01Z - * 7. Combination of above filters: - * resource = "projects/123/locations/global/agents/456/flows/789" - * AND user_email = "someone@google.com" - * AND create_time <= 2017-01-15T01:30:15.01Z - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * 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; - * @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 = 3; - * @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 = 4; - * @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 = 4; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsResponse.php deleted file mode 100644 index f108398b3db7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListChangelogsResponse.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListChangelogsResponse - */ -class ListChangelogsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of changelogs. There will be a maximum number of items returned - * based on the page_size field in the request. The changelogs will be ordered - * by timestamp. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Changelog changelogs = 1; - */ - private $changelogs; - /** - * 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\Cx\V3\Changelog>|\Google\Protobuf\Internal\RepeatedField $changelogs - * The list of changelogs. There will be a maximum number of items returned - * based on the page_size field in the request. The changelogs will be ordered - * by timestamp. - * @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\Cx\V3\Changelog::initOnce(); - parent::__construct($data); - } - - /** - * The list of changelogs. There will be a maximum number of items returned - * based on the page_size field in the request. The changelogs will be ordered - * by timestamp. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Changelog changelogs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChangelogs() - { - return $this->changelogs; - } - - /** - * The list of changelogs. There will be a maximum number of items returned - * based on the page_size field in the request. The changelogs will be ordered - * by timestamp. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Changelog changelogs = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Changelog>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChangelogs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Changelog::class); - $this->changelogs = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsRequest.php deleted file mode 100644 index e9975dc06884..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest - */ -class ListContinuousTestResultsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The environment to list results for. - * Format: - * `projects//locations//agents//environments/`. - * - * 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 = ''; - - /** - * @param string $parent Required. The environment to list results for. - * Format: - * `projects//locations//agents//environments/`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListContinuousTestResultsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The environment to list results for. - * Format: - * `projects//locations//agents//environments/`. - * @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\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The environment to list results for. - * Format: - * `projects//locations//agents//environments/`. - * - * 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 environment to list results for. - * Format: - * `projects//locations//agents//environments/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsResponse.php deleted file mode 100644 index 71491345e27e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListContinuousTestResultsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse - */ -class ListContinuousTestResultsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of continuous test results. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_results = 1; - */ - private $continuous_test_results; - /** - * 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\Cx\V3\ContinuousTestResult>|\Google\Protobuf\Internal\RepeatedField $continuous_test_results - * The list of continuous test results. - * @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\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * The list of continuous test results. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContinuousTestResults() - { - return $this->continuous_test_results; - } - - /** - * The list of continuous test results. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_results = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContinuousTestResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult::class); - $this->continuous_test_results = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsRequest.php deleted file mode 100644 index 995e6212de81..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - */ -class ListDeploymentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to - * list all environments for. Format: - * `projects//locations//agents//environments/`. - * - * 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 20 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 = ''; - - /** - * @param string $parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to - * list all environments for. Format: - * `projects//locations//agents//environments/`. Please see - * {@see DeploymentsClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListDeploymentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to - * list all environments for. Format: - * `projects//locations//agents//environments/`. - * @type int $page_size - * The maximum number of items to return in a single page. By default 20 and - * at most 100. - * @type string $page_token - * The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Deployment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to - * list all environments for. Format: - * `projects//locations//agents//environments/`. - * - * 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 [Environment][google.cloud.dialogflow.cx.v3.Environment] to - * list all environments for. Format: - * `projects//locations//agents//environments/`. - * - * 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 20 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 20 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsResponse.php deleted file mode 100644 index 695c12baf8ed..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListDeploymentsResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - */ -class ListDeploymentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of deployments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Deployment deployments = 1; - */ - private $deployments; - /** - * 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\Cx\V3\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments - * The list of deployments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * @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\Cx\V3\Deployment::initOnce(); - parent::__construct($data); - } - - /** - * The list of deployments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Deployment deployments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeployments() - { - return $this->deployments; - } - - /** - * The list of deployments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Deployment deployments = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Deployment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Deployment::class); - $this->deployments = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesRequest.php deleted file mode 100644 index 39cdd6e90823..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesRequest.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListEntityTypesRequest - */ -class ListEntityTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to list all entity types for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The language to list entity types for. The following fields are language - * dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - /** - * 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; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The agent to list all entity types for. - * Format: `projects//locations//agents/`. Please see - * {@see EntityTypesClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListEntityTypesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to list all entity types for. - * Format: `projects//locations//agents/`. - * @type string $language_code - * The language to list entity types for. The following fields are language - * dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * are supported. - * Note: languages must be enabled in the agent before they can be used. - * @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\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to list all entity types for. - * Format: `projects//locations//agents/`. - * - * 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 for. - * Format: `projects//locations//agents/`. - * - * 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 language to list entity types for. The following fields are language - * dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to list entity types for. The following fields are language - * dependent: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $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 = 3; - * @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 = 3; - * @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 = 4; - * @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 = 4; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesResponse.php deleted file mode 100644 index 4972de35965a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEntityTypesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - */ -class ListEntityTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of 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.cx.v3.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\Cx\V3\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types - * The list of 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\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * The list of 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.cx.v3.EntityType entity_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntityTypes() - { - return $this->entity_types; - } - - /** - * The list of 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.cx.v3.EntityType entity_types = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\EntityType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsRequest.php deleted file mode 100644 index 27109ec748e3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest - */ -class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all - * environments for. Format: - * `projects//locations//agents/`. - * - * 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 20 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 = ''; - - /** - * @param string $parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all - * environments for. Format: - * `projects//locations//agents/`. Please see - * {@see EnvironmentsClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListEnvironmentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all - * environments for. Format: - * `projects//locations//agents/`. - * @type int $page_size - * The maximum number of items to return in a single page. By default 20 and - * at most 100. - * @type string $page_token - * The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all - * environments for. Format: - * `projects//locations//agents/`. - * - * 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][google.cloud.dialogflow.cx.v3.Agent] to list all - * environments for. Format: - * `projects//locations//agents/`. - * - * 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 20 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 20 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsResponse.php deleted file mode 100644 index 76e3427f307c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListEnvironmentsResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse - */ -class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of environments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.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\Cx\V3\Environment>|\Google\Protobuf\Internal\RepeatedField $environments - * The list of environments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * @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\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * The list of environments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment environments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvironments() - { - return $this->environments; - } - - /** - * The list of environments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment environments = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Environment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvironments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsRequest.php deleted file mode 100644 index 546ddb2f7c86..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListExperimentsRequest - */ -class ListExperimentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to - * list all environments for. Format: - * `projects//locations//agents//environments/`. - * - * 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 20 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 = ''; - - /** - * @param string $parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to - * list all environments for. Format: - * `projects//locations//agents//environments/`. Please see - * {@see ExperimentsClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListExperimentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to - * list all environments for. Format: - * `projects//locations//agents//environments/`. - * @type int $page_size - * The maximum number of items to return in a single page. By default 20 and - * at most 100. - * @type string $page_token - * The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to - * list all environments for. Format: - * `projects//locations//agents//environments/`. - * - * 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 [Environment][google.cloud.dialogflow.cx.v3.Environment] to - * list all environments for. Format: - * `projects//locations//agents//environments/`. - * - * 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 20 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 20 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsResponse.php deleted file mode 100644 index f5f66d17c29e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListExperimentsResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListExperimentsResponse - */ -class ListExperimentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of experiments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - */ - private $experiments; - /** - * 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\Cx\V3\Experiment>|\Google\Protobuf\Internal\RepeatedField $experiments - * The list of experiments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * @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\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * The list of experiments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExperiments() - { - return $this->experiments; - } - - /** - * The list of experiments. There will be a maximum number of items - * returned based on the page_size field in the request. The list may in some - * cases be empty or contain fewer entries than page_size even if this isn't - * the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Experiment experiments = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Experiment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExperiments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Experiment::class); - $this->experiments = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsRequest.php deleted file mode 100644 index cd166946c2a9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsRequest.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListFlowsRequest - */ -class ListFlowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent containing the flows. - * Format: `projects//locations//agents/`. - * - * 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 = ''; - /** - * The language to list flows for. The following fields are language - * dependent: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 4; - */ - protected $language_code = ''; - - /** - * @param string $parent Required. The agent containing the flows. - * Format: `projects//locations//agents/`. Please see - * {@see FlowsClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListFlowsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent containing the flows. - * Format: `projects//locations//agents/`. - * @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. - * @type string $language_code - * The language to list flows for. The following fields are language - * dependent: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent containing the flows. - * Format: `projects//locations//agents/`. - * - * 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 containing the flows. - * Format: `projects//locations//agents/`. - * - * 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; - } - - /** - * The language to list flows for. The following fields are language - * dependent: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 4; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to list flows for. The following fields are language - * dependent: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsResponse.php deleted file mode 100644 index c38f11694ac4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListFlowsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListFlowsResponse - */ -class ListFlowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of flows. 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.cx.v3.Flow flows = 1; - */ - private $flows; - /** - * 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\Cx\V3\Flow>|\Google\Protobuf\Internal\RepeatedField $flows - * The list of flows. 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\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * The list of flows. 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.cx.v3.Flow flows = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFlows() - { - return $this->flows; - } - - /** - * The list of flows. 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.cx.v3.Flow flows = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Flow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFlows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Flow::class); - $this->flows = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsRequest.php deleted file mode 100644 index d5b4de9508a6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - */ -class ListGeneratorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to list all generators for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The language to list generators for. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * 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; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The agent to list all generators for. - * Format: `projects//locations//agents/`. Please see - * {@see GeneratorsClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListGeneratorsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to list all generators for. - * Format: `projects//locations//agents/`. - * @type string $language_code - * The language to list generators for. - * @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\Cx\V3\Generator::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to list all generators for. - * Format: `projects//locations//agents/`. - * - * 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 generators for. - * Format: `projects//locations//agents/`. - * - * 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 language to list generators for. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to list generators for. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $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 = 3; - * @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 = 3; - * @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 = 4; - * @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 = 4; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsResponse.php deleted file mode 100644 index f66e1e370fc6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListGeneratorsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - */ -class ListGeneratorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of generators. 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.cx.v3.Generator generators = 1; - */ - private $generators; - /** - * 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\Cx\V3\Generator>|\Google\Protobuf\Internal\RepeatedField $generators - * The list of generators. 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\Cx\V3\Generator::initOnce(); - parent::__construct($data); - } - - /** - * The list of generators. 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.cx.v3.Generator generators = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGenerators() - { - return $this->generators; - } - - /** - * The list of generators. 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.cx.v3.Generator generators = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Generator>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGenerators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Generator::class); - $this->generators = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsRequest.php deleted file mode 100644 index 7f3216516f9c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsRequest.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListIntentsRequest - */ -class ListIntentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to list all intents for. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The language to list intents for. The following fields are language - * dependent: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - /** - * The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentView intent_view = 5; - */ - protected $intent_view = 0; - /** - * 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; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The agent to list all intents for. - * Format: `projects//locations//agents/`. Please see - * {@see IntentsClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListIntentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to list all intents for. - * Format: `projects//locations//agents/`. - * @type string $language_code - * The language to list intents for. The following fields are language - * dependent: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * are supported. - * Note: languages must be enabled in the agent before they can be used. - * @type int $intent_view - * The resource view to apply to the returned intent. - * @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\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to list all intents for. - * Format: `projects//locations//agents/`. - * - * 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 for. - * Format: `projects//locations//agents/`. - * - * 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 language to list intents for. The following fields are language - * dependent: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to list intents for. The following fields are language - * dependent: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentView intent_view = 5; - * @return int - */ - public function getIntentView() - { - return $this->intent_view; - } - - /** - * The resource view to apply to the returned intent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentView intent_view = 5; - * @param int $var - * @return $this - */ - public function setIntentView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\IntentView::class); - $this->intent_view = $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 = 3; - * @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 = 3; - * @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 = 4; - * @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 = 4; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsResponse.php deleted file mode 100644 index f76463fe6a8e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListIntentsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListIntentsResponse - */ -class ListIntentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of 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.cx.v3.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\Cx\V3\Intent>|\Google\Protobuf\Internal\RepeatedField $intents - * The list of 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\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * The list of 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.cx.v3.Intent intents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIntents() - { - return $this->intents; - } - - /** - * The list of 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.cx.v3.Intent intents = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Intent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIntents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesRequest.php deleted file mode 100644 index 87cae28c9915..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesRequest.php +++ /dev/null @@ -1,270 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListPagesRequest - */ -class ListPagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The flow to list all pages for. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The language to list pages for. The following fields are language - * dependent: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - /** - * 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; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous list request. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The flow to list all pages for. - * Format: - * `projects//locations//agents//flows/`. Please see - * {@see PagesClient::flowName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListPagesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The flow to list all pages for. - * Format: - * `projects//locations//agents//flows/`. - * @type string $language_code - * The language to list pages for. The following fields are language - * dependent: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * are supported. - * Note: languages must be enabled in the agent before they can be used. - * @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\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Required. The flow to list all pages for. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 flow to list all pages for. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 language to list pages for. The following fields are language - * dependent: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to list pages for. The following fields are language - * dependent: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $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 = 3; - * @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 = 3; - * @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 = 4; - * @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 = 4; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesResponse.php deleted file mode 100644 index ba48419acca6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListPagesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListPagesResponse - */ -class ListPagesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of pages. 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.cx.v3.Page pages = 1; - */ - private $pages; - /** - * 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\Cx\V3\Page>|\Google\Protobuf\Internal\RepeatedField $pages - * The list of pages. 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\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * The list of pages. 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.cx.v3.Page pages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPages() - { - return $this->pages; - } - - /** - * The list of pages. 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.cx.v3.Page pages = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Page>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Page::class); - $this->pages = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsRequest.php deleted file mode 100644 index 5daac5e980c9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest - */ -class ListSecuritySettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location to list all security settings 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 20 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 = ''; - - /** - * @param string $parent Required. The location to list all security settings for. - * Format: `projects//locations/`. Please see - * {@see SecuritySettingsServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListSecuritySettingsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location to list all security settings for. - * Format: `projects//locations/`. - * @type int $page_size - * The maximum number of items to return in a single page. By default 20 and - * at most 100. - * @type string $page_token - * The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location to list all security settings 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 location to list all security settings 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 20 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 20 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsResponse.php deleted file mode 100644 index 082da9d41a95..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSecuritySettingsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse - */ -class ListSecuritySettingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of security settings. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1; - */ - private $security_settings; - /** - * 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\Cx\V3\SecuritySettings>|\Google\Protobuf\Internal\RepeatedField $security_settings - * The list of security settings. - * @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\Cx\V3\SecuritySettings::initOnce(); - parent::__construct($data); - } - - /** - * The list of security settings. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecuritySettings() - { - return $this->security_settings; - } - - /** - * The list of security settings. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecuritySettings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::class); - $this->security_settings = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesRequest.php deleted file mode 100644 index ca21e06cb693..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest - */ -class ListSessionEntityTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The session to list all session entity types from. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * - * 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 = ''; - - /** - * @param string $parent Required. The session to list all session entity types from. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. Please see - * {@see SessionEntityTypesClient::sessionName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListSessionEntityTypesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The session to list all session entity types from. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * @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\Cx\V3\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The session to list all session entity types from. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default '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 session to list all session entity types from. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default '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; - } - - /** - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesResponse.php deleted file mode 100644 index d351954ac8d6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListSessionEntityTypesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.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.cx.v3.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\Cx\V3\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\Cx\V3\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.cx.v3.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.cx.v3.SessionEntityType session_entity_types = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSessionEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsRequest.php deleted file mode 100644 index aee87cbefeb2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsRequest.php +++ /dev/null @@ -1,280 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest - */ -class ListTestCaseResultsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The test case to list results for. - * Format: - * `projects//locations//agents//testCases/`. - * Specify a `-` as a wildcard for TestCase ID to - * list results across multiple test cases. - * - * 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 = ''; - /** - * The filter expression used to filter test case results. See - * [API Filtering](https://aip.dev/160). - * The expression is case insensitive. Only 'AND' is supported for logical - * operators. The supported syntax is listed below in detail: - * [AND ] ... - * [AND latest] - * The supported fields and operators are: - * field operator - * `environment` `=`, `IN` (Use value `draft` for draft environment) - * `test_time` `>`, `<` - * `latest` only returns the latest test result in all results for each test - * case. - * Examples: - * * "environment=draft AND latest" matches the latest test result for each - * test case in the draft environment. - * * "environment IN (e1,e2)" matches any test case results with an - * environment resource name of either "e1" or "e2". - * * "test_time > 1602540713" matches any test case results with test time - * later than a unix timestamp in seconds 1602540713. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The test case to list results for. - * Format: - * `projects//locations//agents//testCases/`. - * Specify a `-` as a wildcard for TestCase ID to - * list results across multiple test cases. Please see - * {@see TestCasesClient::testCaseName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListTestCaseResultsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The test case to list results for. - * Format: - * `projects//locations//agents//testCases/`. - * Specify a `-` as a wildcard for TestCase ID to - * list results across multiple test cases. - * @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. - * @type string $filter - * The filter expression used to filter test case results. See - * [API Filtering](https://aip.dev/160). - * The expression is case insensitive. Only 'AND' is supported for logical - * operators. The supported syntax is listed below in detail: - * [AND ] ... - * [AND latest] - * The supported fields and operators are: - * field operator - * `environment` `=`, `IN` (Use value `draft` for draft environment) - * `test_time` `>`, `<` - * `latest` only returns the latest test result in all results for each test - * case. - * Examples: - * * "environment=draft AND latest" matches the latest test result for each - * test case in the draft environment. - * * "environment IN (e1,e2)" matches any test case results with an - * environment resource name of either "e1" or "e2". - * * "test_time > 1602540713" matches any test case results with test time - * later than a unix timestamp in seconds 1602540713. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The test case to list results for. - * Format: - * `projects//locations//agents//testCases/`. - * Specify a `-` as a wildcard for TestCase ID to - * list results across multiple test cases. - * - * 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 test case to list results for. - * Format: - * `projects//locations//agents//testCases/`. - * Specify a `-` as a wildcard for TestCase ID to - * list results across multiple test cases. - * - * 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; - } - - /** - * The filter expression used to filter test case results. See - * [API Filtering](https://aip.dev/160). - * The expression is case insensitive. Only 'AND' is supported for logical - * operators. The supported syntax is listed below in detail: - * [AND ] ... - * [AND latest] - * The supported fields and operators are: - * field operator - * `environment` `=`, `IN` (Use value `draft` for draft environment) - * `test_time` `>`, `<` - * `latest` only returns the latest test result in all results for each test - * case. - * Examples: - * * "environment=draft AND latest" matches the latest test result for each - * test case in the draft environment. - * * "environment IN (e1,e2)" matches any test case results with an - * environment resource name of either "e1" or "e2". - * * "test_time > 1602540713" matches any test case results with test time - * later than a unix timestamp in seconds 1602540713. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression used to filter test case results. See - * [API Filtering](https://aip.dev/160). - * The expression is case insensitive. Only 'AND' is supported for logical - * operators. The supported syntax is listed below in detail: - * [AND ] ... - * [AND latest] - * The supported fields and operators are: - * field operator - * `environment` `=`, `IN` (Use value `draft` for draft environment) - * `test_time` `>`, `<` - * `latest` only returns the latest test result in all results for each test - * case. - * Examples: - * * "environment=draft AND latest" matches the latest test result for each - * test case in the draft environment. - * * "environment IN (e1,e2)" matches any test case results with an - * environment resource name of either "e1" or "e2". - * * "test_time > 1602540713" matches any test case results with test time - * later than a unix timestamp in seconds 1602540713. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsResponse.php deleted file mode 100644 index ac6cc938e7db..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCaseResultsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse - */ -class ListTestCaseResultsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of test case results. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; - */ - private $test_case_results; - /** - * 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\Cx\V3\TestCaseResult>|\Google\Protobuf\Internal\RepeatedField $test_case_results - * The list of test case results. - * @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\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The list of test case results. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTestCaseResults() - { - return $this->test_case_results; - } - - /** - * The list of test case results. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestCaseResult test_case_results = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestCaseResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTestCaseResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult::class); - $this->test_case_results = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest.php deleted file mode 100644 index e9194713d6a2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListTestCasesRequest - */ -class ListTestCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to list all pages for. - * Format: `projects//locations//agents/`. - * - * 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 20. - * Note that when TestCaseView = FULL, the maximum page size allowed is 20. - * When TestCaseView = BASIC, the maximum page size allowed is 500. - * - * 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 = ''; - /** - * Specifies whether response should include all fields or just the metadata. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; - */ - protected $view = 0; - - /** - * @param string $parent Required. The agent to list all pages for. - * Format: `projects//locations//agents/`. Please see - * {@see TestCasesClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListTestCasesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to list all pages for. - * Format: `projects//locations//agents/`. - * @type int $page_size - * The maximum number of items to return in a single page. By default 20. - * Note that when TestCaseView = FULL, the maximum page size allowed is 20. - * When TestCaseView = BASIC, the maximum page size allowed is 500. - * @type string $page_token - * The next_page_token value returned from a previous list request. - * @type int $view - * Specifies whether response should include all fields or just the metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to list all pages for. - * Format: `projects//locations//agents/`. - * - * 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 pages for. - * Format: `projects//locations//agents/`. - * - * 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 20. - * Note that when TestCaseView = FULL, the maximum page size allowed is 20. - * When TestCaseView = BASIC, the maximum page size allowed is 500. - * - * 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 20. - * Note that when TestCaseView = FULL, the maximum page size allowed is 20. - * When TestCaseView = BASIC, the maximum page size allowed is 500. - * - * 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; - } - - /** - * Specifies whether response should include all fields or just the metadata. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Specifies whether response should include all fields or just the metadata. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView view = 4; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ListTestCasesRequest\TestCaseView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest/TestCaseView.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest/TestCaseView.php deleted file mode 100644 index d24c2b4605c8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesRequest/TestCaseView.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView - */ -class TestCaseView -{ - /** - * The default / unset value. - * The API will default to the BASIC view. - * - * Generated from protobuf enum TEST_CASE_VIEW_UNSPECIFIED = 0; - */ - const TEST_CASE_VIEW_UNSPECIFIED = 0; - /** - * Include basic metadata about the test case, but not the conversation - * turns. This is the default value. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::TEST_CASE_VIEW_UNSPECIFIED => 'TEST_CASE_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => '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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TestCaseView::class, \Google\Cloud\Dialogflow\Cx\V3\ListTestCasesRequest_TestCaseView::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesResponse.php deleted file mode 100644 index dd24de72146c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTestCasesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListTestCasesResponse - */ -class ListTestCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of test cases. 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.cx.v3.TestCase test_cases = 1; - */ - private $test_cases; - /** - * 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\Cx\V3\TestCase>|\Google\Protobuf\Internal\RepeatedField $test_cases - * The list of test cases. 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\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The list of test cases. 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.cx.v3.TestCase test_cases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTestCases() - { - return $this->test_cases; - } - - /** - * The list of test cases. 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.cx.v3.TestCase test_cases = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestCase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTestCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestCase::class); - $this->test_cases = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsRequest.php deleted file mode 100644 index 0b5f38ebce4e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest - */ -class ListTransitionRouteGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The flow to list all transition route groups for. - * Format: - * `projects//locations//agents//flows/` - * or `projects//locations//agents/. - * - * 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 = ''; - /** - * The language to list transition route groups for. The following fields are - * language dependent: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 4; - */ - protected $language_code = ''; - - /** - * @param string $parent Required. The flow to list all transition route groups for. - * Format: - * `projects//locations//agents//flows/` - * or `projects//locations//agents/. Please see - * {@see TransitionRouteGroupsClient::flowName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListTransitionRouteGroupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The flow to list all transition route groups for. - * Format: - * `projects//locations//agents//flows/` - * or `projects//locations//agents/. - * @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. - * @type string $language_code - * The language to list transition route groups for. The following fields are - * language dependent: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\TransitionRouteGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The flow to list all transition route groups for. - * Format: - * `projects//locations//agents//flows/` - * or `projects//locations//agents/. - * - * 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 flow to list all transition route groups for. - * Format: - * `projects//locations//agents//flows/` - * or `projects//locations//agents/. - * - * 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; - } - - /** - * The language to list transition route groups for. The following fields are - * language dependent: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 4; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to list transition route groups for. The following fields are - * language dependent: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsResponse.php deleted file mode 100644 index 1c41c06a2ade..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListTransitionRouteGroupsResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse - */ -class ListTransitionRouteGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of transition route groups. There will be a maximum number of - * items returned based on the page_size field in the request. The list may in - * some cases be empty or contain fewer entries than page_size even if this - * isn't the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_groups = 1; - */ - private $transition_route_groups; - /** - * 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\Cx\V3\TransitionRouteGroup>|\Google\Protobuf\Internal\RepeatedField $transition_route_groups - * The list of transition route groups. There will be a maximum number of - * items returned based on the page_size field in the request. The list may in - * some cases be empty or contain fewer entries than page_size even if this - * isn't the last page. - * @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\Cx\V3\TransitionRouteGroup::initOnce(); - parent::__construct($data); - } - - /** - * The list of transition route groups. There will be a maximum number of - * items returned based on the page_size field in the request. The list may in - * some cases be empty or contain fewer entries than page_size even if this - * isn't the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_groups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitionRouteGroups() - { - return $this->transition_route_groups; - } - - /** - * The list of transition route groups. There will be a maximum number of - * items returned based on the page_size field in the request. The list may in - * some cases be empty or contain fewer entries than page_size even if this - * isn't the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_groups = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitionRouteGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::class); - $this->transition_route_groups = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsRequest.php deleted file mode 100644 index 894d16df9940..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListVersionsRequest - */ -class ListVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all - * versions for. Format: - * `projects//locations//agents//flows/`. - * - * 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 20 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 = ''; - - /** - * @param string $parent Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all - * versions for. Format: - * `projects//locations//agents//flows/`. Please see - * {@see VersionsClient::flowName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListVersionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all - * versions for. Format: - * `projects//locations//agents//flows/`. - * @type int $page_size - * The maximum number of items to return in a single page. By default 20 and - * at most 100. - * @type string $page_token - * The next_page_token value returned from a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all - * versions for. Format: - * `projects//locations//agents//flows/`. - * - * 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 [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all - * versions for. Format: - * `projects//locations//agents//flows/`. - * - * 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 20 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 20 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsResponse.php deleted file mode 100644 index 88cbf3ca5a1a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListVersionsResponse.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListVersionsResponse - */ -class ListVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of versions. There will be a maximum number of items returned based - * on the page_size field in the request. The list may in some cases be empty - * or contain fewer entries than page_size even if this isn't the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.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\Cx\V3\Version>|\Google\Protobuf\Internal\RepeatedField $versions - * A list of versions. There will be a maximum number of items returned based - * on the page_size field in the request. The list may in some cases be empty - * or contain fewer entries than page_size even if this isn't the last page. - * @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\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * A list of versions. There will be a maximum number of items returned based - * on the page_size field in the request. The list may in some cases be empty - * or contain fewer entries than page_size even if this isn't the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Version versions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVersions() - { - return $this->versions; - } - - /** - * A list of versions. There will be a maximum number of items returned based - * on the page_size field in the request. The list may in some cases be empty - * or contain fewer entries than page_size even if this isn't the last page. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Version versions = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Version>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksRequest.php deleted file mode 100644 index 0c1dbafe4807..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListWebhooksRequest - */ -class ListWebhooksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to list all webhooks for. - * Format: `projects//locations//agents/`. - * - * 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 = ''; - - /** - * @param string $parent Required. The agent to list all webhooks for. - * Format: `projects//locations//agents/`. Please see - * {@see WebhooksClient::agentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\ListWebhooksRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The agent to list all webhooks for. - * Format: `projects//locations//agents/`. - * @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\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to list all webhooks for. - * Format: `projects//locations//agents/`. - * - * 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 webhooks for. - * Format: `projects//locations//agents/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksResponse.php deleted file mode 100644 index 18c66abb5833..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ListWebhooksResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.ListWebhooksResponse - */ -class ListWebhooksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of webhooks. 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.cx.v3.Webhook webhooks = 1; - */ - private $webhooks; - /** - * 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\Cx\V3\Webhook>|\Google\Protobuf\Internal\RepeatedField $webhooks - * The list of webhooks. 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\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * The list of webhooks. 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.cx.v3.Webhook webhooks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebhooks() - { - return $this->webhooks; - } - - /** - * The list of webhooks. 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.cx.v3.Webhook webhooks = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Webhook>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebhooks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Webhook::class); - $this->webhooks = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LoadVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LoadVersionRequest.php deleted file mode 100644 index d2566208a1f1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LoadVersionRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.dialogflow.cx.v3.LoadVersionRequest - */ -class LoadVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded - * to draft flow. Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * This field is used to prevent accidental overwrite of other agent - * resources, which can potentially impact other flow's behavior. If - * `allow_override_agent_resources` is false, conflicted agent-level resources - * will not be overridden (i.e. intents, entities, webhooks). - * - * Generated from protobuf field bool allow_override_agent_resources = 2; - */ - protected $allow_override_agent_resources = false; - - /** - * @param string $name Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded - * to draft flow. Format: - * `projects//locations//agents//flows//versions/`. Please see - * {@see VersionsClient::versionName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\LoadVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded - * to draft flow. Format: - * `projects//locations//agents//flows//versions/`. - * @type bool $allow_override_agent_resources - * This field is used to prevent accidental overwrite of other agent - * resources, which can potentially impact other flow's behavior. If - * `allow_override_agent_resources` is false, conflicted agent-level resources - * will not be overridden (i.e. intents, entities, webhooks). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded - * to draft flow. Format: - * `projects//locations//agents//flows//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 [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded - * to draft flow. Format: - * `projects//locations//agents//flows//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; - } - - /** - * This field is used to prevent accidental overwrite of other agent - * resources, which can potentially impact other flow's behavior. If - * `allow_override_agent_resources` is false, conflicted agent-level resources - * will not be overridden (i.e. intents, entities, webhooks). - * - * Generated from protobuf field bool allow_override_agent_resources = 2; - * @return bool - */ - public function getAllowOverrideAgentResources() - { - return $this->allow_override_agent_resources; - } - - /** - * This field is used to prevent accidental overwrite of other agent - * resources, which can potentially impact other flow's behavior. If - * `allow_override_agent_resources` is false, conflicted agent-level resources - * will not be overridden (i.e. intents, entities, webhooks). - * - * Generated from protobuf field bool allow_override_agent_resources = 2; - * @param bool $var - * @return $this - */ - public function setAllowOverrideAgentResources($var) - { - GPBUtil::checkBool($var); - $this->allow_override_agent_resources = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryRequest.php deleted file mode 100644 index 7e6f8f61c9be..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest - */ -class LookupEnvironmentHistoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the environment to look up the history for. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * 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 = ''; - - /** - * @param string $name Required. Resource name of the environment to look up the history for. - * Format: - * `projects//locations//agents//environments/`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\LookupEnvironmentHistoryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the environment to look up the history for. - * Format: - * `projects//locations//agents//environments/`. - * @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\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the environment to look up the history for. - * Format: - * `projects//locations//agents//environments/`. - * - * 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 name of the environment to look up the history for. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryResponse.php deleted file mode 100644 index 67b4ff65d562..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/LookupEnvironmentHistoryResponse.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse - */ -class LookupEnvironmentHistoryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Represents a list of snapshots for an environment. Time of the snapshots is - * stored in - * [`update_time`][google.cloud.dialogflow.cx.v3.Environment.update_time]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.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\Cx\V3\Environment>|\Google\Protobuf\Internal\RepeatedField $environments - * Represents a list of snapshots for an environment. Time of the snapshots is - * stored in - * [`update_time`][google.cloud.dialogflow.cx.v3.Environment.update_time]. - * @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\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Represents a list of snapshots for an environment. Time of the snapshots is - * stored in - * [`update_time`][google.cloud.dialogflow.cx.v3.Environment.update_time]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment environments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvironments() - { - return $this->environments; - } - - /** - * Represents a list of snapshots for an environment. Time of the snapshots is - * stored in - * [`update_time`][google.cloud.dialogflow.cx.v3.Environment.update_time]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Environment environments = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\Environment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvironments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentRequest.php deleted file mode 100644 index 73bdef19c36b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentRequest.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.dialogflow.cx.v3.MatchIntentRequest - */ -class MatchIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session this query is sent to. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * - * 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.cx.v3.QueryParameters query_params = 2; - */ - protected $query_params = null; - /** - * Required. The input specification. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query_input = null; - /** - * Persist session parameter changes from `query_params`. - * - * Generated from protobuf field bool persist_parameter_changes = 5; - */ - protected $persist_parameter_changes = false; - - /** - * 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//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * @type \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $query_params - * The parameters of this query. - * @type \Google\Cloud\Dialogflow\Cx\V3\QueryInput $query_input - * Required. The input specification. - * @type bool $persist_parameter_changes - * Persist session parameter changes from `query_params`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session this query is sent to. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * - * 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//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * - * 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.cx.v3.QueryParameters query_params = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.QueryParameters query_params = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $var - * @return $this - */ - public function setQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryParameters::class); - $this->query_params = $var; - - return $this; - } - - /** - * Required. The input specification. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\QueryInput $var - * @return $this - */ - public function setQueryInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryInput::class); - $this->query_input = $var; - - return $this; - } - - /** - * Persist session parameter changes from `query_params`. - * - * Generated from protobuf field bool persist_parameter_changes = 5; - * @return bool - */ - public function getPersistParameterChanges() - { - return $this->persist_parameter_changes; - } - - /** - * Persist session parameter changes from `query_params`. - * - * Generated from protobuf field bool persist_parameter_changes = 5; - * @param bool $var - * @return $this - */ - public function setPersistParameterChanges($var) - { - GPBUtil::checkBool($var); - $this->persist_parameter_changes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentResponse.php deleted file mode 100644 index 8333b7295a57..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/MatchIntentResponse.php +++ /dev/null @@ -1,282 +0,0 @@ -google.cloud.dialogflow.cx.v3.MatchIntentResponse - */ -class MatchIntentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Match results, if more than one, ordered descendingly by the confidence - * we have that the particular intent matches the query. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Match matches = 4; - */ - private $matches; - /** - * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 5; - */ - protected $current_page = null; - protected $query; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was - * provided as input, this field will contain a copy of the text. - * @type string $trigger_intent - * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as - * input, this field will contain a copy of the intent identifier. Format: - * `projects//locations//agents//intents/`. - * @type string $transcript - * If [natural language speech - * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, - * this field will contain the transcript for the audio. - * @type string $trigger_event - * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as - * input, this field will contain a copy of the event name. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\PBMatch>|\Google\Protobuf\Internal\RepeatedField $matches - * Match results, if more than one, ordered descendingly by the confidence - * we have that the particular intent matches the query. - * @type \Google\Cloud\Dialogflow\Cx\V3\Page $current_page - * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was - * provided as input, this field will contain a copy of the text. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->readOneof(1); - } - - public function hasText() - { - return $this->hasOneof(1); - } - - /** - * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was - * provided as input, this field will contain a copy of the text. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as - * input, this field will contain a copy of the intent identifier. Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string trigger_intent = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getTriggerIntent() - { - return $this->readOneof(2); - } - - public function hasTriggerIntent() - { - return $this->hasOneof(2); - } - - /** - * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as - * input, this field will contain a copy of the intent identifier. Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string trigger_intent = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTriggerIntent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * If [natural language speech - * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, - * this field will contain the transcript for the audio. - * - * Generated from protobuf field string transcript = 3; - * @return string - */ - public function getTranscript() - { - return $this->readOneof(3); - } - - public function hasTranscript() - { - return $this->hasOneof(3); - } - - /** - * If [natural language speech - * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, - * this field will contain the transcript for the audio. - * - * Generated from protobuf field string transcript = 3; - * @param string $var - * @return $this - */ - public function setTranscript($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as - * input, this field will contain a copy of the event name. - * - * Generated from protobuf field string trigger_event = 6; - * @return string - */ - public function getTriggerEvent() - { - return $this->readOneof(6); - } - - public function hasTriggerEvent() - { - return $this->hasOneof(6); - } - - /** - * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as - * input, this field will contain a copy of the event name. - * - * Generated from protobuf field string trigger_event = 6; - * @param string $var - * @return $this - */ - public function setTriggerEvent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Match results, if more than one, ordered descendingly by the confidence - * we have that the particular intent matches the query. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Match matches = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMatches() - { - return $this->matches; - } - - /** - * Match results, if more than one, ordered descendingly by the confidence - * we have that the particular intent matches the query. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.Match matches = 4; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\PBMatch>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMatches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\PBMatch::class); - $this->matches = $arr; - - return $this; - } - - /** - * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 5; - * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null - */ - public function getCurrentPage() - { - return $this->current_page; - } - - public function hasCurrentPage() - { - return isset($this->current_page); - } - - public function clearCurrentPage() - { - unset($this->current_page); - } - - /** - * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 5; - * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var - * @return $this - */ - public function setCurrentPage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); - $this->current_page = $var; - - return $this; - } - - /** - * @return string - */ - public function getQuery() - { - return $this->whichOneof("query"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings.php deleted file mode 100644 index 957b9d6e4d4c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.dialogflow.cx.v3.NluSettings - */ -class NluSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates the type of NLU model. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelType model_type = 1; - */ - protected $model_type = 0; - /** - * 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 no-match event 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. You can set a separate classification - * threshold for the flow in each language enabled for the agent. - * - * Generated from protobuf field float classification_threshold = 3; - */ - protected $classification_threshold = 0.0; - /** - * Indicates NLU model training mode. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode model_training_mode = 4; - */ - protected $model_training_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $model_type - * Indicates the type of NLU model. - * @type float $classification_threshold - * 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 no-match event 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. You can set a separate classification - * threshold for the flow in each language enabled for the agent. - * @type int $model_training_mode - * Indicates NLU model training mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Indicates the type of NLU model. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelType model_type = 1; - * @return int - */ - public function getModelType() - { - return $this->model_type; - } - - /** - * Indicates the type of NLU model. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelType model_type = 1; - * @param int $var - * @return $this - */ - public function setModelType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\NluSettings\ModelType::class); - $this->model_type = $var; - - return $this; - } - - /** - * 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 no-match event 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. You can set a separate classification - * threshold for the flow in each language enabled for the agent. - * - * Generated from protobuf field float classification_threshold = 3; - * @return float - */ - public function getClassificationThreshold() - { - return $this->classification_threshold; - } - - /** - * 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 no-match event 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. You can set a separate classification - * threshold for the flow in each language enabled for the agent. - * - * Generated from protobuf field float classification_threshold = 3; - * @param float $var - * @return $this - */ - public function setClassificationThreshold($var) - { - GPBUtil::checkFloat($var); - $this->classification_threshold = $var; - - return $this; - } - - /** - * Indicates NLU model training mode. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode model_training_mode = 4; - * @return int - */ - public function getModelTrainingMode() - { - return $this->model_training_mode; - } - - /** - * Indicates NLU model training mode. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode model_training_mode = 4; - * @param int $var - * @return $this - */ - public function setModelTrainingMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\NluSettings\ModelTrainingMode::class); - $this->model_training_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelTrainingMode.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelTrainingMode.php deleted file mode 100644 index 7bcea3b95ea8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelTrainingMode.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode - */ -class ModelTrainingMode -{ - /** - * Not specified. `MODEL_TRAINING_MODE_AUTOMATIC` will be used. - * - * Generated from protobuf enum MODEL_TRAINING_MODE_UNSPECIFIED = 0; - */ - const MODEL_TRAINING_MODE_UNSPECIFIED = 0; - /** - * NLU model training is automatically triggered when a flow gets modified. - * User can also manually trigger model training in this mode. - * - * Generated from protobuf enum MODEL_TRAINING_MODE_AUTOMATIC = 1; - */ - const MODEL_TRAINING_MODE_AUTOMATIC = 1; - /** - * User needs to manually trigger NLU model training. Best for large flows - * whose models take long time to train. - * - * Generated from protobuf enum MODEL_TRAINING_MODE_MANUAL = 2; - */ - const MODEL_TRAINING_MODE_MANUAL = 2; - - private static $valueToName = [ - self::MODEL_TRAINING_MODE_UNSPECIFIED => 'MODEL_TRAINING_MODE_UNSPECIFIED', - self::MODEL_TRAINING_MODE_AUTOMATIC => 'MODEL_TRAINING_MODE_AUTOMATIC', - self::MODEL_TRAINING_MODE_MANUAL => 'MODEL_TRAINING_MODE_MANUAL', - ]; - - 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(ModelTrainingMode::class, \Google\Cloud\Dialogflow\Cx\V3\NluSettings_ModelTrainingMode::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelType.php deleted file mode 100644 index 989116bc5633..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/NluSettings/ModelType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.cx.v3.NluSettings.ModelType - */ -class ModelType -{ - /** - * Not specified. `MODEL_TYPE_STANDARD` will be used. - * - * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; - */ - const MODEL_TYPE_UNSPECIFIED = 0; - /** - * Use standard NLU model. - * - * Generated from protobuf enum MODEL_TYPE_STANDARD = 1; - */ - const MODEL_TYPE_STANDARD = 1; - /** - * Use advanced NLU model. - * - * Generated from protobuf enum MODEL_TYPE_ADVANCED = 3; - */ - const MODEL_TYPE_ADVANCED = 3; - - private static $valueToName = [ - self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', - self::MODEL_TYPE_STANDARD => 'MODEL_TYPE_STANDARD', - self::MODEL_TYPE_ADVANCED => 'MODEL_TYPE_ADVANCED', - ]; - - 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\Cx\V3\NluSettings_ModelType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioConfig.php deleted file mode 100644 index 168224ce7ecf..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioConfig.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.dialogflow.cx.v3.OutputAudioConfig - */ -class OutputAudioConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Audio encoding of the synthesized audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $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 = 2; - */ - protected $sample_rate_hertz = 0; - /** - * Optional. Configuration of how speech should be synthesized. - * If not specified, - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] - * is applied. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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 - * 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 \Google\Cloud\Dialogflow\Cx\V3\SynthesizeSpeechConfig $synthesize_speech_config - * Optional. Configuration of how speech should be synthesized. - * If not specified, - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] - * is applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. Audio encoding of the synthesized audio content. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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.cx.v3.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAudioEncoding($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioEncoding::class); - $this->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 = 2; - * @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 = 2; - * @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. - * If not specified, - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] - * is applied. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig synthesize_speech_config = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\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); - } - - /** - * Optional. Configuration of how speech should be synthesized. - * If not specified, - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] - * is applied. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig synthesize_speech_config = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\SynthesizeSpeechConfig $var - * @return $this - */ - public function setSynthesizeSpeechConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SynthesizeSpeechConfig::class); - $this->synthesize_speech_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioEncoding.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioEncoding.php deleted file mode 100644 index 996795c8626d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/OutputAudioEncoding.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.dialogflow.cx.v3.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. - * LINT: LEGACY_NAMES - * - * 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. - * LINT: LEGACY_NAMES - * - * 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; - /** - * 8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law. - * - * Generated from protobuf enum OUTPUT_AUDIO_ENCODING_ALAW = 6; - */ - const OUTPUT_AUDIO_ENCODING_ALAW = 6; - - 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', - self::OUTPUT_AUDIO_ENCODING_ALAW => 'OUTPUT_AUDIO_ENCODING_ALAW', - ]; - - 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch.php deleted file mode 100644 index f29581dfe795..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.dialogflow.cx.v3.Match - */ -class PBMatch extends \Google\Protobuf\Internal\Message -{ - /** - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. - * Some, not all fields are filled in this message, including but not limited - * to: `name` and `display_name`. Only filled for - * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 1; - */ - protected $intent = null; - /** - * The event that matched the query. Filled for - * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], - * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and - * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. - * - * Generated from protobuf field string event = 6; - */ - protected $event = ''; - /** - * The collection of parameters extracted from the query. - * 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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use parameter value. - * - * Generated from protobuf field .google.protobuf.Struct parameters = 2; - */ - protected $parameters = null; - /** - * Final text input which was matched during MatchIntent. This value can be - * different from original input sent in request because of spelling - * correction or other processing. - * - * Generated from protobuf field string resolved_input = 3; - */ - protected $resolved_input = ''; - /** - * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4; - */ - protected $match_type = 0; - /** - * The confidence of this match. 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. - * - * Generated from protobuf field float confidence = 5; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Intent $intent - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. - * Some, not all fields are filled in this message, including but not limited - * to: `name` and `display_name`. Only filled for - * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. - * @type string $event - * The event that matched the query. Filled for - * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], - * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and - * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. - * @type \Google\Protobuf\Struct $parameters - * The collection of parameters extracted from the query. - * 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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use parameter value. - * @type string $resolved_input - * Final text input which was matched during MatchIntent. This value can be - * different from original input sent in request because of spelling - * correction or other processing. - * @type int $match_type - * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. - * @type float $confidence - * The confidence of this match. 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. - * Some, not all fields are filled in this message, including but not limited - * to: `name` and `display_name`. Only filled for - * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\Intent|null - */ - public function getIntent() - { - return $this->intent; - } - - public function hasIntent() - { - return isset($this->intent); - } - - public function clearIntent() - { - unset($this->intent); - } - - /** - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. - * Some, not all fields are filled in this message, including but not limited - * to: `name` and `display_name`. Only filled for - * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Intent::class); - $this->intent = $var; - - return $this; - } - - /** - * The event that matched the query. Filled for - * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], - * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and - * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. - * - * Generated from protobuf field string event = 6; - * @return string - */ - public function getEvent() - { - return $this->event; - } - - /** - * The event that matched the query. Filled for - * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], - * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and - * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. - * - * Generated from protobuf field string event = 6; - * @param string $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkString($var, True); - $this->event = $var; - - return $this; - } - - /** - * The collection of parameters extracted from the query. - * 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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use 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 extracted from the query. - * 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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use 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; - } - - /** - * Final text input which was matched during MatchIntent. This value can be - * different from original input sent in request because of spelling - * correction or other processing. - * - * Generated from protobuf field string resolved_input = 3; - * @return string - */ - public function getResolvedInput() - { - return $this->resolved_input; - } - - /** - * Final text input which was matched during MatchIntent. This value can be - * different from original input sent in request because of spelling - * correction or other processing. - * - * Generated from protobuf field string resolved_input = 3; - * @param string $var - * @return $this - */ - public function setResolvedInput($var) - { - GPBUtil::checkString($var, True); - $this->resolved_input = $var; - - return $this; - } - - /** - * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4; - * @return int - */ - public function getMatchType() - { - return $this->match_type; - } - - /** - * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4; - * @param int $var - * @return $this - */ - public function setMatchType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\PBMatch\MatchType::class); - $this->match_type = $var; - - return $this; - } - - /** - * The confidence of this match. 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. - * - * Generated from protobuf field float confidence = 5; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The confidence of this match. 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. - * - * Generated from protobuf field float confidence = 5; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch/MatchType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch/MatchType.php deleted file mode 100644 index 313e9941be89..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PBMatch/MatchType.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.dialogflow.cx.v3.Match.MatchType - */ -class MatchType -{ - /** - * Not specified. Should never be used. - * - * Generated from protobuf enum MATCH_TYPE_UNSPECIFIED = 0; - */ - const MATCH_TYPE_UNSPECIFIED = 0; - /** - * The query was matched to an intent. - * - * Generated from protobuf enum INTENT = 1; - */ - const INTENT = 1; - /** - * The query directly triggered an intent. - * - * Generated from protobuf enum DIRECT_INTENT = 2; - */ - const DIRECT_INTENT = 2; - /** - * The query was used for parameter filling. - * - * Generated from protobuf enum PARAMETER_FILLING = 3; - */ - const PARAMETER_FILLING = 3; - /** - * No match was found for the query. - * - * Generated from protobuf enum NO_MATCH = 4; - */ - const NO_MATCH = 4; - /** - * Indicates an empty query. - * - * Generated from protobuf enum NO_INPUT = 5; - */ - const NO_INPUT = 5; - /** - * The query directly triggered an event. - * - * Generated from protobuf enum EVENT = 6; - */ - const EVENT = 6; - /** - * The query was matched to a Knowledge Connector answer. - * - * Generated from protobuf enum KNOWLEDGE_CONNECTOR = 8; - */ - const KNOWLEDGE_CONNECTOR = 8; - /** - * The query was handled by a - * [`Playbook`][google.cloud.dialogflow.cx.v3.Playbook]. - * - * Generated from protobuf enum PLAYBOOK = 9; - */ - const PLAYBOOK = 9; - - private static $valueToName = [ - self::MATCH_TYPE_UNSPECIFIED => 'MATCH_TYPE_UNSPECIFIED', - self::INTENT => 'INTENT', - self::DIRECT_INTENT => 'DIRECT_INTENT', - self::PARAMETER_FILLING => 'PARAMETER_FILLING', - self::NO_MATCH => 'NO_MATCH', - self::NO_INPUT => 'NO_INPUT', - self::EVENT => 'EVENT', - self::KNOWLEDGE_CONNECTOR => 'KNOWLEDGE_CONNECTOR', - self::PLAYBOOK => 'PLAYBOOK', - ]; - - 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(MatchType::class, \Google\Cloud\Dialogflow\Cx\V3\Match_MatchType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Page.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Page.php deleted file mode 100644 index ec08891a127f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Page.php +++ /dev/null @@ -1,593 +0,0 @@ -google.cloud.dialogflow.cx.v3.Page - */ -class Page extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the page. - * Required for the - * [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage] method. - * [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage] - * populates the name automatically. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the page, unique within the flow. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * The description of the page. The maximum length is 500 characters. - * - * Generated from protobuf field string description = 19; - */ - protected $description = ''; - /** - * The fulfillment to call when the session is entering the page. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment entry_fulfillment = 7; - */ - protected $entry_fulfillment = null; - /** - * The form associated with the page, used for collecting parameters - * relevant to the page. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form form = 4; - */ - protected $form = null; - /** - * Ordered list of - * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * added to the page. Transition route groups must be unique within a page. If - * the page links both flow-level transition route groups and agent-level - * transition route groups, the flow-level ones will have higher priority and - * will be put before the agent-level ones. - * * If multiple transition routes within a page scope refer to the same - * intent, then the precedence order is: page's transition route -> page's - * transition route group -> flow's transition routes. - * * If multiple transition route groups within a page contain the same - * intent, then the first group in the ordered list takes precedence. - * Format:`projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/` - * for agent-level groups. - * - * Generated from protobuf field repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { - */ - private $transition_route_groups; - /** - * A list of transitions for the transition rules of this page. - * They route the conversation to another page in the same flow, or another - * flow. - * When we are in a certain page, the TransitionRoutes are evaluated in the - * following order: - * * TransitionRoutes defined in the page with intent specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] - * with intent specified. - * * TransitionRoutes defined in flow with intent specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] - * with intent specified. - * * TransitionRoutes defined in the page with only condition specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] - * with only condition specified. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; - */ - private $transition_routes; - /** - * Handlers associated with the page to handle events such as webhook errors, - * no match or no input. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; - */ - private $event_handlers; - /** - * Hierarchical advanced settings for this page. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 13; - */ - protected $advanced_settings = null; - /** - * Optional. Knowledge connector configuration. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $knowledge_connector_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the page. - * Required for the - * [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage] method. - * [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage] - * populates the name automatically. - * Format: - * `projects//locations//agents//flows//pages/`. - * @type string $display_name - * Required. The human-readable name of the page, unique within the flow. - * @type string $description - * The description of the page. The maximum length is 500 characters. - * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $entry_fulfillment - * The fulfillment to call when the session is entering the page. - * @type \Google\Cloud\Dialogflow\Cx\V3\Form $form - * The form associated with the page, used for collecting parameters - * relevant to the page. - * @type array|\Google\Protobuf\Internal\RepeatedField $transition_route_groups - * Ordered list of - * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * added to the page. Transition route groups must be unique within a page. If - * the page links both flow-level transition route groups and agent-level - * transition route groups, the flow-level ones will have higher priority and - * will be put before the agent-level ones. - * * If multiple transition routes within a page scope refer to the same - * intent, then the precedence order is: page's transition route -> page's - * transition route group -> flow's transition routes. - * * If multiple transition route groups within a page contain the same - * intent, then the first group in the ordered list takes precedence. - * Format:`projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/` - * for agent-level groups. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $transition_routes - * A list of transitions for the transition rules of this page. - * They route the conversation to another page in the same flow, or another - * flow. - * When we are in a certain page, the TransitionRoutes are evaluated in the - * following order: - * * TransitionRoutes defined in the page with intent specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] - * with intent specified. - * * TransitionRoutes defined in flow with intent specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] - * with intent specified. - * * TransitionRoutes defined in the page with only condition specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] - * with only condition specified. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $event_handlers - * Handlers associated with the page to handle events such as webhook errors, - * no match or no input. - * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings - * Hierarchical advanced settings for this page. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * @type \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings $knowledge_connector_settings - * Optional. Knowledge connector configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the page. - * Required for the - * [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage] method. - * [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage] - * populates the name automatically. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the page. - * Required for the - * [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage] method. - * [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage] - * populates the name automatically. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * 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 human-readable name of the page, unique within the flow. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the page, unique within the flow. - * - * 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; - } - - /** - * The description of the page. The maximum length is 500 characters. - * - * Generated from protobuf field string description = 19; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the page. The maximum length is 500 characters. - * - * Generated from protobuf field string description = 19; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The fulfillment to call when the session is entering the page. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment entry_fulfillment = 7; - * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment|null - */ - public function getEntryFulfillment() - { - return $this->entry_fulfillment; - } - - public function hasEntryFulfillment() - { - return isset($this->entry_fulfillment); - } - - public function clearEntryFulfillment() - { - unset($this->entry_fulfillment); - } - - /** - * The fulfillment to call when the session is entering the page. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment entry_fulfillment = 7; - * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var - * @return $this - */ - public function setEntryFulfillment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); - $this->entry_fulfillment = $var; - - return $this; - } - - /** - * The form associated with the page, used for collecting parameters - * relevant to the page. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form form = 4; - * @return \Google\Cloud\Dialogflow\Cx\V3\Form|null - */ - public function getForm() - { - return $this->form; - } - - public function hasForm() - { - return isset($this->form); - } - - public function clearForm() - { - unset($this->form); - } - - /** - * The form associated with the page, used for collecting parameters - * relevant to the page. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Form form = 4; - * @param \Google\Cloud\Dialogflow\Cx\V3\Form $var - * @return $this - */ - public function setForm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Form::class); - $this->form = $var; - - return $this; - } - - /** - * Ordered list of - * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * added to the page. Transition route groups must be unique within a page. If - * the page links both flow-level transition route groups and agent-level - * transition route groups, the flow-level ones will have higher priority and - * will be put before the agent-level ones. - * * If multiple transition routes within a page scope refer to the same - * intent, then the precedence order is: page's transition route -> page's - * transition route group -> flow's transition routes. - * * If multiple transition route groups within a page contain the same - * intent, then the first group in the ordered list takes precedence. - * Format:`projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/` - * for agent-level groups. - * - * Generated from protobuf field repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitionRouteGroups() - { - return $this->transition_route_groups; - } - - /** - * Ordered list of - * [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * added to the page. Transition route groups must be unique within a page. If - * the page links both flow-level transition route groups and agent-level - * transition route groups, the flow-level ones will have higher priority and - * will be put before the agent-level ones. - * * If multiple transition routes within a page scope refer to the same - * intent, then the precedence order is: page's transition route -> page's - * transition route group -> flow's transition routes. - * * If multiple transition route groups within a page contain the same - * intent, then the first group in the ordered list takes precedence. - * Format:`projects//locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/` - * for agent-level groups. - * - * Generated from protobuf field repeated string transition_route_groups = 11 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitionRouteGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->transition_route_groups = $arr; - - return $this; - } - - /** - * A list of transitions for the transition rules of this page. - * They route the conversation to another page in the same flow, or another - * flow. - * When we are in a certain page, the TransitionRoutes are evaluated in the - * following order: - * * TransitionRoutes defined in the page with intent specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] - * with intent specified. - * * TransitionRoutes defined in flow with intent specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] - * with intent specified. - * * TransitionRoutes defined in the page with only condition specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] - * with only condition specified. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitionRoutes() - { - return $this->transition_routes; - } - - /** - * A list of transitions for the transition rules of this page. - * They route the conversation to another page in the same flow, or another - * flow. - * When we are in a certain page, the TransitionRoutes are evaluated in the - * following order: - * * TransitionRoutes defined in the page with intent specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] - * with intent specified. - * * TransitionRoutes defined in flow with intent specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] - * with intent specified. - * * TransitionRoutes defined in the page with only condition specified. - * * TransitionRoutes defined in the - * [transition route - * groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] - * with only condition specified. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 9; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitionRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute::class); - $this->transition_routes = $arr; - - return $this; - } - - /** - * Handlers associated with the page to handle events such as webhook errors, - * no match or no input. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventHandlers() - { - return $this->event_handlers; - } - - /** - * Handlers associated with the page to handle events such as webhook errors, - * no match or no input. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\EventHandler>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventHandlers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\EventHandler::class); - $this->event_handlers = $arr; - - return $this; - } - - /** - * Hierarchical advanced settings for this page. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 13; - * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null - */ - public function getAdvancedSettings() - { - return $this->advanced_settings; - } - - public function hasAdvancedSettings() - { - return isset($this->advanced_settings); - } - - public function clearAdvancedSettings() - { - unset($this->advanced_settings); - } - - /** - * Hierarchical advanced settings for this page. The settings exposed at the - * lower level overrides the settings exposed at the higher level. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 13; - * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var - * @return $this - */ - public function setAdvancedSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); - $this->advanced_settings = $var; - - return $this; - } - - /** - * Optional. Knowledge connector configuration. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings|null - */ - public function getKnowledgeConnectorSettings() - { - return $this->knowledge_connector_settings; - } - - public function hasKnowledgeConnectorSettings() - { - return isset($this->knowledge_connector_settings); - } - - public function clearKnowledgeConnectorSettings() - { - unset($this->knowledge_connector_settings); - } - - /** - * Optional. Knowledge connector configuration. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings knowledge_connector_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings $var - * @return $this - */ - public function setKnowledgeConnectorSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\KnowledgeConnectorSettings::class); - $this->knowledge_connector_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo.php deleted file mode 100644 index e2d569fa7233..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.dialogflow.cx.v3.PageInfo - */ -class PageInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * unique identifier of the current page. Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string current_page = 1 [(.google.api.resource_reference) = { - */ - protected $current_page = ''; - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * display name of the current page. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Information about the form. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo form_info = 3; - */ - protected $form_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $current_page - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * unique identifier of the current page. Format: - * `projects//locations//agents//flows//pages/`. - * @type string $display_name - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * display name of the current page. - * @type \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo $form_info - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Information about the form. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * unique identifier of the current page. Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string current_page = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getCurrentPage() - { - return $this->current_page; - } - - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * unique identifier of the current page. Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string current_page = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCurrentPage($var) - { - GPBUtil::checkString($var, True); - $this->current_page = $var; - - return $this; - } - - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * display name of the current page. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * display name of the current page. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Information about the form. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo form_info = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo|null - */ - public function getFormInfo() - { - return $this->form_info; - } - - public function hasFormInfo() - { - return isset($this->form_info); - } - - public function clearFormInfo() - { - unset($this->form_info); - } - - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Information about the form. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo form_info = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo $var - * @return $this - */ - public function setFormInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo::class); - $this->form_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo.php deleted file mode 100644 index 2c66c6495bd4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - */ -class FormInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * parameters contained in the form. Note that the webhook cannot add or - * remove any form parameter. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo parameter_info = 2; - */ - private $parameter_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo\ParameterInfo>|\Google\Protobuf\Internal\RepeatedField $parameter_info - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * parameters contained in the form. Note that the webhook cannot add or - * remove any form parameter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * parameters contained in the form. Note that the webhook cannot add or - * remove any form parameter. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo parameter_info = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParameterInfo() - { - return $this->parameter_info; - } - - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * parameters contained in the form. Note that the webhook cannot add or - * remove any form parameter. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo parameter_info = 2; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo\ParameterInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParameterInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo\ParameterInfo::class); - $this->parameter_info = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FormInfo::class, \Google\Cloud\Dialogflow\Cx\V3\PageInfo_FormInfo::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo.php deleted file mode 100644 index cea8c45abfd7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo.php +++ /dev/null @@ -1,316 +0,0 @@ -google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - */ -class ParameterInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. - * Required for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * The human-readable name of the parameter, unique within the form. This - * field cannot be modified by the webhook. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Indicates whether the parameter is required. Optional parameters will - * not trigger prompts; however, they are filled if the user specifies - * them. Required parameters must be filled before form filling concludes. - * - * Generated from protobuf field bool required = 2; - */ - protected $required = false; - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. - * Required for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * state of the parameter. This field can be set to - * [INVALID][google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID] - * by the webhook to invalidate the parameter; other values set by the - * webhook will be ignored. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState state = 3; - */ - protected $state = 0; - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * value of the parameter. This field can be set by the webhook to change - * the parameter value. - * - * Generated from protobuf field .google.protobuf.Value value = 4; - */ - protected $value = null; - /** - * Optional for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored - * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Indicates if the parameter value was just collected on the last - * conversation turn. - * - * Generated from protobuf field bool just_collected = 5; - */ - protected $just_collected = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. - * Required for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * The human-readable name of the parameter, unique within the form. This - * field cannot be modified by the webhook. - * @type bool $required - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Indicates whether the parameter is required. Optional parameters will - * not trigger prompts; however, they are filled if the user specifies - * them. Required parameters must be filled before form filling concludes. - * @type int $state - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. - * Required for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * state of the parameter. This field can be set to - * [INVALID][google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID] - * by the webhook to invalidate the parameter; other values set by the - * webhook will be ignored. - * @type \Google\Protobuf\Value $value - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * value of the parameter. This field can be set by the webhook to change - * the parameter value. - * @type bool $just_collected - * Optional for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored - * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Indicates if the parameter value was just collected on the last - * conversation turn. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. - * Required for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * The human-readable name of the parameter, unique within the form. This - * field cannot be modified by the webhook. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. - * Required for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * The human-readable name of the parameter, unique within the form. This - * field cannot be modified by the webhook. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Indicates whether the parameter is required. Optional parameters will - * not trigger prompts; however, they are filled if the user specifies - * them. Required parameters must be filled before form filling concludes. - * - * Generated from protobuf field bool required = 2; - * @return bool - */ - public function getRequired() - { - return $this->required; - } - - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Indicates whether the parameter is required. Optional parameters will - * not trigger prompts; however, they are filled if the user specifies - * them. Required parameters must be filled before form filling concludes. - * - * Generated from protobuf field bool required = 2; - * @param bool $var - * @return $this - */ - public function setRequired($var) - { - GPBUtil::checkBool($var); - $this->required = $var; - - return $this; - } - - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. - * Required for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * state of the parameter. This field can be set to - * [INVALID][google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID] - * by the webhook to invalidate the parameter; other values set by the - * webhook will be ignored. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. - * Required for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * state of the parameter. This field can be set to - * [INVALID][google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID] - * by the webhook to invalidate the parameter; other values set by the - * webhook will be ignored. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\PageInfo\FormInfo\ParameterInfo\ParameterState::class); - $this->state = $var; - - return $this; - } - - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * value of the parameter. This field can be set by the webhook to change - * the parameter value. - * - * Generated from protobuf field .google.protobuf.Value value = 4; - * @return \Google\Protobuf\Value|null - */ - public function getValue() - { - return $this->value; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * Optional for both - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * value of the parameter. This field can be set by the webhook to change - * the parameter value. - * - * Generated from protobuf field .google.protobuf.Value value = 4; - * @param \Google\Protobuf\Value $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); - $this->value = $var; - - return $this; - } - - /** - * Optional for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored - * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Indicates if the parameter value was just collected on the last - * conversation turn. - * - * Generated from protobuf field bool just_collected = 5; - * @return bool - */ - public function getJustCollected() - { - return $this->just_collected; - } - - /** - * Optional for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored - * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * Indicates if the parameter value was just collected on the last - * conversation turn. - * - * Generated from protobuf field bool just_collected = 5; - * @param bool $var - * @return $this - */ - public function setJustCollected($var) - { - GPBUtil::checkBool($var); - $this->just_collected = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ParameterInfo::class, \Google\Cloud\Dialogflow\Cx\V3\PageInfo_FormInfo_ParameterInfo::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo/ParameterState.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo/ParameterState.php deleted file mode 100644 index 52170391742b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/PageInfo/FormInfo/ParameterInfo/ParameterState.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState - */ -class ParameterState -{ - /** - * Not specified. This value should be never used. - * - * Generated from protobuf enum PARAMETER_STATE_UNSPECIFIED = 0; - */ - const PARAMETER_STATE_UNSPECIFIED = 0; - /** - * Indicates that the parameter does not have a value. - * - * Generated from protobuf enum EMPTY = 1; - */ - const PBEMPTY = 1; - /** - * Indicates that the parameter value is invalid. This field can be used - * by the webhook to invalidate the parameter and ask the server to - * collect it from the user again. - * - * Generated from protobuf enum INVALID = 2; - */ - const INVALID = 2; - /** - * Indicates that the parameter has a value. - * - * Generated from protobuf enum FILLED = 3; - */ - const FILLED = 3; - - private static $valueToName = [ - self::PARAMETER_STATE_UNSPECIFIED => 'PARAMETER_STATE_UNSPECIFIED', - self::PBEMPTY => 'EMPTY', - self::INVALID => 'INVALID', - self::FILLED => 'FILLED', - ]; - - 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(ParameterState::class, \Google\Cloud\Dialogflow\Cx\V3\PageInfo_FormInfo_ParameterInfo_ParameterState::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Phrase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Phrase.php deleted file mode 100644 index e5a15744098e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Phrase.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dialogflow.cx.v3.Phrase - */ -class Phrase extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Text input which can be used for prompt or banned phrases. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Required. Text input which can be used for prompt or banned phrases. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Generator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Text input which can be used for prompt or banned phrases. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Required. Text input which can be used for prompt or banned phrases. - * - * 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryInput.php deleted file mode 100644 index 3e09b697faa5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryInput.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.dialogflow.cx.v3.QueryInput - */ -class QueryInput extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The language of the input. See [Language - * Support](https://cloud.google.com/dialogflow/cx/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 = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $language_code = ''; - protected $input; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\TextInput $text - * The natural language text to be processed. - * @type \Google\Cloud\Dialogflow\Cx\V3\IntentInput $intent - * The intent to be triggered. - * @type \Google\Cloud\Dialogflow\Cx\V3\AudioInput $audio - * The natural language speech audio to be processed. - * @type \Google\Cloud\Dialogflow\Cx\V3\EventInput $event - * The event to be triggered. - * @type \Google\Cloud\Dialogflow\Cx\V3\DtmfInput $dtmf - * The DTMF event to be handled. - * @type \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult $tool_call_result - * The results of a tool executed by the client. - * @type string $language_code - * Required. The language of the input. See [Language - * Support](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * The natural language text to be processed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TextInput text = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\TextInput|null - */ - public function getText() - { - return $this->readOneof(2); - } - - public function hasText() - { - return $this->hasOneof(2); - } - - /** - * The natural language text to be processed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TextInput text = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\TextInput $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TextInput::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The intent to be triggered. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentInput intent = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\IntentInput|null - */ - public function getIntent() - { - return $this->readOneof(3); - } - - public function hasIntent() - { - return $this->hasOneof(3); - } - - /** - * The intent to be triggered. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.IntentInput intent = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\IntentInput $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\IntentInput::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The natural language speech audio to be processed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AudioInput audio = 5; - * @return \Google\Cloud\Dialogflow\Cx\V3\AudioInput|null - */ - public function getAudio() - { - return $this->readOneof(5); - } - - public function hasAudio() - { - return $this->hasOneof(5); - } - - /** - * The natural language speech audio to be processed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AudioInput audio = 5; - * @param \Google\Cloud\Dialogflow\Cx\V3\AudioInput $var - * @return $this - */ - public function setAudio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AudioInput::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The event to be triggered. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EventInput event = 6; - * @return \Google\Cloud\Dialogflow\Cx\V3\EventInput|null - */ - public function getEvent() - { - return $this->readOneof(6); - } - - public function hasEvent() - { - return $this->hasOneof(6); - } - - /** - * The event to be triggered. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EventInput event = 6; - * @param \Google\Cloud\Dialogflow\Cx\V3\EventInput $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\EventInput::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The DTMF event to be handled. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 7; - * @return \Google\Cloud\Dialogflow\Cx\V3\DtmfInput|null - */ - public function getDtmf() - { - return $this->readOneof(7); - } - - public function hasDtmf() - { - return $this->hasOneof(7); - } - - /** - * The DTMF event to be handled. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 7; - * @param \Google\Cloud\Dialogflow\Cx\V3\DtmfInput $var - * @return $this - */ - public function setDtmf($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DtmfInput::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * The results of a tool executed by the client. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; - * @return \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult|null - */ - public function getToolCallResult() - { - return $this->readOneof(11); - } - - public function hasToolCallResult() - { - return $this->hasOneof(11); - } - - /** - * The results of a tool executed by the client. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; - * @param \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult $var - * @return $this - */ - public function setToolCallResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ToolCallResult::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Required. The language of the input. See [Language - * Support](https://cloud.google.com/dialogflow/cx/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 = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Required. The language of the input. See [Language - * Support](https://cloud.google.com/dialogflow/cx/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 = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * @return string - */ - public function getInput() - { - return $this->whichOneof("input"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryParameters.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryParameters.php deleted file mode 100644 index 1bbcaa1d5f73..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryParameters.php +++ /dev/null @@ -1,1106 +0,0 @@ -google.cloud.dialogflow.cx.v3.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 the agent 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; - /** - * 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.cx.v3.SessionEntityType session_entity_types = 3; - */ - private $session_entity_types; - /** - * This field can be used to pass custom data into the webhook associated with - * the agent. Arbitrary JSON objects are supported. - * 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" - * } - * } - * ``` - * - * Generated from protobuf field .google.protobuf.Struct payload = 4; - */ - protected $payload = null; - /** - * Additional parameters to be put into [session - * parameters][SessionInfo.parameters]. To remove a - * parameter from the session, clients should explicitly set the parameter - * value to null. - * You can reference the session parameters in the agent with the following - * format: $session.params.parameter-id. - * 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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use parameter value. - * - * Generated from protobuf field .google.protobuf.Struct parameters = 5; - */ - protected $parameters = null; - /** - * Scope for the parameters. If not specified, parameters will be treated as - * session parameters. Parameters with custom scope will not be put into - * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. - * You can reference the parameters with custom scope in the agent with the - * following format: $parameter-scope.params.parameter-id. - * - * Generated from protobuf field string parameter_scope = 12; - */ - protected $parameter_scope = ''; - /** - * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to - * override the [current page][QueryResult.current_page] in the session. - * Format: - * `projects//locations//agents//flows//pages/`. - * If `current_page` is specified, the previous state of the session will be - * ignored by Dialogflow, including the [previous - * page][QueryResult.current_page] and the [previous session - * parameters][QueryResult.parameters]. - * In most cases, - * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page] - * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters] - * should be configured together to direct a session to a specific state. - * - * Generated from protobuf field string current_page = 6 [(.google.api.resource_reference) = { - */ - protected $current_page = ''; - /** - * Whether to disable webhook calls for this request. - * - * Generated from protobuf field bool disable_webhook = 7; - */ - protected $disable_webhook = false; - /** - * Configures whether sentiment analysis should be performed. If not - * provided, sentiment analysis is not performed. - * - * Generated from protobuf field bool analyze_query_text_sentiment = 8; - */ - protected $analyze_query_text_sentiment = false; - /** - * 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 Dialogflow web console. The headers defined - * within this field will overwrite the headers configured through 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 = 10; - */ - private $webhook_headers; - /** - * A list of flow versions to override for the request. - * Format: - * `projects//locations//agents//flows//versions/`. - * If version 1 of flow X is included in this list, the traffic of - * flow X will go through version 1 regardless of the version configuration in - * the environment. Each flow can have at most one version specified in this - * list. - * - * Generated from protobuf field repeated string flow_versions = 14 [(.google.api.resource_reference) = { - */ - private $flow_versions; - /** - * Optional. The unique identifier of the - * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the - * session with. If `current_playbook` is specified, the previous state of the - * session will be ignored by Dialogflow. - * Format: - * `projects//locations//agents//playbooks/`. - * - * Generated from protobuf field string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $current_playbook = ''; - /** - * Optional. Use the specified LLM model settings for processing the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $llm_model_settings = null; - /** - * The channel which this query is for. - * If specified, only the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] associated - * with the channel will be returned. If no - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] is - * associated with the channel, it falls back to the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with - * unspecified channel. - * If unspecified, the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with - * unspecified channel will be returned. - * - * Generated from protobuf field string channel = 15; - */ - protected $channel = ''; - /** - * Optional. Configure lifetime of the Dialogflow session. - * By default, a Dialogflow session remains active and its data is stored for - * 30 minutes after the last request is sent for the session. - * This value should be no longer than 1 day. - * - * Generated from protobuf field .google.protobuf.Duration session_ttl = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $session_ttl = null; - /** - * Optional. Information about the end-user to improve the relevance and - * accuracy of generative answers. - * This will be interpreted and used by a language model, so, for good - * results, the data should be self-descriptive, and in a simple structure. - * Example: - * ```json - * { - * "subscription plan": "Business Premium Plus", - * "devices owned": [ - * {"model": "Google Pixel 7"}, - * {"model": "Google Pixel Tablet"} - * ] - * } - * ``` - * - * Generated from protobuf field .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_user_metadata = null; - /** - * Optional. Search configuration for UCS search queries. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $search_config = null; - /** - * Optional. If set to true and data stores are involved in serving the - * request then - * DetectIntentResponse.query_result.data_store_connection_signals - * will be filled with data that can help evaluations. - * - * Generated from protobuf field bool populate_data_store_connection_signals = 25 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $populate_data_store_connection_signals = false; - - /** - * 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 the agent is - * used. - * @type \Google\Type\LatLng $geo_location - * The geo location of this conversational query. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\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 into the webhook associated with - * the agent. Arbitrary JSON objects are supported. - * 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" - * } - * } - * ``` - * @type \Google\Protobuf\Struct $parameters - * Additional parameters to be put into [session - * parameters][SessionInfo.parameters]. To remove a - * parameter from the session, clients should explicitly set the parameter - * value to null. - * You can reference the session parameters in the agent with the following - * format: $session.params.parameter-id. - * 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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use parameter value. - * @type string $parameter_scope - * Scope for the parameters. If not specified, parameters will be treated as - * session parameters. Parameters with custom scope will not be put into - * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. - * You can reference the parameters with custom scope in the agent with the - * following format: $parameter-scope.params.parameter-id. - * @type string $current_page - * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to - * override the [current page][QueryResult.current_page] in the session. - * Format: - * `projects//locations//agents//flows//pages/`. - * If `current_page` is specified, the previous state of the session will be - * ignored by Dialogflow, including the [previous - * page][QueryResult.current_page] and the [previous session - * parameters][QueryResult.parameters]. - * In most cases, - * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page] - * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters] - * should be configured together to direct a session to a specific state. - * @type bool $disable_webhook - * Whether to disable webhook calls for this request. - * @type bool $analyze_query_text_sentiment - * Configures whether sentiment analysis should be performed. 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 Dialogflow web console. The headers defined - * within this field will overwrite the headers configured through 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. - * @type array|\Google\Protobuf\Internal\RepeatedField $flow_versions - * A list of flow versions to override for the request. - * Format: - * `projects//locations//agents//flows//versions/`. - * If version 1 of flow X is included in this list, the traffic of - * flow X will go through version 1 regardless of the version configuration in - * the environment. Each flow can have at most one version specified in this - * list. - * @type string $current_playbook - * Optional. The unique identifier of the - * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the - * session with. If `current_playbook` is specified, the previous state of the - * session will be ignored by Dialogflow. - * Format: - * `projects//locations//agents//playbooks/`. - * @type \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $llm_model_settings - * Optional. Use the specified LLM model settings for processing the request. - * @type string $channel - * The channel which this query is for. - * If specified, only the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] associated - * with the channel will be returned. If no - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] is - * associated with the channel, it falls back to the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with - * unspecified channel. - * If unspecified, the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with - * unspecified channel will be returned. - * @type \Google\Protobuf\Duration $session_ttl - * Optional. Configure lifetime of the Dialogflow session. - * By default, a Dialogflow session remains active and its data is stored for - * 30 minutes after the last request is sent for the session. - * This value should be no longer than 1 day. - * @type \Google\Protobuf\Struct $end_user_metadata - * Optional. Information about the end-user to improve the relevance and - * accuracy of generative answers. - * This will be interpreted and used by a language model, so, for good - * results, the data should be self-descriptive, and in a simple structure. - * Example: - * ```json - * { - * "subscription plan": "Business Premium Plus", - * "devices owned": [ - * {"model": "Google Pixel 7"}, - * {"model": "Google Pixel Tablet"} - * ] - * } - * ``` - * @type \Google\Cloud\Dialogflow\Cx\V3\SearchConfig $search_config - * Optional. Search configuration for UCS search queries. - * @type bool $populate_data_store_connection_signals - * Optional. If set to true and data stores are involved in serving the - * request then - * DetectIntentResponse.query_result.data_store_connection_signals - * will be filled with data that can help evaluations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\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 the agent 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 the agent 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; - } - - /** - * 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.cx.v3.SessionEntityType session_entity_types = 3; - * @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.cx.v3.SessionEntityType session_entity_types = 3; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSessionEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::class); - $this->session_entity_types = $arr; - - return $this; - } - - /** - * This field can be used to pass custom data into the webhook associated with - * the agent. Arbitrary JSON objects are supported. - * 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" - * } - * } - * ``` - * - * 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); - } - - /** - * This field can be used to pass custom data into the webhook associated with - * the agent. Arbitrary JSON objects are supported. - * 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" - * } - * } - * ``` - * - * 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; - } - - /** - * Additional parameters to be put into [session - * parameters][SessionInfo.parameters]. To remove a - * parameter from the session, clients should explicitly set the parameter - * value to null. - * You can reference the session parameters in the agent with the following - * format: $session.params.parameter-id. - * 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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use parameter value. - * - * Generated from protobuf field .google.protobuf.Struct parameters = 5; - * @return \Google\Protobuf\Struct|null - */ - public function getParameters() - { - return $this->parameters; - } - - public function hasParameters() - { - return isset($this->parameters); - } - - public function clearParameters() - { - unset($this->parameters); - } - - /** - * Additional parameters to be put into [session - * parameters][SessionInfo.parameters]. To remove a - * parameter from the session, clients should explicitly set the parameter - * value to null. - * You can reference the session parameters in the agent with the following - * format: $session.params.parameter-id. - * 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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use parameter value. - * - * Generated from protobuf field .google.protobuf.Struct parameters = 5; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->parameters = $var; - - return $this; - } - - /** - * Scope for the parameters. If not specified, parameters will be treated as - * session parameters. Parameters with custom scope will not be put into - * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. - * You can reference the parameters with custom scope in the agent with the - * following format: $parameter-scope.params.parameter-id. - * - * Generated from protobuf field string parameter_scope = 12; - * @return string - */ - public function getParameterScope() - { - return $this->parameter_scope; - } - - /** - * Scope for the parameters. If not specified, parameters will be treated as - * session parameters. Parameters with custom scope will not be put into - * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. - * You can reference the parameters with custom scope in the agent with the - * following format: $parameter-scope.params.parameter-id. - * - * Generated from protobuf field string parameter_scope = 12; - * @param string $var - * @return $this - */ - public function setParameterScope($var) - { - GPBUtil::checkString($var, True); - $this->parameter_scope = $var; - - return $this; - } - - /** - * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to - * override the [current page][QueryResult.current_page] in the session. - * Format: - * `projects//locations//agents//flows//pages/`. - * If `current_page` is specified, the previous state of the session will be - * ignored by Dialogflow, including the [previous - * page][QueryResult.current_page] and the [previous session - * parameters][QueryResult.parameters]. - * In most cases, - * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page] - * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters] - * should be configured together to direct a session to a specific state. - * - * Generated from protobuf field string current_page = 6 [(.google.api.resource_reference) = { - * @return string - */ - public function getCurrentPage() - { - return $this->current_page; - } - - /** - * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to - * override the [current page][QueryResult.current_page] in the session. - * Format: - * `projects//locations//agents//flows//pages/`. - * If `current_page` is specified, the previous state of the session will be - * ignored by Dialogflow, including the [previous - * page][QueryResult.current_page] and the [previous session - * parameters][QueryResult.parameters]. - * In most cases, - * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page] - * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters] - * should be configured together to direct a session to a specific state. - * - * Generated from protobuf field string current_page = 6 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCurrentPage($var) - { - GPBUtil::checkString($var, True); - $this->current_page = $var; - - return $this; - } - - /** - * Whether to disable webhook calls for this request. - * - * Generated from protobuf field bool disable_webhook = 7; - * @return bool - */ - public function getDisableWebhook() - { - return $this->disable_webhook; - } - - /** - * Whether to disable webhook calls for this request. - * - * Generated from protobuf field bool disable_webhook = 7; - * @param bool $var - * @return $this - */ - public function setDisableWebhook($var) - { - GPBUtil::checkBool($var); - $this->disable_webhook = $var; - - return $this; - } - - /** - * Configures whether sentiment analysis should be performed. If not - * provided, sentiment analysis is not performed. - * - * Generated from protobuf field bool analyze_query_text_sentiment = 8; - * @return bool - */ - public function getAnalyzeQueryTextSentiment() - { - return $this->analyze_query_text_sentiment; - } - - /** - * Configures whether sentiment analysis should be performed. If not - * provided, sentiment analysis is not performed. - * - * Generated from protobuf field bool analyze_query_text_sentiment = 8; - * @param bool $var - * @return $this - */ - public function setAnalyzeQueryTextSentiment($var) - { - GPBUtil::checkBool($var); - $this->analyze_query_text_sentiment = $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 Dialogflow web console. The headers defined - * within this field will overwrite the headers configured through 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 = 10; - * @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 Dialogflow web console. The headers defined - * within this field will overwrite the headers configured through 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 = 10; - * @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; - } - - /** - * A list of flow versions to override for the request. - * Format: - * `projects//locations//agents//flows//versions/`. - * If version 1 of flow X is included in this list, the traffic of - * flow X will go through version 1 regardless of the version configuration in - * the environment. Each flow can have at most one version specified in this - * list. - * - * Generated from protobuf field repeated string flow_versions = 14 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFlowVersions() - { - return $this->flow_versions; - } - - /** - * A list of flow versions to override for the request. - * Format: - * `projects//locations//agents//flows//versions/`. - * If version 1 of flow X is included in this list, the traffic of - * flow X will go through version 1 regardless of the version configuration in - * the environment. Each flow can have at most one version specified in this - * list. - * - * Generated from protobuf field repeated string flow_versions = 14 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFlowVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->flow_versions = $arr; - - return $this; - } - - /** - * Optional. The unique identifier of the - * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the - * session with. If `current_playbook` is specified, the previous state of the - * session will be ignored by Dialogflow. - * Format: - * `projects//locations//agents//playbooks/`. - * - * Generated from protobuf field string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getCurrentPlaybook() - { - return $this->current_playbook; - } - - /** - * Optional. The unique identifier of the - * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the - * session with. If `current_playbook` is specified, the previous state of the - * session will be ignored by Dialogflow. - * Format: - * `projects//locations//agents//playbooks/`. - * - * Generated from protobuf field string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCurrentPlaybook($var) - { - GPBUtil::checkString($var, True); - $this->current_playbook = $var; - - return $this; - } - - /** - * Optional. Use the specified LLM model settings for processing the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings|null - */ - public function getLlmModelSettings() - { - return $this->llm_model_settings; - } - - public function hasLlmModelSettings() - { - return isset($this->llm_model_settings); - } - - public function clearLlmModelSettings() - { - unset($this->llm_model_settings); - } - - /** - * Optional. Use the specified LLM model settings for processing the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings $var - * @return $this - */ - public function setLlmModelSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LlmModelSettings::class); - $this->llm_model_settings = $var; - - return $this; - } - - /** - * The channel which this query is for. - * If specified, only the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] associated - * with the channel will be returned. If no - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] is - * associated with the channel, it falls back to the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with - * unspecified channel. - * If unspecified, the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with - * unspecified channel will be returned. - * - * Generated from protobuf field string channel = 15; - * @return string - */ - public function getChannel() - { - return $this->channel; - } - - /** - * The channel which this query is for. - * If specified, only the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] associated - * with the channel will be returned. If no - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] is - * associated with the channel, it falls back to the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with - * unspecified channel. - * If unspecified, the - * [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with - * unspecified channel will be returned. - * - * Generated from protobuf field string channel = 15; - * @param string $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkString($var, True); - $this->channel = $var; - - return $this; - } - - /** - * Optional. Configure lifetime of the Dialogflow session. - * By default, a Dialogflow session remains active and its data is stored for - * 30 minutes after the last request is sent for the session. - * This value should be no longer than 1 day. - * - * Generated from protobuf field .google.protobuf.Duration session_ttl = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getSessionTtl() - { - return $this->session_ttl; - } - - public function hasSessionTtl() - { - return isset($this->session_ttl); - } - - public function clearSessionTtl() - { - unset($this->session_ttl); - } - - /** - * Optional. Configure lifetime of the Dialogflow session. - * By default, a Dialogflow session remains active and its data is stored for - * 30 minutes after the last request is sent for the session. - * This value should be no longer than 1 day. - * - * Generated from protobuf field .google.protobuf.Duration session_ttl = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSessionTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->session_ttl = $var; - - return $this; - } - - /** - * Optional. Information about the end-user to improve the relevance and - * accuracy of generative answers. - * This will be interpreted and used by a language model, so, for good - * results, the data should be self-descriptive, and in a simple structure. - * Example: - * ```json - * { - * "subscription plan": "Business Premium Plus", - * "devices owned": [ - * {"model": "Google Pixel 7"}, - * {"model": "Google Pixel Tablet"} - * ] - * } - * ``` - * - * Generated from protobuf field .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getEndUserMetadata() - { - return $this->end_user_metadata; - } - - public function hasEndUserMetadata() - { - return isset($this->end_user_metadata); - } - - public function clearEndUserMetadata() - { - unset($this->end_user_metadata); - } - - /** - * Optional. Information about the end-user to improve the relevance and - * accuracy of generative answers. - * This will be interpreted and used by a language model, so, for good - * results, the data should be self-descriptive, and in a simple structure. - * Example: - * ```json - * { - * "subscription plan": "Business Premium Plus", - * "devices owned": [ - * {"model": "Google Pixel 7"}, - * {"model": "Google Pixel Tablet"} - * ] - * } - * ``` - * - * Generated from protobuf field .google.protobuf.Struct end_user_metadata = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setEndUserMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->end_user_metadata = $var; - - return $this; - } - - /** - * Optional. Search configuration for UCS search queries. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\SearchConfig|null - */ - public function getSearchConfig() - { - return $this->search_config; - } - - public function hasSearchConfig() - { - return isset($this->search_config); - } - - public function clearSearchConfig() - { - unset($this->search_config); - } - - /** - * Optional. Search configuration for UCS search queries. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SearchConfig search_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\SearchConfig $var - * @return $this - */ - public function setSearchConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SearchConfig::class); - $this->search_config = $var; - - return $this; - } - - /** - * Optional. If set to true and data stores are involved in serving the - * request then - * DetectIntentResponse.query_result.data_store_connection_signals - * will be filled with data that can help evaluations. - * - * Generated from protobuf field bool populate_data_store_connection_signals = 25 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return bool - * @deprecated - */ - public function getPopulateDataStoreConnectionSignals() - { - if ($this->populate_data_store_connection_signals !== false) { - @trigger_error('populate_data_store_connection_signals is deprecated.', E_USER_DEPRECATED); - } - return $this->populate_data_store_connection_signals; - } - - /** - * Optional. If set to true and data stores are involved in serving the - * request then - * DetectIntentResponse.query_result.data_store_connection_signals - * will be filled with data that can help evaluations. - * - * Generated from protobuf field bool populate_data_store_connection_signals = 25 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setPopulateDataStoreConnectionSignals($var) - { - @trigger_error('populate_data_store_connection_signals is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->populate_data_store_connection_signals = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryResult.php deleted file mode 100644 index 128462621172..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/QueryResult.php +++ /dev/null @@ -1,1089 +0,0 @@ -google.cloud.dialogflow.cx.v3.QueryResult - */ -class QueryResult extends \Google\Protobuf\Internal\Message -{ - /** - * The language that was triggered during intent detection. - * See [Language - * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * The collected [session - * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use parameter value. - * - * Generated from protobuf field .google.protobuf.Struct parameters = 3; - */ - protected $parameters = null; - /** - * The list of rich messages returned to the client. Responses vary from - * simple text messages to more sophisticated, structured payloads used - * to drive complex logic. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - private $response_messages; - /** - * The list of webhook call status in the order of call sequence. - * - * Generated from protobuf field repeated .google.rpc.Status webhook_statuses = 13; - */ - private $webhook_statuses; - /** - * The list of webhook payload in - * [WebhookResponse.payload][google.cloud.dialogflow.cx.v3.WebhookResponse.payload], - * in the order of call sequence. If some webhook call fails or doesn't return - * any payload, an empty `Struct` would be used instead. - * - * Generated from protobuf field repeated .google.protobuf.Struct webhook_payloads = 6; - */ - private $webhook_payloads; - /** - * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 7; - */ - protected $current_page = null; - /** - * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; - */ - protected $current_flow = null; - /** - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the - * conversational query. Some, not all fields are filled in this message, - * including but not limited to: `name` and `display_name`. This field is - * deprecated, please use - * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] - * instead. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; - * @deprecated - */ - 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. - * This field is deprecated, please use - * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] - * instead. - * - * Generated from protobuf field float intent_detection_confidence = 9 [deprecated = true]; - * @deprecated - */ - protected $intent_detection_confidence = 0.0; - /** - * Intent match result, could be an intent or an event. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 15; - */ - protected $match = null; - /** - * The free-form diagnostic info. For example, this field could contain - * webhook call latency. The fields of this data can change without notice, - * so you should not write code that depends on its structure. - * One of the fields is called "Alternative Matched Intents", which may - * aid with debugging. The following describes these intent results: - * - The list is empty if no intent was matched to end-user input. - * - Only intents that are referenced in the currently active flow are - * included. - * - The matched intent is included. - * - Other intents that could have matched end-user input, but did not match - * because they are referenced by intent routes that are out of - * [scope](https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope), - * are included. - * - Other intents referenced by intent routes in scope that matched end-user - * input, but had a lower confidence score. - * - * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 10; - */ - protected $diagnostic_info = null; - /** - * The sentiment analyss result, which depends on - * [`analyze_query_text_sentiment`] - * [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], - * specified in the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SentimentAnalysisResult sentiment_analysis_result = 17; - */ - protected $sentiment_analysis_result = null; - /** - * Returns the current advanced settings including IVR settings. Even though - * the operations configured by these settings are performed by Dialogflow, - * the client may need to perform special logic at the moment. For example, if - * Dialogflow exports audio to Google Cloud Storage, then the client may need - * to wait for the resulting object to appear in the bucket before proceeding. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 21; - */ - protected $advanced_settings = null; - /** - * Indicates whether the Thumbs up/Thumbs down rating controls are need to be - * shown for the response in the Dialogflow Messenger widget. - * - * Generated from protobuf field bool allow_answer_feedback = 32; - */ - protected $allow_answer_feedback = false; - /** - * Optional. Data store connection feature output signals. - * Filled only when data stores are involved in serving the query. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals data_store_connection_signals = 35 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_store_connection_signals = null; - protected $query; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was - * provided as input, this field will contain a copy of the text. - * @type string $trigger_intent - * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as - * input, this field will contain a copy of the intent identifier. Format: - * `projects//locations//agents//intents/`. - * @type string $transcript - * If [natural language speech - * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, - * this field will contain the transcript for the audio. - * @type string $trigger_event - * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as - * input, this field will contain the name of the event. - * @type \Google\Cloud\Dialogflow\Cx\V3\DtmfInput $dtmf - * If a [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as - * input, this field will contain a copy of the - * [DtmfInput][google.cloud.dialogflow.cx.v3.DtmfInput]. - * @type string $language_code - * The language that was triggered during intent detection. - * See [Language - * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * for a list of the currently supported language codes. - * @type \Google\Protobuf\Struct $parameters - * The collected [session - * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use parameter value. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $response_messages - * The list of rich messages returned to the client. Responses vary from - * simple text messages to more sophisticated, structured payloads used - * to drive complex logic. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $webhook_statuses - * The list of webhook call status in the order of call sequence. - * @type array<\Google\Protobuf\Struct>|\Google\Protobuf\Internal\RepeatedField $webhook_payloads - * The list of webhook payload in - * [WebhookResponse.payload][google.cloud.dialogflow.cx.v3.WebhookResponse.payload], - * in the order of call sequence. If some webhook call fails or doesn't return - * any payload, an empty `Struct` would be used instead. - * @type \Google\Cloud\Dialogflow\Cx\V3\Page $current_page - * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Flow $current_flow - * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * @type \Google\Cloud\Dialogflow\Cx\V3\Intent $intent - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the - * conversational query. Some, not all fields are filled in this message, - * including but not limited to: `name` and `display_name`. This field is - * deprecated, please use - * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] - * instead. - * @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. - * This field is deprecated, please use - * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] - * instead. - * @type \Google\Cloud\Dialogflow\Cx\V3\PBMatch $match - * Intent match result, could be an intent or an event. - * @type \Google\Protobuf\Struct $diagnostic_info - * The free-form diagnostic info. For example, this field could contain - * webhook call latency. The fields of this data can change without notice, - * so you should not write code that depends on its structure. - * One of the fields is called "Alternative Matched Intents", which may - * aid with debugging. The following describes these intent results: - * - The list is empty if no intent was matched to end-user input. - * - Only intents that are referenced in the currently active flow are - * included. - * - The matched intent is included. - * - Other intents that could have matched end-user input, but did not match - * because they are referenced by intent routes that are out of - * [scope](https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope), - * are included. - * - Other intents referenced by intent routes in scope that matched end-user - * input, but had a lower confidence score. - * @type \Google\Cloud\Dialogflow\Cx\V3\SentimentAnalysisResult $sentiment_analysis_result - * The sentiment analyss result, which depends on - * [`analyze_query_text_sentiment`] - * [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], - * specified in the request. - * @type \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $advanced_settings - * Returns the current advanced settings including IVR settings. Even though - * the operations configured by these settings are performed by Dialogflow, - * the client may need to perform special logic at the moment. For example, if - * Dialogflow exports audio to Google Cloud Storage, then the client may need - * to wait for the resulting object to appear in the bucket before proceeding. - * @type bool $allow_answer_feedback - * Indicates whether the Thumbs up/Thumbs down rating controls are need to be - * shown for the response in the Dialogflow Messenger widget. - * @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals $data_store_connection_signals - * Optional. Data store connection feature output signals. - * Filled only when data stores are involved in serving the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was - * provided as input, this field will contain a copy of the text. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->readOneof(1); - } - - public function hasText() - { - return $this->hasOneof(1); - } - - /** - * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was - * provided as input, this field will contain a copy of the text. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as - * input, this field will contain a copy of the intent identifier. Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string trigger_intent = 11 [(.google.api.resource_reference) = { - * @return string - */ - public function getTriggerIntent() - { - return $this->readOneof(11); - } - - public function hasTriggerIntent() - { - return $this->hasOneof(11); - } - - /** - * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as - * input, this field will contain a copy of the intent identifier. Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string trigger_intent = 11 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTriggerIntent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * If [natural language speech - * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, - * this field will contain the transcript for the audio. - * - * Generated from protobuf field string transcript = 12; - * @return string - */ - public function getTranscript() - { - return $this->readOneof(12); - } - - public function hasTranscript() - { - return $this->hasOneof(12); - } - - /** - * If [natural language speech - * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, - * this field will contain the transcript for the audio. - * - * Generated from protobuf field string transcript = 12; - * @param string $var - * @return $this - */ - public function setTranscript($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as - * input, this field will contain the name of the event. - * - * Generated from protobuf field string trigger_event = 14; - * @return string - */ - public function getTriggerEvent() - { - return $this->readOneof(14); - } - - public function hasTriggerEvent() - { - return $this->hasOneof(14); - } - - /** - * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as - * input, this field will contain the name of the event. - * - * Generated from protobuf field string trigger_event = 14; - * @param string $var - * @return $this - */ - public function setTriggerEvent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * If a [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as - * input, this field will contain a copy of the - * [DtmfInput][google.cloud.dialogflow.cx.v3.DtmfInput]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; - * @return \Google\Cloud\Dialogflow\Cx\V3\DtmfInput|null - */ - public function getDtmf() - { - return $this->readOneof(23); - } - - public function hasDtmf() - { - return $this->hasOneof(23); - } - - /** - * If a [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as - * input, this field will contain a copy of the - * [DtmfInput][google.cloud.dialogflow.cx.v3.DtmfInput]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; - * @param \Google\Cloud\Dialogflow\Cx\V3\DtmfInput $var - * @return $this - */ - public function setDtmf($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DtmfInput::class); - $this->writeOneof(23, $var); - - return $this; - } - - /** - * The language that was triggered during intent detection. - * See [Language - * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 2; - * @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/cx/docs/reference/language) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The collected [session - * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use parameter value. - * - * Generated from protobuf field .google.protobuf.Struct parameters = 3; - * @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 collected [session - * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.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 then use - * map, otherwise, depending on the parameter value type, it could be one of - * string, number, boolean, null, list or map. - * * MapValue value: If parameter's entity type is a composite entity then use - * map from composite entity property names to property values, otherwise, - * use parameter value. - * - * Generated from protobuf field .google.protobuf.Struct parameters = 3; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->parameters = $var; - - return $this; - } - - /** - * The list of rich messages returned to the client. Responses vary from - * simple text messages to more sophisticated, structured payloads used - * to drive complex logic. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponseMessages() - { - return $this->response_messages; - } - - /** - * The list of rich messages returned to the client. Responses vary from - * simple text messages to more sophisticated, structured payloads used - * to drive complex logic. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponseMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::class); - $this->response_messages = $arr; - - return $this; - } - - /** - * The list of webhook call status in the order of call sequence. - * - * Generated from protobuf field repeated .google.rpc.Status webhook_statuses = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebhookStatuses() - { - return $this->webhook_statuses; - } - - /** - * The list of webhook call status in the order of call sequence. - * - * Generated from protobuf field repeated .google.rpc.Status webhook_statuses = 13; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebhookStatuses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->webhook_statuses = $arr; - - return $this; - } - - /** - * The list of webhook payload in - * [WebhookResponse.payload][google.cloud.dialogflow.cx.v3.WebhookResponse.payload], - * in the order of call sequence. If some webhook call fails or doesn't return - * any payload, an empty `Struct` would be used instead. - * - * Generated from protobuf field repeated .google.protobuf.Struct webhook_payloads = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebhookPayloads() - { - return $this->webhook_payloads; - } - - /** - * The list of webhook payload in - * [WebhookResponse.payload][google.cloud.dialogflow.cx.v3.WebhookResponse.payload], - * in the order of call sequence. If some webhook call fails or doesn't return - * any payload, an empty `Struct` would be used instead. - * - * Generated from protobuf field repeated .google.protobuf.Struct webhook_payloads = 6; - * @param array<\Google\Protobuf\Struct>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebhookPayloads($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Struct::class); - $this->webhook_payloads = $arr; - - return $this; - } - - /** - * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 7; - * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null - */ - public function getCurrentPage() - { - return $this->current_page; - } - - public function hasCurrentPage() - { - return isset($this->current_page); - } - - public function clearCurrentPage() - { - unset($this->current_page); - } - - /** - * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page current_page = 7; - * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var - * @return $this - */ - public function setCurrentPage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); - $this->current_page = $var; - - return $this; - } - - /** - * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; - * @return \Google\Cloud\Dialogflow\Cx\V3\Flow|null - */ - public function getCurrentFlow() - { - return $this->current_flow; - } - - public function hasCurrentFlow() - { - return isset($this->current_flow); - } - - public function clearCurrentFlow() - { - unset($this->current_flow); - } - - /** - * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all - * fields are filled in this message, including but not limited to `name` and - * `display_name`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; - * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $var - * @return $this - */ - public function setCurrentFlow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Flow::class); - $this->current_flow = $var; - - return $this; - } - - /** - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the - * conversational query. Some, not all fields are filled in this message, - * including but not limited to: `name` and `display_name`. This field is - * deprecated, please use - * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] - * instead. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Intent|null - * @deprecated - */ - public function getIntent() - { - if (isset($this->intent)) { - @trigger_error('intent is deprecated.', E_USER_DEPRECATED); - } - return $this->intent; - } - - public function hasIntent() - { - if (isset($this->intent)) { - @trigger_error('intent is deprecated.', E_USER_DEPRECATED); - } - return isset($this->intent); - } - - public function clearIntent() - { - @trigger_error('intent is deprecated.', E_USER_DEPRECATED); - unset($this->intent); - } - - /** - * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the - * conversational query. Some, not all fields are filled in this message, - * including but not limited to: `name` and `display_name`. This field is - * deprecated, please use - * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] - * instead. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $var - * @return $this - * @deprecated - */ - public function setIntent($var) - { - @trigger_error('intent is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\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. - * This field is deprecated, please use - * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] - * instead. - * - * Generated from protobuf field float intent_detection_confidence = 9 [deprecated = true]; - * @return float - * @deprecated - */ - public function getIntentDetectionConfidence() - { - if ($this->intent_detection_confidence !== 0.0) { - @trigger_error('intent_detection_confidence is deprecated.', E_USER_DEPRECATED); - } - 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. - * This field is deprecated, please use - * [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] - * instead. - * - * Generated from protobuf field float intent_detection_confidence = 9 [deprecated = true]; - * @param float $var - * @return $this - * @deprecated - */ - public function setIntentDetectionConfidence($var) - { - @trigger_error('intent_detection_confidence is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkFloat($var); - $this->intent_detection_confidence = $var; - - return $this; - } - - /** - * Intent match result, could be an intent or an event. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 15; - * @return \Google\Cloud\Dialogflow\Cx\V3\PBMatch|null - */ - public function getMatch() - { - return $this->match; - } - - public function hasMatch() - { - return isset($this->match); - } - - public function clearMatch() - { - unset($this->match); - } - - /** - * Intent match result, could be an intent or an event. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Match match = 15; - * @param \Google\Cloud\Dialogflow\Cx\V3\PBMatch $var - * @return $this - */ - public function setMatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PBMatch::class); - $this->match = $var; - - return $this; - } - - /** - * The free-form diagnostic info. For example, this field could contain - * webhook call latency. The fields of this data can change without notice, - * so you should not write code that depends on its structure. - * One of the fields is called "Alternative Matched Intents", which may - * aid with debugging. The following describes these intent results: - * - The list is empty if no intent was matched to end-user input. - * - Only intents that are referenced in the currently active flow are - * included. - * - The matched intent is included. - * - Other intents that could have matched end-user input, but did not match - * because they are referenced by intent routes that are out of - * [scope](https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope), - * are included. - * - Other intents referenced by intent routes in scope that matched end-user - * input, but had a lower confidence score. - * - * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 10; - * @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); - } - - /** - * The free-form diagnostic info. For example, this field could contain - * webhook call latency. The fields of this data can change without notice, - * so you should not write code that depends on its structure. - * One of the fields is called "Alternative Matched Intents", which may - * aid with debugging. The following describes these intent results: - * - The list is empty if no intent was matched to end-user input. - * - Only intents that are referenced in the currently active flow are - * included. - * - The matched intent is included. - * - Other intents that could have matched end-user input, but did not match - * because they are referenced by intent routes that are out of - * [scope](https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope), - * are included. - * - Other intents referenced by intent routes in scope that matched end-user - * input, but had a lower confidence score. - * - * Generated from protobuf field .google.protobuf.Struct diagnostic_info = 10; - * @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 analyss result, which depends on - * [`analyze_query_text_sentiment`] - * [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], - * specified in the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SentimentAnalysisResult sentiment_analysis_result = 17; - * @return \Google\Cloud\Dialogflow\Cx\V3\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 analyss result, which depends on - * [`analyze_query_text_sentiment`] - * [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], - * specified in the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SentimentAnalysisResult sentiment_analysis_result = 17; - * @param \Google\Cloud\Dialogflow\Cx\V3\SentimentAnalysisResult $var - * @return $this - */ - public function setSentimentAnalysisResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SentimentAnalysisResult::class); - $this->sentiment_analysis_result = $var; - - return $this; - } - - /** - * Returns the current advanced settings including IVR settings. Even though - * the operations configured by these settings are performed by Dialogflow, - * the client may need to perform special logic at the moment. For example, if - * Dialogflow exports audio to Google Cloud Storage, then the client may need - * to wait for the resulting object to appear in the bucket before proceeding. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 21; - * @return \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings|null - */ - public function getAdvancedSettings() - { - return $this->advanced_settings; - } - - public function hasAdvancedSettings() - { - return isset($this->advanced_settings); - } - - public function clearAdvancedSettings() - { - unset($this->advanced_settings); - } - - /** - * Returns the current advanced settings including IVR settings. Even though - * the operations configured by these settings are performed by Dialogflow, - * the client may need to perform special logic at the moment. For example, if - * Dialogflow exports audio to Google Cloud Storage, then the client may need - * to wait for the resulting object to appear in the bucket before proceeding. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 21; - * @param \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings $var - * @return $this - */ - public function setAdvancedSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::class); - $this->advanced_settings = $var; - - return $this; - } - - /** - * Indicates whether the Thumbs up/Thumbs down rating controls are need to be - * shown for the response in the Dialogflow Messenger widget. - * - * Generated from protobuf field bool allow_answer_feedback = 32; - * @return bool - */ - public function getAllowAnswerFeedback() - { - return $this->allow_answer_feedback; - } - - /** - * Indicates whether the Thumbs up/Thumbs down rating controls are need to be - * shown for the response in the Dialogflow Messenger widget. - * - * Generated from protobuf field bool allow_answer_feedback = 32; - * @param bool $var - * @return $this - */ - public function setAllowAnswerFeedback($var) - { - GPBUtil::checkBool($var); - $this->allow_answer_feedback = $var; - - return $this; - } - - /** - * Optional. Data store connection feature output signals. - * Filled only when data stores are involved in serving the query. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals data_store_connection_signals = 35 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals|null - */ - public function getDataStoreConnectionSignals() - { - return $this->data_store_connection_signals; - } - - public function hasDataStoreConnectionSignals() - { - return isset($this->data_store_connection_signals); - } - - public function clearDataStoreConnectionSignals() - { - unset($this->data_store_connection_signals); - } - - /** - * Optional. Data store connection feature output signals. - * Filled only when data stores are involved in serving the query. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals data_store_connection_signals = 35 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals $var - * @return $this - */ - public function setDataStoreConnectionSignals($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals::class); - $this->data_store_connection_signals = $var; - - return $this; - } - - /** - * @return string - */ - public function getQuery() - { - return $this->whichOneof("query"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResourceName.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResourceName.php deleted file mode 100644 index 0e78c780b799..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResourceName.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResourceName - */ -class ResourceName extends \Google\Protobuf\Internal\Message -{ - /** - * Name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Display name. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name. - * @type string $display_name - * Display name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ValidationMessage::initOnce(); - parent::__construct($data); - } - - /** - * Name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name. - * - * 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; - } - - /** - * Display name. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php deleted file mode 100644 index 927621442c9b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage.php +++ /dev/null @@ -1,546 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage - */ -class ResponseMessage extends \Google\Protobuf\Internal\Message -{ - /** - * Response type. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; - */ - protected $response_type = 0; - /** - * The channel which the response is associated with. Clients can specify the - * channel via - * [QueryParameters.channel][google.cloud.dialogflow.cx.v3.QueryParameters.channel], - * and only associated channel response will be returned. - * - * Generated from protobuf field string channel = 19; - */ - protected $channel = ''; - protected $message; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text $text - * Returns a text response. - * @type \Google\Protobuf\Struct $payload - * Returns a response containing a custom, platform-specific payload. - * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\ConversationSuccess $conversation_success - * Indicates that the conversation succeeded. - * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\OutputAudioText $output_audio_text - * A text or ssml response that is preferentially used for TTS output audio - * synthesis, as described in the comment on the ResponseMessage message. - * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\LiveAgentHandoff $live_agent_handoff - * Hands off conversation to a human agent. - * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\EndInteraction $end_interaction - * Output only. A signal that indicates the interaction with the Dialogflow - * agent has ended. This message is generated by Dialogflow only when the - * conversation reaches `END_SESSION` page. It is not supposed to be defined - * by the user. - * It's guaranteed that there is at most one such message in each response. - * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\PlayAudio $play_audio - * Signal that the client should play an audio clip hosted at a - * client-specific URI. Dialogflow uses this to construct - * [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. - * However, Dialogflow itself does not try to read or process the URI in any - * way. - * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio $mixed_audio - * Output only. An audio response message composed of both the synthesized - * Dialogflow agent responses and responses defined via - * [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio]. - * This message is generated by Dialogflow only and not supposed to be - * defined by the user. - * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\TelephonyTransferCall $telephony_transfer_call - * A signal that the client should transfer the phone call connected to - * this agent to a third-party endpoint. - * @type \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\KnowledgeInfoCard $knowledge_info_card - * Represents info card for knowledge answers, to be better rendered in - * Dialogflow Messenger. - * @type \Google\Cloud\Dialogflow\Cx\V3\ToolCall $tool_call - * Returns the definition of a tool call that should be executed by the - * client. - * @type int $response_type - * Response type. - * @type string $channel - * The channel which the response is associated with. Clients can specify the - * channel via - * [QueryParameters.channel][google.cloud.dialogflow.cx.v3.QueryParameters.channel], - * and only associated channel response will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - - /** - * Returns a text response. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text|null - */ - public function getText() - { - return $this->readOneof(1); - } - - public function hasText() - { - return $this->hasOneof(1); - } - - /** - * Returns a text response. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\Text::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Returns a response containing a custom, platform-specific payload. - * - * Generated from protobuf field .google.protobuf.Struct payload = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getPayload() - { - return $this->readOneof(2); - } - - public function hasPayload() - { - return $this->hasOneof(2); - } - - /** - * Returns a response containing a custom, platform-specific payload. - * - * Generated from protobuf field .google.protobuf.Struct payload = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Indicates that the conversation succeeded. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9; - * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\ConversationSuccess|null - */ - public function getConversationSuccess() - { - return $this->readOneof(9); - } - - public function hasConversationSuccess() - { - return $this->hasOneof(9); - } - - /** - * Indicates that the conversation succeeded. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9; - * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\ConversationSuccess $var - * @return $this - */ - public function setConversationSuccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\ConversationSuccess::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * A text or ssml response that is preferentially used for TTS output audio - * synthesis, as described in the comment on the ResponseMessage message. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8; - * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\OutputAudioText|null - */ - public function getOutputAudioText() - { - return $this->readOneof(8); - } - - public function hasOutputAudioText() - { - return $this->hasOneof(8); - } - - /** - * A text or ssml response that is preferentially used for TTS output audio - * synthesis, as described in the comment on the ResponseMessage message. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8; - * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\OutputAudioText $var - * @return $this - */ - public function setOutputAudioText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\OutputAudioText::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Hands off conversation to a human agent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10; - * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\LiveAgentHandoff|null - */ - public function getLiveAgentHandoff() - { - return $this->readOneof(10); - } - - public function hasLiveAgentHandoff() - { - return $this->hasOneof(10); - } - - /** - * Hands off conversation to a human agent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10; - * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\LiveAgentHandoff $var - * @return $this - */ - public function setLiveAgentHandoff($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\LiveAgentHandoff::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Output only. A signal that indicates the interaction with the Dialogflow - * agent has ended. This message is generated by Dialogflow only when the - * conversation reaches `END_SESSION` page. It is not supposed to be defined - * by the user. - * It's guaranteed that there is at most one such message in each response. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\EndInteraction|null - */ - public function getEndInteraction() - { - return $this->readOneof(11); - } - - public function hasEndInteraction() - { - return $this->hasOneof(11); - } - - /** - * Output only. A signal that indicates the interaction with the Dialogflow - * agent has ended. This message is generated by Dialogflow only when the - * conversation reaches `END_SESSION` page. It is not supposed to be defined - * by the user. - * It's guaranteed that there is at most one such message in each response. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\EndInteraction $var - * @return $this - */ - public function setEndInteraction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\EndInteraction::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Signal that the client should play an audio clip hosted at a - * client-specific URI. Dialogflow uses this to construct - * [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. - * However, Dialogflow itself does not try to read or process the URI in any - * way. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12; - * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\PlayAudio|null - */ - public function getPlayAudio() - { - return $this->readOneof(12); - } - - public function hasPlayAudio() - { - return $this->hasOneof(12); - } - - /** - * Signal that the client should play an audio clip hosted at a - * client-specific URI. Dialogflow uses this to construct - * [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. - * However, Dialogflow itself does not try to read or process the URI in any - * way. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12; - * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\PlayAudio $var - * @return $this - */ - public function setPlayAudio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\PlayAudio::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Output only. An audio response message composed of both the synthesized - * Dialogflow agent responses and responses defined via - * [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio]. - * This message is generated by Dialogflow only and not supposed to be - * defined by the user. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio|null - */ - public function getMixedAudio() - { - return $this->readOneof(13); - } - - public function hasMixedAudio() - { - return $this->hasOneof(13); - } - - /** - * Output only. An audio response message composed of both the synthesized - * Dialogflow agent responses and responses defined via - * [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio]. - * This message is generated by Dialogflow only and not supposed to be - * defined by the user. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio $var - * @return $this - */ - public function setMixedAudio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * A signal that the client should transfer the phone call connected to - * this agent to a third-party endpoint. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall telephony_transfer_call = 18; - * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\TelephonyTransferCall|null - */ - public function getTelephonyTransferCall() - { - return $this->readOneof(18); - } - - public function hasTelephonyTransferCall() - { - return $this->hasOneof(18); - } - - /** - * A signal that the client should transfer the phone call connected to - * this agent to a third-party endpoint. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall telephony_transfer_call = 18; - * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\TelephonyTransferCall $var - * @return $this - */ - public function setTelephonyTransferCall($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\TelephonyTransferCall::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * Represents info card for knowledge answers, to be better rendered in - * Dialogflow Messenger. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; - * @return \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\KnowledgeInfoCard|null - */ - public function getKnowledgeInfoCard() - { - return $this->readOneof(20); - } - - public function hasKnowledgeInfoCard() - { - return $this->hasOneof(20); - } - - /** - * Represents info card for knowledge answers, to be better rendered in - * Dialogflow Messenger. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard knowledge_info_card = 20; - * @param \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\KnowledgeInfoCard $var - * @return $this - */ - public function setKnowledgeInfoCard($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\KnowledgeInfoCard::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * Returns the definition of a tool call that should be executed by the - * client. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; - * @return \Google\Cloud\Dialogflow\Cx\V3\ToolCall|null - */ - public function getToolCall() - { - return $this->readOneof(22); - } - - public function hasToolCall() - { - return $this->hasOneof(22); - } - - /** - * Returns the definition of a tool call that should be executed by the - * client. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; - * @param \Google\Cloud\Dialogflow\Cx\V3\ToolCall $var - * @return $this - */ - public function setToolCall($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ToolCall::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * Response type. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; - * @return int - */ - public function getResponseType() - { - return $this->response_type; - } - - /** - * Response type. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType response_type = 4; - * @param int $var - * @return $this - */ - public function setResponseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\ResponseType::class); - $this->response_type = $var; - - return $this; - } - - /** - * The channel which the response is associated with. Clients can specify the - * channel via - * [QueryParameters.channel][google.cloud.dialogflow.cx.v3.QueryParameters.channel], - * and only associated channel response will be returned. - * - * Generated from protobuf field string channel = 19; - * @return string - */ - public function getChannel() - { - return $this->channel; - } - - /** - * The channel which the response is associated with. Clients can specify the - * channel via - * [QueryParameters.channel][google.cloud.dialogflow.cx.v3.QueryParameters.channel], - * and only associated channel response will be returned. - * - * Generated from protobuf field string channel = 19; - * @param string $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkString($var, True); - $this->channel = $var; - - return $this; - } - - /** - * @return string - */ - public function getMessage() - { - return $this->whichOneof("message"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ConversationSuccess.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ConversationSuccess.php deleted file mode 100644 index f4fd757629ee..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ConversationSuccess.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - */ -class ConversationSuccess extends \Google\Protobuf\Internal\Message -{ - /** - * Custom metadata. Dialogflow doesn't impose any structure on this. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 1; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $metadata - * Custom metadata. Dialogflow doesn't impose any structure on this. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - - /** - * Custom metadata. Dialogflow doesn't impose any structure on this. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 1; - * @return \Google\Protobuf\Struct|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Custom metadata. Dialogflow doesn't impose any structure on this. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 1; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->metadata = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConversationSuccess::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_ConversationSuccess::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/EndInteraction.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/EndInteraction.php deleted file mode 100644 index a32728dff006..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/EndInteraction.php +++ /dev/null @@ -1,38 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction - */ -class EndInteraction 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\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EndInteraction::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_EndInteraction::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/KnowledgeInfoCard.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/KnowledgeInfoCard.php deleted file mode 100644 index afec68f545a5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/KnowledgeInfoCard.php +++ /dev/null @@ -1,39 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard - */ -class KnowledgeInfoCard 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\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KnowledgeInfoCard::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_KnowledgeInfoCard::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/LiveAgentHandoff.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/LiveAgentHandoff.php deleted file mode 100644 index e794ff3679a3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/LiveAgentHandoff.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff - */ -class LiveAgentHandoff extends \Google\Protobuf\Internal\Message -{ - /** - * Custom metadata for your handoff procedure. Dialogflow doesn't impose - * any structure on this. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 1; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $metadata - * Custom metadata for your handoff procedure. Dialogflow doesn't impose - * any structure on this. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - - /** - * Custom metadata for your handoff procedure. Dialogflow doesn't impose - * any structure on this. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 1; - * @return \Google\Protobuf\Struct|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Custom metadata for your handoff procedure. Dialogflow doesn't impose - * any structure on this. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 1; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->metadata = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LiveAgentHandoff::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_LiveAgentHandoff::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio.php deleted file mode 100644 index 23c44b0702b1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio - */ -class MixedAudio extends \Google\Protobuf\Internal\Message -{ - /** - * Segments this audio response is composed of. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - */ - private $segments; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio\Segment>|\Google\Protobuf\Internal\RepeatedField $segments - * Segments this audio response is composed of. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - - /** - * Segments this audio response is composed of. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSegments() - { - return $this->segments; - } - - /** - * Segments this audio response is composed of. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio\Segment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage\MixedAudio\Segment::class); - $this->segments = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MixedAudio::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_MixedAudio::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio/Segment.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio/Segment.php deleted file mode 100644 index 42cb0dca11d9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/MixedAudio/Segment.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment - */ -class Segment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Whether the playback of this segment can be interrupted by - * the end user's speech and the client should then start the next - * Dialogflow request. - * - * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $allow_playback_interruption = false; - protected $content; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $audio - * Raw audio synthesized from the Dialogflow agent's response using - * the output config specified in the request. - * @type string $uri - * Client-specific URI that points to an audio clip accessible to the - * client. Dialogflow does not impose any validation on it. - * @type bool $allow_playback_interruption - * Output only. Whether the playback of this segment can be interrupted by - * the end user's speech and the client should then start the next - * Dialogflow request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - - /** - * Raw audio synthesized from the Dialogflow agent's response using - * the output config specified in the request. - * - * Generated from protobuf field bytes audio = 1; - * @return string - */ - public function getAudio() - { - return $this->readOneof(1); - } - - public function hasAudio() - { - return $this->hasOneof(1); - } - - /** - * Raw audio synthesized from the Dialogflow agent's response using - * the output config specified in the request. - * - * Generated from protobuf field bytes audio = 1; - * @param string $var - * @return $this - */ - public function setAudio($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Client-specific URI that points to an audio clip accessible to the - * client. Dialogflow does not impose any validation on it. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->readOneof(2); - } - - public function hasUri() - { - return $this->hasOneof(2); - } - - /** - * Client-specific URI that points to an audio clip accessible to the - * client. Dialogflow does not impose any validation on it. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Output only. Whether the playback of this segment can be interrupted by - * the end user's speech and the client should then start the next - * Dialogflow request. - * - * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getAllowPlaybackInterruption() - { - return $this->allow_playback_interruption; - } - - /** - * Output only. Whether the playback of this segment can be interrupted by - * the end user's speech and the client should then start the next - * Dialogflow request. - * - * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setAllowPlaybackInterruption($var) - { - GPBUtil::checkBool($var); - $this->allow_playback_interruption = $var; - - return $this; - } - - /** - * @return string - */ - public function getContent() - { - return $this->whichOneof("content"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Segment::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_MixedAudio_Segment::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/OutputAudioText.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/OutputAudioText.php deleted file mode 100644 index 43b1f4902867..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/OutputAudioText.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - */ -class OutputAudioText extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * - * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $allow_playback_interruption = false; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * The raw text to be synthesized. - * @type string $ssml - * The SSML text to be synthesized. For more information, see - * [SSML](/speech/text-to-speech/docs/ssml). - * @type bool $allow_playback_interruption - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - - /** - * The raw text to be synthesized. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->readOneof(1); - } - - public function hasText() - { - return $this->hasOneof(1); - } - - /** - * The raw text to be synthesized. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The SSML text to be synthesized. For more information, see - * [SSML](/speech/text-to-speech/docs/ssml). - * - * Generated from protobuf field string ssml = 2; - * @return string - */ - public function getSsml() - { - return $this->readOneof(2); - } - - public function hasSsml() - { - return $this->hasOneof(2); - } - - /** - * The SSML text to be synthesized. For more information, see - * [SSML](/speech/text-to-speech/docs/ssml). - * - * Generated from protobuf field string ssml = 2; - * @param string $var - * @return $this - */ - public function setSsml($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * - * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getAllowPlaybackInterruption() - { - return $this->allow_playback_interruption; - } - - /** - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * - * Generated from protobuf field bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setAllowPlaybackInterruption($var) - { - GPBUtil::checkBool($var); - $this->allow_playback_interruption = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OutputAudioText::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_OutputAudioText::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/PlayAudio.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/PlayAudio.php deleted file mode 100644 index bcfa39e77a3f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/PlayAudio.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio - */ -class PlayAudio extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI of the audio clip. Dialogflow does not impose any - * validation on this value. It is specific to the client that reads it. - * - * Generated from protobuf field string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $audio_uri = ''; - /** - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * - * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $allow_playback_interruption = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $audio_uri - * Required. URI of the audio clip. Dialogflow does not impose any - * validation on this value. It is specific to the client that reads it. - * @type bool $allow_playback_interruption - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI of the audio clip. Dialogflow does not impose any - * validation on this value. It is specific to the client that reads it. - * - * Generated from protobuf field string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAudioUri() - { - return $this->audio_uri; - } - - /** - * Required. URI of the audio clip. Dialogflow does not impose any - * validation on this value. It is specific to the client that reads it. - * - * Generated from protobuf field string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAudioUri($var) - { - GPBUtil::checkString($var, True); - $this->audio_uri = $var; - - return $this; - } - - /** - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * - * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getAllowPlaybackInterruption() - { - return $this->allow_playback_interruption; - } - - /** - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * - * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setAllowPlaybackInterruption($var) - { - GPBUtil::checkBool($var); - $this->allow_playback_interruption = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PlayAudio::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_PlayAudio::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ResponseType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ResponseType.php deleted file mode 100644 index d2b3c5f10465..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/ResponseType.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType - */ -class ResponseType -{ - /** - * Not specified. - * - * Generated from protobuf enum RESPONSE_TYPE_UNSPECIFIED = 0; - */ - const RESPONSE_TYPE_UNSPECIFIED = 0; - /** - * The response is from an [entry - * prompt][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] in the - * page. - * - * Generated from protobuf enum ENTRY_PROMPT = 1; - */ - const ENTRY_PROMPT = 1; - /** - * The response is from [form-filling - * prompt][google.cloud.dialogflow.cx.v3.Form.Parameter.fill_behavior] in - * the page. - * - * Generated from protobuf enum PARAMETER_PROMPT = 2; - */ - const PARAMETER_PROMPT = 2; - /** - * The response is from a [transition - * route][google.cloud.dialogflow.cx.v3.TransitionRoute] or an [event - * handler][EventHandler] in the page or flow or transition route group. - * - * Generated from protobuf enum HANDLER_PROMPT = 3; - */ - const HANDLER_PROMPT = 3; - - private static $valueToName = [ - self::RESPONSE_TYPE_UNSPECIFIED => 'RESPONSE_TYPE_UNSPECIFIED', - self::ENTRY_PROMPT => 'ENTRY_PROMPT', - self::PARAMETER_PROMPT => 'PARAMETER_PROMPT', - self::HANDLER_PROMPT => 'HANDLER_PROMPT', - ]; - - 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(ResponseType::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_ResponseType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/TelephonyTransferCall.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/TelephonyTransferCall.php deleted file mode 100644 index 5e4cf55b5241..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/TelephonyTransferCall.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall - */ -class TelephonyTransferCall extends \Google\Protobuf\Internal\Message -{ - protected $endpoint; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $phone_number - * Transfer the call to a phone number - * in [E.164 format](https://en.wikipedia.org/wiki/E.164). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - - /** - * Transfer the call to a phone number - * in [E.164 format](https://en.wikipedia.org/wiki/E.164). - * - * Generated from protobuf field string phone_number = 1; - * @return string - */ - public function getPhoneNumber() - { - return $this->readOneof(1); - } - - public function hasPhoneNumber() - { - return $this->hasOneof(1); - } - - /** - * Transfer the call to a phone number - * in [E.164 format](https://en.wikipedia.org/wiki/E.164). - * - * Generated from protobuf field string phone_number = 1; - * @param string $var - * @return $this - */ - public function setPhoneNumber($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getEndpoint() - { - return $this->whichOneof("endpoint"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TelephonyTransferCall::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_TelephonyTransferCall::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/Text.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/Text.php deleted file mode 100644 index 73f412507ce0..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ResponseMessage/Text.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.dialogflow.cx.v3.ResponseMessage.Text - */ -class Text extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A collection of text response variants. If multiple variants - * are defined, only one text response variant is returned at runtime. - * - * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $text; - /** - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * - * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $allow_playback_interruption = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $text - * Required. A collection of text response variants. If multiple variants - * are defined, only one text response variant is returned at runtime. - * @type bool $allow_playback_interruption - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::initOnce(); - parent::__construct($data); - } - - /** - * Required. A collection of text response variants. If multiple variants - * are defined, only one text response variant is returned at runtime. - * - * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getText() - { - return $this->text; - } - - /** - * Required. A collection of text response variants. If multiple variants - * are defined, only one text response variant is returned at runtime. - * - * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @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; - } - - /** - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * - * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getAllowPlaybackInterruption() - { - return $this->allow_playback_interruption; - } - - /** - * Output only. Whether the playback of this message can be interrupted by - * the end user's speech and the client can then starts the next Dialogflow - * request. - * - * Generated from protobuf field bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setAllowPlaybackInterruption($var) - { - GPBUtil::checkBool($var); - $this->allow_playback_interruption = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Text::class, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage_Text::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest.php deleted file mode 100644 index 61add1cb7f43..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.dialogflow.cx.v3.RestoreAgentRequest - */ -class RestoreAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the agent to restore into. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Agent restore mode. If not specified, `KEEP` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption restore_option = 5; - */ - protected $restore_option = 0; - protected $agent; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the agent to restore into. - * Format: `projects//locations//agents/`. - * @type string $agent_uri - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to restore agent from. The format of this URI must be - * `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 - * Uncompressed raw byte content for agent. - * @type \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest\GitSource $git_source - * Setting for restoring from a git branch - * @type int $restore_option - * Agent restore mode. If not specified, `KEEP` is assumed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the agent to restore into. - * Format: `projects//locations//agents/`. - * - * 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 agent to restore into. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to restore agent from. The format of this URI must be - * `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 [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - * to restore agent from. The format of this URI must be - * `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; - } - - /** - * Uncompressed 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); - } - - /** - * Uncompressed 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; - } - - /** - * Setting for restoring from a git branch - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RestoreAgentRequest.GitSource git_source = 6; - * @return \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest\GitSource|null - */ - public function getGitSource() - { - return $this->readOneof(6); - } - - public function hasGitSource() - { - return $this->hasOneof(6); - } - - /** - * Setting for restoring from a git branch - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RestoreAgentRequest.GitSource git_source = 6; - * @param \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest\GitSource $var - * @return $this - */ - public function setGitSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest\GitSource::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Agent restore mode. If not specified, `KEEP` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption restore_option = 5; - * @return int - */ - public function getRestoreOption() - { - return $this->restore_option; - } - - /** - * Agent restore mode. If not specified, `KEEP` is assumed. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption restore_option = 5; - * @param int $var - * @return $this - */ - public function setRestoreOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest\RestoreOption::class); - $this->restore_option = $var; - - return $this; - } - - /** - * @return string - */ - public function getAgent() - { - return $this->whichOneof("agent"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/GitSource.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/GitSource.php deleted file mode 100644 index e4c47467ad29..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/GitSource.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.cx.v3.RestoreAgentRequest.GitSource - */ -class GitSource extends \Google\Protobuf\Internal\Message -{ - /** - * tracking branch for the git pull - * - * Generated from protobuf field string tracking_branch = 1; - */ - protected $tracking_branch = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $tracking_branch - * tracking branch for the git pull - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * tracking branch for the git pull - * - * Generated from protobuf field string tracking_branch = 1; - * @return string - */ - public function getTrackingBranch() - { - return $this->tracking_branch; - } - - /** - * tracking branch for the git pull - * - * Generated from protobuf field string tracking_branch = 1; - * @param string $var - * @return $this - */ - public function setTrackingBranch($var) - { - GPBUtil::checkString($var, True); - $this->tracking_branch = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GitSource::class, \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest_GitSource::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/RestoreOption.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/RestoreOption.php deleted file mode 100644 index 266fc9ce1b56..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RestoreAgentRequest/RestoreOption.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption - */ -class RestoreOption -{ - /** - * Unspecified. Treated as KEEP. - * - * Generated from protobuf enum RESTORE_OPTION_UNSPECIFIED = 0; - */ - const RESTORE_OPTION_UNSPECIFIED = 0; - /** - * Always respect the settings from the exported agent file. It may cause - * a restoration failure if some settings (e.g. model type) are not - * supported in the target agent. - * - * Generated from protobuf enum KEEP = 1; - */ - const KEEP = 1; - /** - * Fallback to default settings if some settings are not supported in the - * target agent. - * - * Generated from protobuf enum FALLBACK = 2; - */ - const FALLBACK = 2; - - private static $valueToName = [ - self::RESTORE_OPTION_UNSPECIFIED => 'RESTORE_OPTION_UNSPECIFIED', - self::KEEP => 'KEEP', - self::FALLBACK => 'FALLBACK', - ]; - - 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(RestoreOption::class, \Google\Cloud\Dialogflow\Cx\V3\RestoreAgentRequest_RestoreOption::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig.php deleted file mode 100644 index d493c3933674..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.dialogflow.cx.v3.RolloutConfig - */ -class RolloutConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Steps to roll out a flow version. Steps should be sorted by percentage in - * ascending order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; - */ - private $rollout_steps; - /** - * The conditions that are used to evaluate the success of a rollout - * step. If not specified, all rollout steps will proceed to the next one - * unless failure conditions are met. E.g. "containment_rate > 60% AND - * callback_rate < 20%". See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string rollout_condition = 2; - */ - protected $rollout_condition = ''; - /** - * The conditions that are used to evaluate the failure of a rollout - * step. If not specified, no rollout steps will fail. E.g. "containment_rate - * < 10% OR average_turn_count < 3". See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string failure_condition = 3; - */ - protected $failure_condition = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\RolloutConfig\RolloutStep>|\Google\Protobuf\Internal\RepeatedField $rollout_steps - * Steps to roll out a flow version. Steps should be sorted by percentage in - * ascending order. - * @type string $rollout_condition - * The conditions that are used to evaluate the success of a rollout - * step. If not specified, all rollout steps will proceed to the next one - * unless failure conditions are met. E.g. "containment_rate > 60% AND - * callback_rate < 20%". See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * @type string $failure_condition - * The conditions that are used to evaluate the failure of a rollout - * step. If not specified, no rollout steps will fail. E.g. "containment_rate - * < 10% OR average_turn_count < 3". See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Steps to roll out a flow version. Steps should be sorted by percentage in - * ascending order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRolloutSteps() - { - return $this->rollout_steps; - } - - /** - * Steps to roll out a flow version. Steps should be sorted by percentage in - * ascending order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\RolloutConfig\RolloutStep>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRolloutSteps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig\RolloutStep::class); - $this->rollout_steps = $arr; - - return $this; - } - - /** - * The conditions that are used to evaluate the success of a rollout - * step. If not specified, all rollout steps will proceed to the next one - * unless failure conditions are met. E.g. "containment_rate > 60% AND - * callback_rate < 20%". See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string rollout_condition = 2; - * @return string - */ - public function getRolloutCondition() - { - return $this->rollout_condition; - } - - /** - * The conditions that are used to evaluate the success of a rollout - * step. If not specified, all rollout steps will proceed to the next one - * unless failure conditions are met. E.g. "containment_rate > 60% AND - * callback_rate < 20%". See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string rollout_condition = 2; - * @param string $var - * @return $this - */ - public function setRolloutCondition($var) - { - GPBUtil::checkString($var, True); - $this->rollout_condition = $var; - - return $this; - } - - /** - * The conditions that are used to evaluate the failure of a rollout - * step. If not specified, no rollout steps will fail. E.g. "containment_rate - * < 10% OR average_turn_count < 3". See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string failure_condition = 3; - * @return string - */ - public function getFailureCondition() - { - return $this->failure_condition; - } - - /** - * The conditions that are used to evaluate the failure of a rollout - * step. If not specified, no rollout steps will fail. E.g. "containment_rate - * < 10% OR average_turn_count < 3". See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * - * Generated from protobuf field string failure_condition = 3; - * @param string $var - * @return $this - */ - public function setFailureCondition($var) - { - GPBUtil::checkString($var, True); - $this->failure_condition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig/RolloutStep.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig/RolloutStep.php deleted file mode 100644 index 17ab73e82dab..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutConfig/RolloutStep.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep - */ -class RolloutStep extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the rollout step; - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The percentage of traffic allocated to the flow version of this rollout - * step. (0%, 100%]. - * - * Generated from protobuf field int32 traffic_percent = 2; - */ - protected $traffic_percent = 0; - /** - * The minimum time that this step should last. Should be longer than 1 - * hour. If not set, the default minimum duration for each step will be 1 - * hour. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3; - */ - protected $min_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The name of the rollout step; - * @type int $traffic_percent - * The percentage of traffic allocated to the flow version of this rollout - * step. (0%, 100%]. - * @type \Google\Protobuf\Duration $min_duration - * The minimum time that this step should last. Should be longer than 1 - * hour. If not set, the default minimum duration for each step will be 1 - * hour. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * The name of the rollout step; - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name of the rollout step; - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The percentage of traffic allocated to the flow version of this rollout - * step. (0%, 100%]. - * - * Generated from protobuf field int32 traffic_percent = 2; - * @return int - */ - public function getTrafficPercent() - { - return $this->traffic_percent; - } - - /** - * The percentage of traffic allocated to the flow version of this rollout - * step. (0%, 100%]. - * - * Generated from protobuf field int32 traffic_percent = 2; - * @param int $var - * @return $this - */ - public function setTrafficPercent($var) - { - GPBUtil::checkInt32($var); - $this->traffic_percent = $var; - - return $this; - } - - /** - * The minimum time that this step should last. Should be longer than 1 - * hour. If not set, the default minimum duration for each step will be 1 - * hour. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getMinDuration() - { - return $this->min_duration; - } - - public function hasMinDuration() - { - return isset($this->min_duration); - } - - public function clearMinDuration() - { - unset($this->min_duration); - } - - /** - * The minimum time that this step should last. Should be longer than 1 - * hour. If not set, the default minimum duration for each step will be 1 - * hour. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RolloutStep::class, \Google\Cloud\Dialogflow\Cx\V3\RolloutConfig_RolloutStep::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutState.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutState.php deleted file mode 100644 index b8f796e8b78e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RolloutState.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.dialogflow.cx.v3.RolloutState - */ -class RolloutState extends \Google\Protobuf\Internal\Message -{ - /** - * Display name of the current auto rollout step. - * - * Generated from protobuf field string step = 1; - */ - protected $step = ''; - /** - * Index of the current step in the auto rollout steps list. - * - * Generated from protobuf field int32 step_index = 3; - */ - protected $step_index = 0; - /** - * Start time of the current step. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $step - * Display name of the current auto rollout step. - * @type int $step_index - * Index of the current step in the auto rollout steps list. - * @type \Google\Protobuf\Timestamp $start_time - * Start time of the current step. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Display name of the current auto rollout step. - * - * Generated from protobuf field string step = 1; - * @return string - */ - public function getStep() - { - return $this->step; - } - - /** - * Display name of the current auto rollout step. - * - * Generated from protobuf field string step = 1; - * @param string $var - * @return $this - */ - public function setStep($var) - { - GPBUtil::checkString($var, True); - $this->step = $var; - - return $this; - } - - /** - * Index of the current step in the auto rollout steps list. - * - * Generated from protobuf field int32 step_index = 3; - * @return int - */ - public function getStepIndex() - { - return $this->step_index; - } - - /** - * Index of the current step in the auto rollout steps list. - * - * Generated from protobuf field int32 step_index = 3; - * @param int $var - * @return $this - */ - public function setStepIndex($var) - { - GPBUtil::checkInt32($var); - $this->step_index = $var; - - return $this; - } - - /** - * Start time of the current step. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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); - } - - /** - * Start time of the current step. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestMetadata.php deleted file mode 100644 index 5268445090ca..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestMetadata.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - */ -class RunContinuousTestMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The test errors. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $errors - * The test errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * The test errors. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * The test errors. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TestError errors = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TestError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TestError::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestRequest.php deleted file mode 100644 index f1a0e46bb7c2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.cx.v3.RunContinuousTestRequest - */ -class RunContinuousTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $environment = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $environment - * Required. Format: - * `projects//locations//agents//environments/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Required. Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestResponse.php deleted file mode 100644 index 73ac7c3a10e2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunContinuousTestResponse.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dialogflow.cx.v3.RunContinuousTestResponse - */ -class RunContinuousTestResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result for a continuous test run. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_result = 1; - */ - protected $continuous_test_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult $continuous_test_result - * The result for a continuous test run. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * The result for a continuous test run. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_result = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult|null - */ - public function getContinuousTestResult() - { - return $this->continuous_test_result; - } - - public function hasContinuousTestResult() - { - return isset($this->continuous_test_result); - } - - public function clearContinuousTestResult() - { - unset($this->continuous_test_result); - } - - /** - * The result for a continuous test run. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ContinuousTestResult continuous_test_result = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult $var - * @return $this - */ - public function setContinuousTestResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\ContinuousTestResult::class); - $this->continuous_test_result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseMetadata.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseMetadata.php deleted file mode 100644 index 911a4f3537e9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseMetadata.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - */ -class RunTestCaseMetadata 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\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseRequest.php deleted file mode 100644 index 90e3bf3f4682..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.dialogflow.cx.v3.RunTestCaseRequest - */ -class RunTestCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format of test case name to run: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Environment name. If not set, draft environment is assumed. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $environment = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format of test case name to run: - * `projects//locations//agents//testCases/`. - * @type string $environment - * Optional. Environment name. If not set, draft environment is assumed. - * Format: - * `projects//locations//agents//environments/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format of test case name to run: - * `projects//locations//agents//testCases/`. - * - * 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. Format of test case name to run: - * `projects//locations//agents//testCases/`. - * - * 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. Environment name. If not set, draft environment is assumed. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Optional. Environment name. If not set, draft environment is assumed. - * Format: - * `projects//locations//agents//environments/`. - * - * Generated from protobuf field string environment = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseResponse.php deleted file mode 100644 index 5dee95f93f91..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/RunTestCaseResponse.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dialogflow.cx.v3.RunTestCaseResponse - */ -class RunTestCaseResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; - */ - protected $result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult $result - * The result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The result. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult|null - */ - public function getResult() - { - return $this->result; - } - - public function hasResult() - { - return isset($this->result); - } - - public function clearResult() - { - unset($this->result); - } - - /** - * The result. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult result = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult::class); - $this->result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php deleted file mode 100644 index b3870547e05a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.dialogflow.cx.v3.SafetySettings - */ -class SafetySettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Default phrase match strategy for banned phrases. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_banned_phrase_match_strategy = 0; - /** - * Banned phrases for generated text. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; - */ - private $banned_phrases; - /** - * Optional. Settings for Responsible AI checks. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rai_settings = null; - /** - * Optional. Immutable. Default RAI settings to be annotated on the agent, so - * that users will be able to restore their RAI configurations to the default - * settings. Read-only field for the API proto only. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $default_rai_settings = null; - /** - * Optional. Settings for prompt security checks. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $prompt_security_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $default_banned_phrase_match_strategy - * Optional. Default phrase match strategy for banned phrases. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\SafetySettings\Phrase>|\Google\Protobuf\Internal\RepeatedField $banned_phrases - * Banned phrases for generated text. - * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $rai_settings - * Optional. Settings for Responsible AI checks. - * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $default_rai_settings - * Optional. Immutable. Default RAI settings to be annotated on the agent, so - * that users will be able to restore their RAI configurations to the default - * settings. Read-only field for the API proto only. - * @type \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings $prompt_security_settings - * Optional. Settings for prompt security checks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SafetySettings::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Default phrase match strategy for banned phrases. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDefaultBannedPhraseMatchStrategy() - { - return $this->default_banned_phrase_match_strategy; - } - - /** - * Optional. Default phrase match strategy for banned phrases. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDefaultBannedPhraseMatchStrategy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PhraseMatchStrategy::class); - $this->default_banned_phrase_match_strategy = $var; - - return $this; - } - - /** - * Banned phrases for generated text. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBannedPhrases() - { - return $this->banned_phrases; - } - - /** - * Banned phrases for generated text. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\SafetySettings\Phrase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBannedPhrases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\Phrase::class); - $this->banned_phrases = $arr; - - return $this; - } - - /** - * Optional. Settings for Responsible AI checks. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings|null - */ - public function getRaiSettings() - { - return $this->rai_settings; - } - - public function hasRaiSettings() - { - return isset($this->rai_settings); - } - - public function clearRaiSettings() - { - unset($this->rai_settings); - } - - /** - * Optional. Settings for Responsible AI checks. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $var - * @return $this - */ - public function setRaiSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings::class); - $this->rai_settings = $var; - - return $this; - } - - /** - * Optional. Immutable. Default RAI settings to be annotated on the agent, so - * that users will be able to restore their RAI configurations to the default - * settings. Read-only field for the API proto only. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings|null - */ - public function getDefaultRaiSettings() - { - return $this->default_rai_settings; - } - - public function hasDefaultRaiSettings() - { - return isset($this->default_rai_settings); - } - - public function clearDefaultRaiSettings() - { - unset($this->default_rai_settings); - } - - /** - * Optional. Immutable. Default RAI settings to be annotated on the agent, so - * that users will be able to restore their RAI configurations to the default - * settings. Read-only field for the API proto only. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings $var - * @return $this - */ - public function setDefaultRaiSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\RaiSettings::class); - $this->default_rai_settings = $var; - - return $this; - } - - /** - * Optional. Settings for prompt security checks. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings|null - */ - public function getPromptSecuritySettings() - { - return $this->prompt_security_settings; - } - - public function hasPromptSecuritySettings() - { - return isset($this->prompt_security_settings); - } - - public function clearPromptSecuritySettings() - { - unset($this->prompt_security_settings); - } - - /** - * Optional. Settings for prompt security checks. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings $var - * @return $this - */ - public function setPromptSecuritySettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings\PromptSecuritySettings::class); - $this->prompt_security_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/Phrase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/Phrase.php deleted file mode 100644 index 1b3894187c66..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SafetySettings/Phrase.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - */ -class Phrase extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Text input which can be used for prompt or banned phrases. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $text = ''; - /** - * Required. Language code of the phrase. - * - * 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. Text input which can be used for prompt or banned phrases. - * @type string $language_code - * Required. Language code of the phrase. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SafetySettings::initOnce(); - parent::__construct($data); - } - - /** - * Required. Text input which can be used for prompt or banned phrases. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Required. Text input which can be used for prompt or banned phrases. - * - * 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. Language code of the phrase. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Required. Language code of the phrase. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Phrase::class, \Google\Cloud\Dialogflow\Cx\V3\SafetySettings_Phrase::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SearchConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SearchConfig.php deleted file mode 100644 index df261de52ea9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SearchConfig.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.dialogflow.cx.v3.SearchConfig - */ -class SearchConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Boosting configuration for the datastores. - * Maps from datastore name to their boost configuration. Do not specify more - * than one BoostSpecs for each datastore name. If multiple BoostSpecs are - * provided for the same datastore name, the behavior is undefined. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $boost_specs; - /** - * Optional. Filter configuration for the datastores. - * Maps from datastore name to the filter expression for that datastore. Do - * not specify more than one FilterSpecs for each datastore name. If multiple - * FilterSpecs are provided for the same datastore name, the behavior is - * undefined. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $filter_specs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpecs>|\Google\Protobuf\Internal\RepeatedField $boost_specs - * Optional. Boosting configuration for the datastores. - * Maps from datastore name to their boost configuration. Do not specify more - * than one BoostSpecs for each datastore name. If multiple BoostSpecs are - * provided for the same datastore name, the behavior is undefined. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\FilterSpecs>|\Google\Protobuf\Internal\RepeatedField $filter_specs - * Optional. Filter configuration for the datastores. - * Maps from datastore name to the filter expression for that datastore. Do - * not specify more than one FilterSpecs for each datastore name. If multiple - * FilterSpecs are provided for the same datastore name, the behavior is - * undefined. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Boosting configuration for the datastores. - * Maps from datastore name to their boost configuration. Do not specify more - * than one BoostSpecs for each datastore name. If multiple BoostSpecs are - * provided for the same datastore name, the behavior is undefined. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBoostSpecs() - { - return $this->boost_specs; - } - - /** - * Optional. Boosting configuration for the datastores. - * Maps from datastore name to their boost configuration. Do not specify more - * than one BoostSpecs for each datastore name. If multiple BoostSpecs are - * provided for the same datastore name, the behavior is undefined. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.BoostSpecs boost_specs = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\BoostSpecs>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBoostSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\BoostSpecs::class); - $this->boost_specs = $arr; - - return $this; - } - - /** - * Optional. Filter configuration for the datastores. - * Maps from datastore name to the filter expression for that datastore. Do - * not specify more than one FilterSpecs for each datastore name. If multiple - * FilterSpecs are provided for the same datastore name, the behavior is - * undefined. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFilterSpecs() - { - return $this->filter_specs; - } - - /** - * Optional. Filter configuration for the datastores. - * Maps from datastore name to the filter expression for that datastore. Do - * not specify more than one FilterSpecs for each datastore name. If multiple - * FilterSpecs are provided for the same datastore name, the behavior is - * undefined. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.FilterSpecs filter_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\FilterSpecs>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFilterSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\FilterSpecs::class); - $this->filter_specs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php deleted file mode 100644 index ac6874769c0e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings.php +++ /dev/null @@ -1,664 +0,0 @@ -google.cloud.dialogflow.cx.v3.SecuritySettings - */ -class SecuritySettings extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the settings. - * Required for the - * [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] - * method. - * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings] - * populates the name automatically. Format: - * `projects//locations//securitySettings/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the security settings, unique within - * the location. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Strategy that defines how we do redaction. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy redaction_strategy = 3; - */ - protected $redaction_strategy = 0; - /** - * Defines the data for which Dialogflow applies redaction. Dialogflow does - * not redact data that it does not have access to – for example, Cloud - * logging. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope redaction_scope = 4; - */ - protected $redaction_scope = 0; - /** - * [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this - * template to define inspect base settings. - * The `DLP Inspect Templates Reader` role is needed on the Dialogflow - * service identity service account (has the form - * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) - * for your agent's project. - * If empty, we use the default DLP inspect config. - * The template name will have one of the following formats: - * `projects//locations//inspectTemplates/` - * OR - * `organizations//locations//inspectTemplates/` - * Note: `inspect_template` must be located in the same region as the - * `SecuritySettings`. - * - * Generated from protobuf field string inspect_template = 9 [(.google.api.resource_reference) = { - */ - protected $inspect_template = ''; - /** - * [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this - * template to define de-identification configuration for the content. - * The `DLP De-identify Templates Reader` role is needed on the Dialogflow - * service identity service account (has the form - * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) - * for your agent's project. - * If empty, Dialogflow replaces sensitive info with `[redacted]` text. - * The template name will have one of the following formats: - * `projects//locations//deidentifyTemplates/` - * OR - * `organizations//locations//deidentifyTemplates/` - * Note: `deidentify_template` must be located in the same region as the - * `SecuritySettings`. - * - * Generated from protobuf field string deidentify_template = 17 [(.google.api.resource_reference) = { - */ - protected $deidentify_template = ''; - /** - * List of types of data to remove when retention settings triggers purge. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; - */ - private $purge_data_types; - /** - * Controls audio export settings for post-conversation analytics when - * ingesting audio to conversations via [Participants.AnalyzeContent][] or - * [Participants.StreamingAnalyzeContent][]. - * If - * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] - * is set to REMOVE_AFTER_CONVERSATION or [audio_export_settings.gcs_bucket][] - * is empty, audio export is disabled. - * If audio export is enabled, audio is recorded and saved to - * [audio_export_settings.gcs_bucket][], subject to retention policy of - * [audio_export_settings.gcs_bucket][]. - * This setting won't effect audio input for implicit sessions via - * [Sessions.DetectIntent][google.cloud.dialogflow.cx.v3.Sessions.DetectIntent] - * or - * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings audio_export_settings = 12; - */ - protected $audio_export_settings = null; - /** - * Controls conversation exporting settings to Insights after conversation is - * completed. - * If - * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] - * is set to REMOVE_AFTER_CONVERSATION, Insights export is disabled no matter - * what you configure here. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; - */ - protected $insights_export_settings = null; - protected $data_retention; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the settings. - * Required for the - * [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] - * method. - * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings] - * populates the name automatically. Format: - * `projects//locations//securitySettings/`. - * @type string $display_name - * Required. The human-readable name of the security settings, unique within - * the location. - * @type int $redaction_strategy - * Strategy that defines how we do redaction. - * @type int $redaction_scope - * Defines the data for which Dialogflow applies redaction. Dialogflow does - * not redact data that it does not have access to – for example, Cloud - * logging. - * @type string $inspect_template - * [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this - * template to define inspect base settings. - * The `DLP Inspect Templates Reader` role is needed on the Dialogflow - * service identity service account (has the form - * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) - * for your agent's project. - * If empty, we use the default DLP inspect config. - * The template name will have one of the following formats: - * `projects//locations//inspectTemplates/` - * OR - * `organizations//locations//inspectTemplates/` - * Note: `inspect_template` must be located in the same region as the - * `SecuritySettings`. - * @type string $deidentify_template - * [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this - * template to define de-identification configuration for the content. - * The `DLP De-identify Templates Reader` role is needed on the Dialogflow - * service identity service account (has the form - * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) - * for your agent's project. - * If empty, Dialogflow replaces sensitive info with `[redacted]` text. - * The template name will have one of the following formats: - * `projects//locations//deidentifyTemplates/` - * OR - * `organizations//locations//deidentifyTemplates/` - * Note: `deidentify_template` must be located in the same region as the - * `SecuritySettings`. - * @type int $retention_window_days - * Retains the data for the specified number of days. - * User must set a value lower than Dialogflow's default 365d TTL (30 days - * for Agent Assist traffic), higher value will be ignored and use default. - * Setting a value higher than that has no effect. A missing value or - * setting to 0 also means we use default TTL. - * When data retention configuration is changed, it only applies to the data - * created after the change; the TTL of existing data created before the - * change stays intact. - * @type int $retention_strategy - * Specifies the retention behavior defined by - * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy]. - * @type array|\Google\Protobuf\Internal\RepeatedField $purge_data_types - * List of types of data to remove when retention settings triggers purge. - * @type \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\AudioExportSettings $audio_export_settings - * Controls audio export settings for post-conversation analytics when - * ingesting audio to conversations via [Participants.AnalyzeContent][] or - * [Participants.StreamingAnalyzeContent][]. - * If - * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] - * is set to REMOVE_AFTER_CONVERSATION or [audio_export_settings.gcs_bucket][] - * is empty, audio export is disabled. - * If audio export is enabled, audio is recorded and saved to - * [audio_export_settings.gcs_bucket][], subject to retention policy of - * [audio_export_settings.gcs_bucket][]. - * This setting won't effect audio input for implicit sessions via - * [Sessions.DetectIntent][google.cloud.dialogflow.cx.v3.Sessions.DetectIntent] - * or - * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]. - * @type \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\InsightsExportSettings $insights_export_settings - * Controls conversation exporting settings to Insights after conversation is - * completed. - * If - * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] - * is set to REMOVE_AFTER_CONVERSATION, Insights export is disabled no matter - * what you configure here. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the settings. - * Required for the - * [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] - * method. - * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings] - * populates the name automatically. Format: - * `projects//locations//securitySettings/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the settings. - * Required for the - * [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] - * method. - * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings] - * populates the name automatically. Format: - * `projects//locations//securitySettings/`. - * - * 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 human-readable name of the security settings, unique within - * the location. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the security settings, unique within - * the location. - * - * 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; - } - - /** - * Strategy that defines how we do redaction. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy redaction_strategy = 3; - * @return int - */ - public function getRedactionStrategy() - { - return $this->redaction_strategy; - } - - /** - * Strategy that defines how we do redaction. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy redaction_strategy = 3; - * @param int $var - * @return $this - */ - public function setRedactionStrategy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\RedactionStrategy::class); - $this->redaction_strategy = $var; - - return $this; - } - - /** - * Defines the data for which Dialogflow applies redaction. Dialogflow does - * not redact data that it does not have access to – for example, Cloud - * logging. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope redaction_scope = 4; - * @return int - */ - public function getRedactionScope() - { - return $this->redaction_scope; - } - - /** - * Defines the data for which Dialogflow applies redaction. Dialogflow does - * not redact data that it does not have access to – for example, Cloud - * logging. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope redaction_scope = 4; - * @param int $var - * @return $this - */ - public function setRedactionScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\RedactionScope::class); - $this->redaction_scope = $var; - - return $this; - } - - /** - * [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this - * template to define inspect base settings. - * The `DLP Inspect Templates Reader` role is needed on the Dialogflow - * service identity service account (has the form - * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) - * for your agent's project. - * If empty, we use the default DLP inspect config. - * The template name will have one of the following formats: - * `projects//locations//inspectTemplates/` - * OR - * `organizations//locations//inspectTemplates/` - * Note: `inspect_template` must be located in the same region as the - * `SecuritySettings`. - * - * Generated from protobuf field string inspect_template = 9 [(.google.api.resource_reference) = { - * @return string - */ - public function getInspectTemplate() - { - return $this->inspect_template; - } - - /** - * [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this - * template to define inspect base settings. - * The `DLP Inspect Templates Reader` role is needed on the Dialogflow - * service identity service account (has the form - * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) - * for your agent's project. - * If empty, we use the default DLP inspect config. - * The template name will have one of the following formats: - * `projects//locations//inspectTemplates/` - * OR - * `organizations//locations//inspectTemplates/` - * Note: `inspect_template` must be located in the same region as the - * `SecuritySettings`. - * - * Generated from protobuf field string inspect_template = 9 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInspectTemplate($var) - { - GPBUtil::checkString($var, True); - $this->inspect_template = $var; - - return $this; - } - - /** - * [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this - * template to define de-identification configuration for the content. - * The `DLP De-identify Templates Reader` role is needed on the Dialogflow - * service identity service account (has the form - * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) - * for your agent's project. - * If empty, Dialogflow replaces sensitive info with `[redacted]` text. - * The template name will have one of the following formats: - * `projects//locations//deidentifyTemplates/` - * OR - * `organizations//locations//deidentifyTemplates/` - * Note: `deidentify_template` must be located in the same region as the - * `SecuritySettings`. - * - * Generated from protobuf field string deidentify_template = 17 [(.google.api.resource_reference) = { - * @return string - */ - public function getDeidentifyTemplate() - { - return $this->deidentify_template; - } - - /** - * [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this - * template to define de-identification configuration for the content. - * The `DLP De-identify Templates Reader` role is needed on the Dialogflow - * service identity service account (has the form - * `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) - * for your agent's project. - * If empty, Dialogflow replaces sensitive info with `[redacted]` text. - * The template name will have one of the following formats: - * `projects//locations//deidentifyTemplates/` - * OR - * `organizations//locations//deidentifyTemplates/` - * Note: `deidentify_template` must be located in the same region as the - * `SecuritySettings`. - * - * Generated from protobuf field string deidentify_template = 17 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDeidentifyTemplate($var) - { - GPBUtil::checkString($var, True); - $this->deidentify_template = $var; - - return $this; - } - - /** - * Retains the data for the specified number of days. - * User must set a value lower than Dialogflow's default 365d TTL (30 days - * for Agent Assist traffic), higher value will be ignored and use default. - * Setting a value higher than that has no effect. A missing value or - * setting to 0 also means we use default TTL. - * When data retention configuration is changed, it only applies to the data - * created after the change; the TTL of existing data created before the - * change stays intact. - * - * Generated from protobuf field int32 retention_window_days = 6; - * @return int - */ - public function getRetentionWindowDays() - { - return $this->readOneof(6); - } - - public function hasRetentionWindowDays() - { - return $this->hasOneof(6); - } - - /** - * Retains the data for the specified number of days. - * User must set a value lower than Dialogflow's default 365d TTL (30 days - * for Agent Assist traffic), higher value will be ignored and use default. - * Setting a value higher than that has no effect. A missing value or - * setting to 0 also means we use default TTL. - * When data retention configuration is changed, it only applies to the data - * created after the change; the TTL of existing data created before the - * change stays intact. - * - * Generated from protobuf field int32 retention_window_days = 6; - * @param int $var - * @return $this - */ - public function setRetentionWindowDays($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Specifies the retention behavior defined by - * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; - * @return int - */ - public function getRetentionStrategy() - { - return $this->readOneof(7); - } - - public function hasRetentionStrategy() - { - return $this->hasOneof(7); - } - - /** - * Specifies the retention behavior defined by - * [SecuritySettings.RetentionStrategy][google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy retention_strategy = 7; - * @param int $var - * @return $this - */ - public function setRetentionStrategy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\RetentionStrategy::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * List of types of data to remove when retention settings triggers purge. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPurgeDataTypes() - { - return $this->purge_data_types; - } - - /** - * List of types of data to remove when retention settings triggers purge. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPurgeDataTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\PurgeDataType::class); - $this->purge_data_types = $arr; - - return $this; - } - - /** - * Controls audio export settings for post-conversation analytics when - * ingesting audio to conversations via [Participants.AnalyzeContent][] or - * [Participants.StreamingAnalyzeContent][]. - * If - * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] - * is set to REMOVE_AFTER_CONVERSATION or [audio_export_settings.gcs_bucket][] - * is empty, audio export is disabled. - * If audio export is enabled, audio is recorded and saved to - * [audio_export_settings.gcs_bucket][], subject to retention policy of - * [audio_export_settings.gcs_bucket][]. - * This setting won't effect audio input for implicit sessions via - * [Sessions.DetectIntent][google.cloud.dialogflow.cx.v3.Sessions.DetectIntent] - * or - * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings audio_export_settings = 12; - * @return \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\AudioExportSettings|null - */ - public function getAudioExportSettings() - { - return $this->audio_export_settings; - } - - public function hasAudioExportSettings() - { - return isset($this->audio_export_settings); - } - - public function clearAudioExportSettings() - { - unset($this->audio_export_settings); - } - - /** - * Controls audio export settings for post-conversation analytics when - * ingesting audio to conversations via [Participants.AnalyzeContent][] or - * [Participants.StreamingAnalyzeContent][]. - * If - * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] - * is set to REMOVE_AFTER_CONVERSATION or [audio_export_settings.gcs_bucket][] - * is empty, audio export is disabled. - * If audio export is enabled, audio is recorded and saved to - * [audio_export_settings.gcs_bucket][], subject to retention policy of - * [audio_export_settings.gcs_bucket][]. - * This setting won't effect audio input for implicit sessions via - * [Sessions.DetectIntent][google.cloud.dialogflow.cx.v3.Sessions.DetectIntent] - * or - * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings audio_export_settings = 12; - * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\AudioExportSettings $var - * @return $this - */ - public function setAudioExportSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\AudioExportSettings::class); - $this->audio_export_settings = $var; - - return $this; - } - - /** - * Controls conversation exporting settings to Insights after conversation is - * completed. - * If - * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] - * is set to REMOVE_AFTER_CONVERSATION, Insights export is disabled no matter - * what you configure here. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; - * @return \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\InsightsExportSettings|null - */ - public function getInsightsExportSettings() - { - return $this->insights_export_settings; - } - - public function hasInsightsExportSettings() - { - return isset($this->insights_export_settings); - } - - public function clearInsightsExportSettings() - { - unset($this->insights_export_settings); - } - - /** - * Controls conversation exporting settings to Insights after conversation is - * completed. - * If - * [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] - * is set to REMOVE_AFTER_CONVERSATION, Insights export is disabled no matter - * what you configure here. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; - * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\InsightsExportSettings $var - * @return $this - */ - public function setInsightsExportSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\InsightsExportSettings::class); - $this->insights_export_settings = $var; - - return $this; - } - - /** - * @return string - */ - public function getDataRetention() - { - return $this->whichOneof("data_retention"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings.php deleted file mode 100644 index dd50e8d017e7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - */ -class AudioExportSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Storage bucket to export audio record to. - * Setting this field would grant the Storage Object Creator role to - * the Dialogflow Service Agent. - * API caller that tries to modify this field should have the permission of - * storage.buckets.setIamPolicy. - * - * Generated from protobuf field string gcs_bucket = 1; - */ - protected $gcs_bucket = ''; - /** - * Filename pattern for exported audio. - * {conversation} and {timestamp} are placeholders that will be replaced - * with the conversation ID and epoch micros of the conversation. - * For example, "{conversation}/recording_{timestamp}.mulaw". - * - * Generated from protobuf field string audio_export_pattern = 2; - */ - protected $audio_export_pattern = ''; - /** - * Enable audio redaction if it is true. - * Note that this only redacts end-user audio data; - * Synthesised audio from the virtual agent is not redacted. - * - * Generated from protobuf field bool enable_audio_redaction = 3; - */ - protected $enable_audio_redaction = false; - /** - * File format for exported audio file. Currently only in telephony - * recordings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat audio_format = 4; - */ - protected $audio_format = 0; - /** - * Whether to store TTS audio. By default, TTS audio from the virtual agent - * is not exported. - * - * Generated from protobuf field bool store_tts_audio = 6; - */ - protected $store_tts_audio = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_bucket - * Cloud Storage bucket to export audio record to. - * Setting this field would grant the Storage Object Creator role to - * the Dialogflow Service Agent. - * API caller that tries to modify this field should have the permission of - * storage.buckets.setIamPolicy. - * @type string $audio_export_pattern - * Filename pattern for exported audio. - * {conversation} and {timestamp} are placeholders that will be replaced - * with the conversation ID and epoch micros of the conversation. - * For example, "{conversation}/recording_{timestamp}.mulaw". - * @type bool $enable_audio_redaction - * Enable audio redaction if it is true. - * Note that this only redacts end-user audio data; - * Synthesised audio from the virtual agent is not redacted. - * @type int $audio_format - * File format for exported audio file. Currently only in telephony - * recordings. - * @type bool $store_tts_audio - * Whether to store TTS audio. By default, TTS audio from the virtual agent - * is not exported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage bucket to export audio record to. - * Setting this field would grant the Storage Object Creator role to - * the Dialogflow Service Agent. - * API caller that tries to modify this field should have the permission of - * storage.buckets.setIamPolicy. - * - * Generated from protobuf field string gcs_bucket = 1; - * @return string - */ - public function getGcsBucket() - { - return $this->gcs_bucket; - } - - /** - * Cloud Storage bucket to export audio record to. - * Setting this field would grant the Storage Object Creator role to - * the Dialogflow Service Agent. - * API caller that tries to modify this field should have the permission of - * storage.buckets.setIamPolicy. - * - * Generated from protobuf field string gcs_bucket = 1; - * @param string $var - * @return $this - */ - public function setGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->gcs_bucket = $var; - - return $this; - } - - /** - * Filename pattern for exported audio. - * {conversation} and {timestamp} are placeholders that will be replaced - * with the conversation ID and epoch micros of the conversation. - * For example, "{conversation}/recording_{timestamp}.mulaw". - * - * Generated from protobuf field string audio_export_pattern = 2; - * @return string - */ - public function getAudioExportPattern() - { - return $this->audio_export_pattern; - } - - /** - * Filename pattern for exported audio. - * {conversation} and {timestamp} are placeholders that will be replaced - * with the conversation ID and epoch micros of the conversation. - * For example, "{conversation}/recording_{timestamp}.mulaw". - * - * Generated from protobuf field string audio_export_pattern = 2; - * @param string $var - * @return $this - */ - public function setAudioExportPattern($var) - { - GPBUtil::checkString($var, True); - $this->audio_export_pattern = $var; - - return $this; - } - - /** - * Enable audio redaction if it is true. - * Note that this only redacts end-user audio data; - * Synthesised audio from the virtual agent is not redacted. - * - * Generated from protobuf field bool enable_audio_redaction = 3; - * @return bool - */ - public function getEnableAudioRedaction() - { - return $this->enable_audio_redaction; - } - - /** - * Enable audio redaction if it is true. - * Note that this only redacts end-user audio data; - * Synthesised audio from the virtual agent is not redacted. - * - * Generated from protobuf field bool enable_audio_redaction = 3; - * @param bool $var - * @return $this - */ - public function setEnableAudioRedaction($var) - { - GPBUtil::checkBool($var); - $this->enable_audio_redaction = $var; - - return $this; - } - - /** - * File format for exported audio file. Currently only in telephony - * recordings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat audio_format = 4; - * @return int - */ - public function getAudioFormat() - { - return $this->audio_format; - } - - /** - * File format for exported audio file. Currently only in telephony - * recordings. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat audio_format = 4; - * @param int $var - * @return $this - */ - public function setAudioFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings\AudioExportSettings\AudioFormat::class); - $this->audio_format = $var; - - return $this; - } - - /** - * Whether to store TTS audio. By default, TTS audio from the virtual agent - * is not exported. - * - * Generated from protobuf field bool store_tts_audio = 6; - * @return bool - */ - public function getStoreTtsAudio() - { - return $this->store_tts_audio; - } - - /** - * Whether to store TTS audio. By default, TTS audio from the virtual agent - * is not exported. - * - * Generated from protobuf field bool store_tts_audio = 6; - * @param bool $var - * @return $this - */ - public function setStoreTtsAudio($var) - { - GPBUtil::checkBool($var); - $this->store_tts_audio = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AudioExportSettings::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_AudioExportSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings/AudioFormat.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings/AudioFormat.php deleted file mode 100644 index 14def86c787f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/AudioExportSettings/AudioFormat.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat - */ -class AudioFormat -{ - /** - * Unspecified. Do not use. - * - * Generated from protobuf enum AUDIO_FORMAT_UNSPECIFIED = 0; - */ - const AUDIO_FORMAT_UNSPECIFIED = 0; - /** - * G.711 mu-law PCM with 8kHz sample rate. - * - * Generated from protobuf enum MULAW = 1; - */ - const MULAW = 1; - /** - * MP3 file format. - * - * Generated from protobuf enum MP3 = 2; - */ - const MP3 = 2; - /** - * OGG Vorbis. - * - * Generated from protobuf enum OGG = 3; - */ - const OGG = 3; - - private static $valueToName = [ - self::AUDIO_FORMAT_UNSPECIFIED => 'AUDIO_FORMAT_UNSPECIFIED', - self::MULAW => 'MULAW', - self::MP3 => 'MP3', - self::OGG => 'OGG', - ]; - - 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(AudioFormat::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_AudioExportSettings_AudioFormat::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/InsightsExportSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/InsightsExportSettings.php deleted file mode 100644 index 15efba779a48..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/InsightsExportSettings.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - */ -class InsightsExportSettings extends \Google\Protobuf\Internal\Message -{ - /** - * If enabled, we will automatically exports - * conversations to Insights and Insights runs its analyzers. - * - * Generated from protobuf field bool enable_insights_export = 1; - */ - protected $enable_insights_export = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_insights_export - * If enabled, we will automatically exports - * conversations to Insights and Insights runs its analyzers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::initOnce(); - parent::__construct($data); - } - - /** - * If enabled, we will automatically exports - * conversations to Insights and Insights runs its analyzers. - * - * Generated from protobuf field bool enable_insights_export = 1; - * @return bool - */ - public function getEnableInsightsExport() - { - return $this->enable_insights_export; - } - - /** - * If enabled, we will automatically exports - * conversations to Insights and Insights runs its analyzers. - * - * Generated from protobuf field bool enable_insights_export = 1; - * @param bool $var - * @return $this - */ - public function setEnableInsightsExport($var) - { - GPBUtil::checkBool($var); - $this->enable_insights_export = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InsightsExportSettings::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_InsightsExportSettings::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/PurgeDataType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/PurgeDataType.php deleted file mode 100644 index 812e66f5b94d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/PurgeDataType.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType - */ -class PurgeDataType -{ - /** - * Unspecified. Do not use. - * - * Generated from protobuf enum PURGE_DATA_TYPE_UNSPECIFIED = 0; - */ - const PURGE_DATA_TYPE_UNSPECIFIED = 0; - /** - * Dialogflow history. This does not include Cloud logging, which is - * owned by the user - not Dialogflow. - * - * Generated from protobuf enum DIALOGFLOW_HISTORY = 1; - */ - const DIALOGFLOW_HISTORY = 1; - - private static $valueToName = [ - self::PURGE_DATA_TYPE_UNSPECIFIED => 'PURGE_DATA_TYPE_UNSPECIFIED', - self::DIALOGFLOW_HISTORY => 'DIALOGFLOW_HISTORY', - ]; - - 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(PurgeDataType::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_PurgeDataType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionScope.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionScope.php deleted file mode 100644 index bb8dc42d46a5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionScope.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope - */ -class RedactionScope -{ - /** - * Don't redact any kind of data. - * - * Generated from protobuf enum REDACTION_SCOPE_UNSPECIFIED = 0; - */ - const REDACTION_SCOPE_UNSPECIFIED = 0; - /** - * On data to be written to disk or similar devices that are capable of - * holding data even if power is disconnected. This includes data that are - * temporarily saved on disk. - * - * Generated from protobuf enum REDACT_DISK_STORAGE = 2; - */ - const REDACT_DISK_STORAGE = 2; - - private static $valueToName = [ - self::REDACTION_SCOPE_UNSPECIFIED => 'REDACTION_SCOPE_UNSPECIFIED', - self::REDACT_DISK_STORAGE => 'REDACT_DISK_STORAGE', - ]; - - 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(RedactionScope::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_RedactionScope::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionStrategy.php deleted file mode 100644 index 9df4b80256cb..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RedactionStrategy.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy - */ -class RedactionStrategy -{ - /** - * Do not redact. - * - * Generated from protobuf enum REDACTION_STRATEGY_UNSPECIFIED = 0; - */ - const REDACTION_STRATEGY_UNSPECIFIED = 0; - /** - * Call redaction service to clean up the data to be persisted. - * - * Generated from protobuf enum REDACT_WITH_SERVICE = 1; - */ - const REDACT_WITH_SERVICE = 1; - - private static $valueToName = [ - self::REDACTION_STRATEGY_UNSPECIFIED => 'REDACTION_STRATEGY_UNSPECIFIED', - self::REDACT_WITH_SERVICE => 'REDACT_WITH_SERVICE', - ]; - - 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(RedactionStrategy::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_RedactionStrategy::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RetentionStrategy.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RetentionStrategy.php deleted file mode 100644 index 1ed62776ef37..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SecuritySettings/RetentionStrategy.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy - */ -class RetentionStrategy -{ - /** - * Retains the persisted data with Dialogflow's internal default 365d TTLs. - * - * Generated from protobuf enum RETENTION_STRATEGY_UNSPECIFIED = 0; - */ - const RETENTION_STRATEGY_UNSPECIFIED = 0; - /** - * Removes data when the conversation ends. If there is no [Conversation][] - * explicitly established, a default conversation ends when the - * corresponding Dialogflow session ends. - * - * Generated from protobuf enum REMOVE_AFTER_CONVERSATION = 1; - */ - const REMOVE_AFTER_CONVERSATION = 1; - - private static $valueToName = [ - self::RETENTION_STRATEGY_UNSPECIFIED => 'RETENTION_STRATEGY_UNSPECIFIED', - self::REMOVE_AFTER_CONVERSATION => 'REMOVE_AFTER_CONVERSATION', - ]; - - 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(RetentionStrategy::class, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings_RetentionStrategy::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SentimentAnalysisResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SentimentAnalysisResult.php deleted file mode 100644 index f943f7222d97..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SentimentAnalysisResult.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.dialogflow.cx.v3.SentimentAnalysisResult - */ -class SentimentAnalysisResult 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\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType.php deleted file mode 100644 index 276fa59d7bee..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.dialogflow.cx.v3.SessionEntityType - */ -class SessionEntityType extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique identifier of the session entity type. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * - * 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.cx.v3.SessionEntityType.EntityOverrideMode entity_override_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity_override_mode = 0; - /** - * Required. The collection of entities to override or supplement the custom - * entity type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 4 [(.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 the session entity type. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * @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\Cx\V3\EntityType\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Required. The collection of entities to override or supplement the custom - * entity type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique identifier of the session entity type. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * 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 session entity type. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * 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; - } - - /** - * Required. Indicates whether the additional data should override or - * supplement the custom entity type definition. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode entity_override_mode = 3 [(.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.cx.v3.SessionEntityType.EntityOverrideMode entity_override_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setEntityOverrideMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType\EntityOverrideMode::class); - $this->entity_override_mode = $var; - - return $this; - } - - /** - * Required. The collection of entities to override or supplement the custom - * entity type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Required. The collection of entities to override or supplement the custom - * entity type. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\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\Cx\V3\EntityType\Entity::class); - $this->entities = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType/EntityOverrideMode.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType/EntityOverrideMode.php deleted file mode 100644 index d5a9388c9778..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionEntityType/EntityOverrideMode.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.dialogflow.cx.v3.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.cx.v3.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\Cx\V3\SessionEntityType_EntityOverrideMode::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionInfo.php deleted file mode 100644 index 6a0e0c1a1945..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SessionInfo.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.dialogflow.cx.v3.SessionInfo - */ -class SessionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * unique identifier of the - * [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This - * field can be used by the webhook to identify a session. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/` - * if environment is specified. - * - * Generated from protobuf field string session = 1 [(.google.api.resource_reference) = { - */ - protected $session = ''; - /** - * Optional for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional - * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All - * parameters collected from forms and intents during the session. Parameters - * can be created, updated, or removed by the webhook. To remove a parameter - * from the session, the webhook should explicitly set the parameter value to - * null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * The map is keyed by parameters' display names. - * - * Generated from protobuf field map parameters = 2; - */ - private $parameters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $session - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * unique identifier of the - * [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This - * field can be used by the webhook to identify a session. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/` - * if environment is specified. - * @type array|\Google\Protobuf\Internal\MapField $parameters - * Optional for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional - * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All - * parameters collected from forms and intents during the session. Parameters - * can be created, updated, or removed by the webhook. To remove a parameter - * from the session, the webhook should explicitly set the parameter value to - * null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * The map is keyed by parameters' display names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * unique identifier of the - * [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This - * field can be used by the webhook to identify a session. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/` - * if environment is specified. - * - * Generated from protobuf field string session = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getSession() - { - return $this->session; - } - - /** - * Always present for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for - * [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The - * unique identifier of the - * [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This - * field can be used by the webhook to identify a session. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/` - * if environment is specified. - * - * Generated from protobuf field string session = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSession($var) - { - GPBUtil::checkString($var, True); - $this->session = $var; - - return $this; - } - - /** - * Optional for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional - * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All - * parameters collected from forms and intents during the session. Parameters - * can be created, updated, or removed by the webhook. To remove a parameter - * from the session, the webhook should explicitly set the parameter value to - * null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * The map is keyed by parameters' display names. - * - * Generated from protobuf field map parameters = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Optional for - * [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional - * for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All - * parameters collected from forms and intents during the session. Parameters - * can be created, updated, or removed by the webhook. To remove a parameter - * from the session, the webhook should explicitly set the parameter value to - * null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. - * The map is keyed by parameters' display names. - * - * Generated from protobuf field map parameters = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->parameters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechModelVariant.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechModelVariant.php deleted file mode 100644 index fc49f268c1f0..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechModelVariant.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.dialogflow.cx.v3.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. - * - * 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.cx.v3.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. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechToTextSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechToTextSettings.php deleted file mode 100644 index 757d670f862c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechToTextSettings.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dialogflow.cx.v3.SpeechToTextSettings - */ -class SpeechToTextSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Whether to use speech adaptation for speech recognition. - * - * Generated from protobuf field bool enable_speech_adaptation = 1; - */ - protected $enable_speech_adaptation = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_speech_adaptation - * Whether to use speech adaptation for speech recognition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Whether to use speech adaptation for speech recognition. - * - * Generated from protobuf field bool enable_speech_adaptation = 1; - * @return bool - */ - public function getEnableSpeechAdaptation() - { - return $this->enable_speech_adaptation; - } - - /** - * Whether to use speech adaptation for speech recognition. - * - * Generated from protobuf field bool enable_speech_adaptation = 1; - * @param bool $var - * @return $this - */ - public function setEnableSpeechAdaptation($var) - { - GPBUtil::checkBool($var); - $this->enable_speech_adaptation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechWordInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechWordInfo.php deleted file mode 100644 index 86eef94bf55c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SpeechWordInfo.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.dialogflow.cx.v3.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\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SsmlVoiceGender.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SsmlVoiceGender.php deleted file mode 100644 index b08fbec467ce..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SsmlVoiceGender.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dialogflow.cx.v3.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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StartExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StartExperimentRequest.php deleted file mode 100644 index b68f6792a0fd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StartExperimentRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.StartExperimentRequest - */ -class StartExperimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the experiment to start. - * Format: - * `projects//locations//agents//environments//experiments/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the experiment to start. - * Format: - * `projects//locations//agents//environments//experiments/`. Please see - * {@see ExperimentsClient::experimentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\StartExperimentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the experiment to start. - * Format: - * `projects//locations//agents//environments//experiments/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the experiment to start. - * Format: - * `projects//locations//agents//environments//experiments/`. - * - * 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 name of the experiment to start. - * Format: - * `projects//locations//agents//environments//experiments/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StopExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StopExperimentRequest.php deleted file mode 100644 index a2803c63e258..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StopExperimentRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.StopExperimentRequest - */ -class StopExperimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the experiment to stop. - * Format: - * `projects//locations//agents//environments//experiments/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the experiment to stop. - * Format: - * `projects//locations//agents//environments//experiments/`. Please see - * {@see ExperimentsClient::experimentName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\StopExperimentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the experiment to stop. - * Format: - * `projects//locations//agents//environments//experiments/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the experiment to stop. - * Format: - * `projects//locations//agents//environments//experiments/`. - * - * 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 name of the experiment to stop. - * Format: - * `projects//locations//agents//environments//experiments/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentRequest.php deleted file mode 100644 index 5a2b556d4590..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentRequest.php +++ /dev/null @@ -1,407 +0,0 @@ -google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest - */ -class StreamingDetectIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the session this query is sent to. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * Note: session must be set in the first request. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). - * - * Generated from protobuf field string session = 1 [(.google.api.resource_reference) = { - */ - protected $session = ''; - /** - * The parameters of this query. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; - */ - protected $query_params = null; - /** - * Required. The input specification. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query_input = null; - /** - * Instructs the speech synthesizer how to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; - */ - protected $output_audio_config = null; - /** - * Enable partial detect intent response. If this flag is not enabled, - * response stream still contains only one final `DetectIntentResponse` even - * if some `Fulfillment`s in the agent have been configured to return partial - * responses. - * - * Generated from protobuf field bool enable_partial_response = 5; - */ - protected $enable_partial_response = false; - /** - * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. - * - * Generated from protobuf field bool enable_debugging_info = 8; - */ - protected $enable_debugging_info = false; - /** - * Optional. Specifies which fields in the - * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not - * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $response_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $session - * The name of the session this query is sent to. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * Note: session must be set in the first request. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). - * @type \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $query_params - * The parameters of this query. - * @type \Google\Cloud\Dialogflow\Cx\V3\QueryInput $query_input - * Required. The input specification. - * @type \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $output_audio_config - * Instructs the speech synthesizer how to generate the output audio. - * @type bool $enable_partial_response - * Enable partial detect intent response. If this flag is not enabled, - * response stream still contains only one final `DetectIntentResponse` even - * if some `Fulfillment`s in the agent have been configured to return partial - * responses. - * @type bool $enable_debugging_info - * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. - * @type int $response_view - * Optional. Specifies which fields in the - * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not - * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * The name of the session this query is sent to. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * Note: session must be set in the first request. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). - * - * Generated from protobuf field string session = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getSession() - { - return $this->session; - } - - /** - * The name of the session this query is sent to. - * Format: - * `projects//locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * Note: session must be set in the first request. - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). - * - * Generated from protobuf field string session = 1 [(.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.cx.v3.QueryParameters query_params = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.QueryParameters query_params = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\QueryParameters $var - * @return $this - */ - public function setQueryParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryParameters::class); - $this->query_params = $var; - - return $this; - } - - /** - * Required. The input specification. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\QueryInput $var - * @return $this - */ - public function setQueryInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\QueryInput::class); - $this->query_input = $var; - - return $this; - } - - /** - * Instructs the speech synthesizer how to generate the output audio. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; - * @return \Google\Cloud\Dialogflow\Cx\V3\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. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; - * @param \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig $var - * @return $this - */ - public function setOutputAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\OutputAudioConfig::class); - $this->output_audio_config = $var; - - return $this; - } - - /** - * Enable partial detect intent response. If this flag is not enabled, - * response stream still contains only one final `DetectIntentResponse` even - * if some `Fulfillment`s in the agent have been configured to return partial - * responses. - * - * Generated from protobuf field bool enable_partial_response = 5; - * @return bool - */ - public function getEnablePartialResponse() - { - return $this->enable_partial_response; - } - - /** - * Enable partial detect intent response. If this flag is not enabled, - * response stream still contains only one final `DetectIntentResponse` even - * if some `Fulfillment`s in the agent have been configured to return partial - * responses. - * - * Generated from protobuf field bool enable_partial_response = 5; - * @param bool $var - * @return $this - */ - public function setEnablePartialResponse($var) - { - GPBUtil::checkBool($var); - $this->enable_partial_response = $var; - - return $this; - } - - /** - * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. - * - * Generated from protobuf field bool enable_debugging_info = 8; - * @return bool - */ - public function getEnableDebuggingInfo() - { - return $this->enable_debugging_info; - } - - /** - * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. - * - * Generated from protobuf field bool enable_debugging_info = 8; - * @param bool $var - * @return $this - */ - public function setEnableDebuggingInfo($var) - { - GPBUtil::checkBool($var); - $this->enable_debugging_info = $var; - - return $this; - } - - /** - * Optional. Specifies which fields in the - * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not - * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * Optional. Specifies which fields in the - * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not - * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponseView::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentResponse.php deleted file mode 100644 index d482d49cea84..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingDetectIntentResponse.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse - */ -class StreamingDetectIntentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Debugging info that would get populated when - * `StreamingDetectIntentRequest.enable_debugging_info` is set to true. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo debugging_info = 4; - */ - protected $debugging_info = null; - protected $response; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\StreamingRecognitionResult $recognition_result - * The result of speech recognition. - * @type \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse $detect_intent_response - * The response from detect intent. - * @type \Google\Cloud\Dialogflow\Cx\V3\CloudConversationDebuggingInfo $debugging_info - * Debugging info that would get populated when - * `StreamingDetectIntentRequest.enable_debugging_info` is set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * The result of speech recognition. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.StreamingRecognitionResult recognition_result = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\StreamingRecognitionResult|null - */ - public function getRecognitionResult() - { - return $this->readOneof(1); - } - - public function hasRecognitionResult() - { - return $this->hasOneof(1); - } - - /** - * The result of speech recognition. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.StreamingRecognitionResult recognition_result = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\StreamingRecognitionResult $var - * @return $this - */ - public function setRecognitionResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\StreamingRecognitionResult::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The response from detect intent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponse detect_intent_response = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse|null - */ - public function getDetectIntentResponse() - { - return $this->readOneof(2); - } - - public function hasDetectIntentResponse() - { - return $this->hasOneof(2); - } - - /** - * The response from detect intent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.DetectIntentResponse detect_intent_response = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse $var - * @return $this - */ - public function setDetectIntentResponse($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Debugging info that would get populated when - * `StreamingDetectIntentRequest.enable_debugging_info` is set to true. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo debugging_info = 4; - * @return \Google\Cloud\Dialogflow\Cx\V3\CloudConversationDebuggingInfo|null - */ - public function getDebuggingInfo() - { - return $this->debugging_info; - } - - public function hasDebuggingInfo() - { - return isset($this->debugging_info); - } - - public function clearDebuggingInfo() - { - unset($this->debugging_info); - } - - /** - * Debugging info that would get populated when - * `StreamingDetectIntentRequest.enable_debugging_info` is set to true. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo debugging_info = 4; - * @param \Google\Cloud\Dialogflow\Cx\V3\CloudConversationDebuggingInfo $var - * @return $this - */ - public function setDebuggingInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\CloudConversationDebuggingInfo::class); - $this->debugging_info = $var; - - return $this; - } - - /** - * @return string - */ - public function getResponse() - { - return $this->whichOneof("response"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult.php deleted file mode 100644 index 7a946e3912d8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult.php +++ /dev/null @@ -1,425 +0,0 @@ -google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - */ -class StreamingRecognitionResult extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the result message. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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; - /** - * An estimate of the likelihood that the speech recognizer will - * not change its guess about this interim recognition result: - * * If the value is unspecified or 0.0, Dialogflow didn't compute the - * stability. In particular, Dialogflow will only provide stability for - * `TRANSCRIPT` results with `is_final = false`. - * * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely - * unstable and 1.0 means completely stable. - * - * Generated from protobuf field float stability = 6; - */ - protected $stability = 0.0; - /** - * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.cx.v3.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.cx.v3.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 float $stability - * An estimate of the likelihood that the speech recognizer will - * not change its guess about this interim recognition result: - * * If the value is unspecified or 0.0, Dialogflow didn't compute the - * stability. In particular, Dialogflow will only provide stability for - * `TRANSCRIPT` results with `is_final = false`. - * * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely - * unstable and 1.0 means completely stable. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\SpeechWordInfo>|\Google\Protobuf\Internal\RepeatedField $speech_word_info - * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.cx.v3.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\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Type of the result message. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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.cx.v3.StreamingRecognitionResult.MessageType message_type = 1; - * @param int $var - * @return $this - */ - public function setMessageType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\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; - } - - /** - * An estimate of the likelihood that the speech recognizer will - * not change its guess about this interim recognition result: - * * If the value is unspecified or 0.0, Dialogflow didn't compute the - * stability. In particular, Dialogflow will only provide stability for - * `TRANSCRIPT` results with `is_final = false`. - * * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely - * unstable and 1.0 means completely stable. - * - * Generated from protobuf field float stability = 6; - * @return float - */ - public function getStability() - { - return $this->stability; - } - - /** - * An estimate of the likelihood that the speech recognizer will - * not change its guess about this interim recognition result: - * * If the value is unspecified or 0.0, Dialogflow didn't compute the - * stability. In particular, Dialogflow will only provide stability for - * `TRANSCRIPT` results with `is_final = false`. - * * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely - * unstable and 1.0 means completely stable. - * - * Generated from protobuf field float stability = 6; - * @param float $var - * @return $this - */ - public function setStability($var) - { - GPBUtil::checkFloat($var); - $this->stability = $var; - - return $this; - } - - /** - * Word-specific information for the words recognized by Speech in - * [transcript][google.cloud.dialogflow.cx.v3.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.cx.v3.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.cx.v3.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.cx.v3.SpeechWordInfo speech_word_info = 7; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\SpeechWordInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpeechWordInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult/MessageType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult/MessageType.php deleted file mode 100644 index 7141d9964d97..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/StreamingRecognitionResult/MessageType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.cx.v3.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; - /** - * This event indicates that the server has detected the end of the user's - * speech utterance and expects no additional speech. 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`][google.cloud.dialogflow.cx.v3.InputAudioConfig.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\Cx\V3\StreamingRecognitionResult_MessageType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SubmitAnswerFeedbackRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SubmitAnswerFeedbackRequest.php deleted file mode 100644 index 58052fdac077..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SubmitAnswerFeedbackRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest - */ -class SubmitAnswerFeedbackRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session the feedback was sent to. - * - * Generated from protobuf field string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $session = ''; - /** - * Required. ID of the response to update its feedback. This is the same as - * DetectIntentResponse.response_id. - * - * Generated from protobuf field string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $response_id = ''; - /** - * Required. Feedback provided for a bot answer. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $answer_feedback = null; - /** - * Optional. The mask to control which fields to update. If the mask is not - * present, all fields will be 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 $session - * Required. The name of the session the feedback was sent to. - * @type string $response_id - * Required. ID of the response to update its feedback. This is the same as - * DetectIntentResponse.response_id. - * @type \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback $answer_feedback - * Required. Feedback provided for a bot answer. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The mask to control which fields to update. If the mask is not - * present, all fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session the feedback was sent to. - * - * 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 feedback was sent to. - * - * 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; - } - - /** - * Required. ID of the response to update its feedback. This is the same as - * DetectIntentResponse.response_id. - * - * Generated from protobuf field string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getResponseId() - { - return $this->response_id; - } - - /** - * Required. ID of the response to update its feedback. This is the same as - * DetectIntentResponse.response_id. - * - * Generated from protobuf field string response_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setResponseId($var) - { - GPBUtil::checkString($var, True); - $this->response_id = $var; - - return $this; - } - - /** - * Required. Feedback provided for a bot answer. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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. Feedback provided for a bot answer. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.AnswerFeedback answer_feedback = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback $var - * @return $this - */ - public function setAnswerFeedback($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback::class); - $this->answer_feedback = $var; - - return $this; - } - - /** - * Optional. The mask to control which fields to update. If the mask is not - * present, all fields will be 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 to update. If the mask is not - * present, all fields will be 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SynthesizeSpeechConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SynthesizeSpeechConfig.php deleted file mode 100644 index 00d8c4d024dc..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/SynthesizeSpeechConfig.php +++ /dev/null @@ -1,269 +0,0 @@ -google.cloud.dialogflow.cx.v3.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.cx.v3.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\Cx\V3\VoiceSelectionParams $voice - * Optional. The desired voice of the synthesized audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.VoiceSelectionParams voice = 4; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.VoiceSelectionParams voice = 4; - * @param \Google\Cloud\Dialogflow\Cx\V3\VoiceSelectionParams $var - * @return $this - */ - public function setVoice($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\VoiceSelectionParams::class); - $this->voice = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCase.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCase.php deleted file mode 100644 index c47340f503c3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCase.php +++ /dev/null @@ -1,367 +0,0 @@ -google.cloud.dialogflow.cx.v3.TestCase - */ -class TestCase extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the test case. - * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] - * will populate the name automatically. Otherwise use format: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Tags are short descriptions that users may apply to test cases for - * organizational and filtering purposes. Each tag should start with "#" and - * has a limit of 30 characters. - * - * Generated from protobuf field repeated string tags = 2; - */ - private $tags; - /** - * Required. The human-readable name of the test case, unique within the - * agent. Limit of 200 characters. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Additional freeform notes about the test case. Limit of 400 characters. - * - * Generated from protobuf field string notes = 4; - */ - protected $notes = ''; - /** - * Config for the test case. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; - */ - protected $test_config = null; - /** - * The conversation turns uttered when the test case was created, in - * chronological order. These include the canonical set of agent utterances - * that should occur when the agent is working properly. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; - */ - private $test_case_conversation_turns; - /** - * Output only. When the test was created. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creation_time = null; - /** - * The latest test result. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; - */ - protected $last_test_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the test case. - * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] - * will populate the name automatically. Otherwise use format: - * `projects//locations//agents//testCases/`. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Tags are short descriptions that users may apply to test cases for - * organizational and filtering purposes. Each tag should start with "#" and - * has a limit of 30 characters. - * @type string $display_name - * Required. The human-readable name of the test case, unique within the - * agent. Limit of 200 characters. - * @type string $notes - * Additional freeform notes about the test case. Limit of 400 characters. - * @type \Google\Cloud\Dialogflow\Cx\V3\TestConfig $test_config - * Config for the test case. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ConversationTurn>|\Google\Protobuf\Internal\RepeatedField $test_case_conversation_turns - * The conversation turns uttered when the test case was created, in - * chronological order. These include the canonical set of agent utterances - * that should occur when the agent is working properly. - * @type \Google\Protobuf\Timestamp $creation_time - * Output only. When the test was created. - * @type \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult $last_test_result - * The latest test result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the test case. - * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] - * will populate the name automatically. Otherwise use format: - * `projects//locations//agents//testCases/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the test case. - * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] - * will populate the name automatically. Otherwise use format: - * `projects//locations//agents//testCases/`. - * - * 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; - } - - /** - * Tags are short descriptions that users may apply to test cases for - * organizational and filtering purposes. Each tag should start with "#" and - * has a limit of 30 characters. - * - * Generated from protobuf field repeated string tags = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Tags are short descriptions that users may apply to test cases for - * organizational and filtering purposes. Each tag should start with "#" and - * has a limit of 30 characters. - * - * Generated from protobuf field repeated string tags = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Required. The human-readable name of the test case, unique within the - * agent. Limit of 200 characters. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the test case, unique within the - * agent. Limit of 200 characters. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Additional freeform notes about the test case. Limit of 400 characters. - * - * Generated from protobuf field string notes = 4; - * @return string - */ - public function getNotes() - { - return $this->notes; - } - - /** - * Additional freeform notes about the test case. Limit of 400 characters. - * - * Generated from protobuf field string notes = 4; - * @param string $var - * @return $this - */ - public function setNotes($var) - { - GPBUtil::checkString($var, True); - $this->notes = $var; - - return $this; - } - - /** - * Config for the test case. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; - * @return \Google\Cloud\Dialogflow\Cx\V3\TestConfig|null - */ - public function getTestConfig() - { - return $this->test_config; - } - - public function hasTestConfig() - { - return isset($this->test_config); - } - - public function clearTestConfig() - { - unset($this->test_config); - } - - /** - * Config for the test case. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestConfig test_config = 13; - * @param \Google\Cloud\Dialogflow\Cx\V3\TestConfig $var - * @return $this - */ - public function setTestConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestConfig::class); - $this->test_config = $var; - - return $this; - } - - /** - * The conversation turns uttered when the test case was created, in - * chronological order. These include the canonical set of agent utterances - * that should occur when the agent is working properly. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTestCaseConversationTurns() - { - return $this->test_case_conversation_turns; - } - - /** - * The conversation turns uttered when the test case was created, in - * chronological order. These include the canonical set of agent utterances - * that should occur when the agent is working properly. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ConversationTurn>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTestCaseConversationTurns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn::class); - $this->test_case_conversation_turns = $arr; - - return $this; - } - - /** - * Output only. When the test was created. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreationTime() - { - return $this->creation_time; - } - - public function hasCreationTime() - { - return isset($this->creation_time); - } - - public function clearCreationTime() - { - unset($this->creation_time); - } - - /** - * Output only. When the test was created. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->creation_time = $var; - - return $this; - } - - /** - * The latest test result. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; - * @return \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult|null - */ - public function getLastTestResult() - { - return $this->last_test_result; - } - - public function hasLastTestResult() - { - return isset($this->last_test_result); - } - - public function clearLastTestResult() - { - unset($this->last_test_result); - } - - /** - * The latest test result. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12; - * @param \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult $var - * @return $this - */ - public function setLastTestResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestCaseResult::class); - $this->last_test_result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseError.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseError.php deleted file mode 100644 index c0fb08d1c871..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseError.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.dialogflow.cx.v3.TestCaseError - */ -class TestCaseError extends \Google\Protobuf\Internal\Message -{ - /** - * The test case. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; - */ - protected $test_case = null; - /** - * The status associated with the test case. - * - * 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\Cloud\Dialogflow\Cx\V3\TestCase $test_case - * The test case. - * @type \Google\Rpc\Status $status - * The status associated with the test case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The test case. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\TestCase|null - */ - public function getTestCase() - { - return $this->test_case; - } - - public function hasTestCase() - { - return isset($this->test_case); - } - - public function clearTestCase() - { - unset($this->test_case); - } - - /** - * The test case. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\TestCase $var - * @return $this - */ - public function setTestCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestCase::class); - $this->test_case = $var; - - return $this; - } - - /** - * The status associated with the test case. - * - * 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 associated with the test case. - * - * 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseResult.php deleted file mode 100644 index 5f6c3e68e04f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestCaseResult.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.dialogflow.cx.v3.TestCaseResult - */ -class TestCaseResult extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name for the test case result. Format: - * `projects//locations//agents//testCases//results/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Environment where the test was run. If not set, it indicates the draft - * environment. - * - * Generated from protobuf field string environment = 2 [(.google.api.resource_reference) = { - */ - protected $environment = ''; - /** - * The conversation turns uttered during the test case replay in chronological - * order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; - */ - private $conversation_turns; - /** - * Whether the test case passed in the agent environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; - */ - protected $test_result = 0; - /** - * The time that the test was run. - * - * Generated from protobuf field .google.protobuf.Timestamp test_time = 5; - */ - protected $test_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name for the test case result. Format: - * `projects//locations//agents//testCases//results/`. - * @type string $environment - * Environment where the test was run. If not set, it indicates the draft - * environment. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ConversationTurn>|\Google\Protobuf\Internal\RepeatedField $conversation_turns - * The conversation turns uttered during the test case replay in chronological - * order. - * @type int $test_result - * Whether the test case passed in the agent environment. - * @type \Google\Protobuf\Timestamp $test_time - * The time that the test was run. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The resource name for the test case result. Format: - * `projects//locations//agents//testCases//results/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the test case result. Format: - * `projects//locations//agents//testCases//results/`. - * - * 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; - } - - /** - * Environment where the test was run. If not set, it indicates the draft - * environment. - * - * Generated from protobuf field string environment = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Environment where the test was run. If not set, it indicates the draft - * environment. - * - * Generated from protobuf field string environment = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - - /** - * The conversation turns uttered during the test case replay in chronological - * order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConversationTurns() - { - return $this->conversation_turns; - } - - /** - * The conversation turns uttered during the test case replay in chronological - * order. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ConversationTurn conversation_turns = 3; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ConversationTurn>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConversationTurns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ConversationTurn::class); - $this->conversation_turns = $arr; - - return $this; - } - - /** - * Whether the test case passed in the agent environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; - * @return int - */ - public function getTestResult() - { - return $this->test_result; - } - - /** - * Whether the test case passed in the agent environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestResult test_result = 4; - * @param int $var - * @return $this - */ - public function setTestResult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\TestResult::class); - $this->test_result = $var; - - return $this; - } - - /** - * The time that the test was run. - * - * Generated from protobuf field .google.protobuf.Timestamp test_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTestTime() - { - return $this->test_time; - } - - public function hasTestTime() - { - return isset($this->test_time); - } - - public function clearTestTime() - { - unset($this->test_time); - } - - /** - * The time that the test was run. - * - * Generated from protobuf field .google.protobuf.Timestamp test_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->test_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestConfig.php deleted file mode 100644 index b1dddaf28cf9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestConfig.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.dialogflow.cx.v3.TestConfig - */ -class TestConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Session parameters to be compared when calculating differences. - * - * Generated from protobuf field repeated string tracking_parameters = 1; - */ - private $tracking_parameters; - /** - * Flow name to start the test case with. - * Format: - * `projects//locations//agents//flows/`. - * Only one of `flow` and `page` should be set to indicate the starting point - * of the test case. If neither is set, the test case will start with start - * page on the default start flow. - * - * Generated from protobuf field string flow = 2 [(.google.api.resource_reference) = { - */ - protected $flow = ''; - /** - * The [page][google.cloud.dialogflow.cx.v3.Page] to start the test case with. - * Format: - * `projects//locations//agents//flows//pages/`. - * Only one of `flow` and `page` should be set to indicate the starting point - * of the test case. If neither is set, the test case will start with start - * page on the default start flow. - * - * Generated from protobuf field string page = 3 [(.google.api.resource_reference) = { - */ - protected $page = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $tracking_parameters - * Session parameters to be compared when calculating differences. - * @type string $flow - * Flow name to start the test case with. - * Format: - * `projects//locations//agents//flows/`. - * Only one of `flow` and `page` should be set to indicate the starting point - * of the test case. If neither is set, the test case will start with start - * page on the default start flow. - * @type string $page - * The [page][google.cloud.dialogflow.cx.v3.Page] to start the test case with. - * Format: - * `projects//locations//agents//flows//pages/`. - * Only one of `flow` and `page` should be set to indicate the starting point - * of the test case. If neither is set, the test case will start with start - * page on the default start flow. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Session parameters to be compared when calculating differences. - * - * Generated from protobuf field repeated string tracking_parameters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrackingParameters() - { - return $this->tracking_parameters; - } - - /** - * Session parameters to be compared when calculating differences. - * - * Generated from protobuf field repeated string tracking_parameters = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrackingParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tracking_parameters = $arr; - - return $this; - } - - /** - * Flow name to start the test case with. - * Format: - * `projects//locations//agents//flows/`. - * Only one of `flow` and `page` should be set to indicate the starting point - * of the test case. If neither is set, the test case will start with start - * page on the default start flow. - * - * Generated from protobuf field string flow = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getFlow() - { - return $this->flow; - } - - /** - * Flow name to start the test case with. - * Format: - * `projects//locations//agents//flows/`. - * Only one of `flow` and `page` should be set to indicate the starting point - * of the test case. If neither is set, the test case will start with start - * page on the default start flow. - * - * Generated from protobuf field string flow = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setFlow($var) - { - GPBUtil::checkString($var, True); - $this->flow = $var; - - return $this; - } - - /** - * The [page][google.cloud.dialogflow.cx.v3.Page] to start the test case with. - * Format: - * `projects//locations//agents//flows//pages/`. - * Only one of `flow` and `page` should be set to indicate the starting point - * of the test case. If neither is set, the test case will start with start - * page on the default start flow. - * - * Generated from protobuf field string page = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getPage() - { - return $this->page; - } - - /** - * The [page][google.cloud.dialogflow.cx.v3.Page] to start the test case with. - * Format: - * `projects//locations//agents//flows//pages/`. - * Only one of `flow` and `page` should be set to indicate the starting point - * of the test case. If neither is set, the test case will start with start - * page on the default start flow. - * - * Generated from protobuf field string page = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPage($var) - { - GPBUtil::checkString($var, True); - $this->page = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestError.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestError.php deleted file mode 100644 index 5bfd22d39f65..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestError.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.dialogflow.cx.v3.TestError - */ -class TestError extends \Google\Protobuf\Internal\Message -{ - /** - * The test case resource name. - * - * Generated from protobuf field string test_case = 1 [(.google.api.resource_reference) = { - */ - protected $test_case = ''; - /** - * The status associated with the test. - * - * Generated from protobuf field .google.rpc.Status status = 2; - */ - protected $status = null; - /** - * The timestamp when the test was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp test_time = 3; - */ - protected $test_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $test_case - * The test case resource name. - * @type \Google\Rpc\Status $status - * The status associated with the test. - * @type \Google\Protobuf\Timestamp $test_time - * The timestamp when the test was completed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The test case resource name. - * - * Generated from protobuf field string test_case = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getTestCase() - { - return $this->test_case; - } - - /** - * The test case resource name. - * - * Generated from protobuf field string test_case = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTestCase($var) - { - GPBUtil::checkString($var, True); - $this->test_case = $var; - - return $this; - } - - /** - * The status associated with the test. - * - * 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 associated with the test. - * - * 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; - } - - /** - * The timestamp when the test was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp test_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTestTime() - { - return $this->test_time; - } - - public function hasTestTime() - { - return isset($this->test_time); - } - - public function clearTestTime() - { - unset($this->test_time); - } - - /** - * The timestamp when the test was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp test_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->test_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestResult.php deleted file mode 100644 index bc0e41a2f062..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestResult.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.dialogflow.cx.v3.TestResult - */ -class TestResult -{ - /** - * Not specified. Should never be used. - * - * Generated from protobuf enum TEST_RESULT_UNSPECIFIED = 0; - */ - const TEST_RESULT_UNSPECIFIED = 0; - /** - * The test passed. - * - * Generated from protobuf enum PASSED = 1; - */ - const PASSED = 1; - /** - * The test did not pass. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - - private static $valueToName = [ - self::TEST_RESULT_UNSPECIFIED => 'TEST_RESULT_UNSPECIFIED', - self::PASSED => 'PASSED', - 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); - } -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference.php deleted file mode 100644 index 6148508e8110..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dialogflow.cx.v3.TestRunDifference - */ -class TestRunDifference extends \Google\Protobuf\Internal\Message -{ - /** - * The type of diff. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; - */ - protected $type = 0; - /** - * A human readable description of the diff, showing the actual output vs - * expected output. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The type of diff. - * @type string $description - * A human readable description of the diff, showing the actual output vs - * expected output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The type of diff. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of diff. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\TestRunDifference\DiffType::class); - $this->type = $var; - - return $this; - } - - /** - * A human readable description of the diff, showing the actual output vs - * expected output. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A human readable description of the diff, showing the actual output vs - * expected output. - * - * 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference/DiffType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference/DiffType.php deleted file mode 100644 index 8ae622c48403..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TestRunDifference/DiffType.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType - */ -class DiffType -{ - /** - * Should never be used. - * - * Generated from protobuf enum DIFF_TYPE_UNSPECIFIED = 0; - */ - const DIFF_TYPE_UNSPECIFIED = 0; - /** - * The intent. - * - * Generated from protobuf enum INTENT = 1; - */ - const INTENT = 1; - /** - * The page. - * - * Generated from protobuf enum PAGE = 2; - */ - const PAGE = 2; - /** - * The parameters. - * - * Generated from protobuf enum PARAMETERS = 3; - */ - const PARAMETERS = 3; - /** - * The message utterance. - * - * Generated from protobuf enum UTTERANCE = 4; - */ - const UTTERANCE = 4; - /** - * The flow. - * - * Generated from protobuf enum FLOW = 5; - */ - const FLOW = 5; - - private static $valueToName = [ - self::DIFF_TYPE_UNSPECIFIED => 'DIFF_TYPE_UNSPECIFIED', - self::INTENT => 'INTENT', - self::PAGE => 'PAGE', - self::PARAMETERS => 'PARAMETERS', - self::UTTERANCE => 'UTTERANCE', - self::FLOW => 'FLOW', - ]; - - 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(DiffType::class, \Google\Cloud\Dialogflow\Cx\V3\TestRunDifference_DiffType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextInput.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextInput.php deleted file mode 100644 index 30839ed91d3a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextInput.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dialogflow.cx.v3.TextInput - */ -class TextInput extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The UTF-8 encoded natural language text to be processed. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $text = ''; - - /** - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Session::initOnce(); - parent::__construct($data); - } - - /** - * Required. The UTF-8 encoded natural language text to be processed. - * - * 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. - * - * 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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextToSpeechSettings.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextToSpeechSettings.php deleted file mode 100644 index 4b118fbfcc10..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TextToSpeechSettings.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.dialogflow.cx.v3.TextToSpeechSettings - */ -class TextToSpeechSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration of how speech should be synthesized, mapping from language - * (https://cloud.google.com/dialogflow/cx/docs/reference/language) to - * SynthesizeSpeechConfig. - * These settings affect: - * - The [phone - * gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway) - * synthesize configuration set via - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings]. - * - How speech is synthesized when invoking - * [session][google.cloud.dialogflow.cx.v3.Sessions] APIs. - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] - * only applies if - * [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesize_speech_config] - * is not specified. - * - * Generated from protobuf field map synthesize_speech_configs = 1; - */ - private $synthesize_speech_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $synthesize_speech_configs - * Configuration of how speech should be synthesized, mapping from language - * (https://cloud.google.com/dialogflow/cx/docs/reference/language) to - * SynthesizeSpeechConfig. - * These settings affect: - * - The [phone - * gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway) - * synthesize configuration set via - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings]. - * - How speech is synthesized when invoking - * [session][google.cloud.dialogflow.cx.v3.Sessions] APIs. - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] - * only applies if - * [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesize_speech_config] - * is not specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AudioConfig::initOnce(); - parent::__construct($data); - } - - /** - * Configuration of how speech should be synthesized, mapping from language - * (https://cloud.google.com/dialogflow/cx/docs/reference/language) to - * SynthesizeSpeechConfig. - * These settings affect: - * - The [phone - * gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway) - * synthesize configuration set via - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings]. - * - How speech is synthesized when invoking - * [session][google.cloud.dialogflow.cx.v3.Sessions] APIs. - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] - * only applies if - * [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesize_speech_config] - * is not specified. - * - * Generated from protobuf field map synthesize_speech_configs = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSynthesizeSpeechConfigs() - { - return $this->synthesize_speech_configs; - } - - /** - * Configuration of how speech should be synthesized, mapping from language - * (https://cloud.google.com/dialogflow/cx/docs/reference/language) to - * SynthesizeSpeechConfig. - * These settings affect: - * - The [phone - * gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway) - * synthesize configuration set via - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings]. - * - How speech is synthesized when invoking - * [session][google.cloud.dialogflow.cx.v3.Sessions] APIs. - * [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings] - * only applies if - * [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesize_speech_config] - * is not specified. - * - * Generated from protobuf field map synthesize_speech_configs = 1; - * @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\Cx\V3\SynthesizeSpeechConfig::class); - $this->synthesize_speech_configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TrainFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TrainFlowRequest.php deleted file mode 100644 index b2ba6e071a3c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TrainFlowRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dialogflow.cx.v3.TrainFlowRequest - */ -class TrainFlowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The flow to train. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The flow to train. - * Format: - * `projects//locations//agents//flows/`. Please see - * {@see FlowsClient::flowName()} for help formatting this field. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\TrainFlowRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The flow to train. - * Format: - * `projects//locations//agents//flows/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Required. The flow to train. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 flow to train. - * Format: - * `projects//locations//agents//flows/`. - * - * 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage.php deleted file mode 100644 index 0ba2b37b79e3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.dialogflow.cx.v3.TransitionCoverage - */ -class TransitionCoverage extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Transitions present in the agent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; - */ - private $transitions; - /** - * The percent of transitions in the agent that are covered. - * - * Generated from protobuf field float coverage_score = 2; - */ - protected $coverage_score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\Transition>|\Google\Protobuf\Internal\RepeatedField $transitions - * The list of Transitions present in the agent. - * @type float $coverage_score - * The percent of transitions in the agent that are covered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The list of Transitions present in the agent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitions() - { - return $this->transitions; - } - - /** - * The list of Transitions present in the agent. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition transitions = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\Transition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\Transition::class); - $this->transitions = $arr; - - return $this; - } - - /** - * The percent of transitions in the agent that are covered. - * - * Generated from protobuf field float coverage_score = 2; - * @return float - */ - public function getCoverageScore() - { - return $this->coverage_score; - } - - /** - * The percent of transitions in the agent that are covered. - * - * Generated from protobuf field float coverage_score = 2; - * @param float $var - * @return $this - */ - public function setCoverageScore($var) - { - GPBUtil::checkFloat($var); - $this->coverage_score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/Transition.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/Transition.php deleted file mode 100644 index bae2d140eab6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/Transition.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - */ -class Transition extends \Google\Protobuf\Internal\Message -{ - /** - * The start node of a transition. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; - */ - protected $source = null; - /** - * The index of a transition in the transition list. Starting from 0. - * - * Generated from protobuf field int32 index = 4; - */ - protected $index = 0; - /** - * The end node of a transition. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; - */ - protected $target = null; - /** - * Whether the transition is covered by at least one of the - * agent's test cases. - * - * Generated from protobuf field bool covered = 3; - */ - protected $covered = false; - protected $detail; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode $source - * The start node of a transition. - * @type int $index - * The index of a transition in the transition list. Starting from 0. - * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode $target - * The end node of a transition. - * @type bool $covered - * Whether the transition is covered by at least one of the - * agent's test cases. - * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute $transition_route - * Intent route or condition route. - * @type \Google\Cloud\Dialogflow\Cx\V3\EventHandler $event_handler - * Event handler. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * The start node of a transition. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * The start node of a transition. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode source = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode::class); - $this->source = $var; - - return $this; - } - - /** - * The index of a transition in the transition list. Starting from 0. - * - * Generated from protobuf field int32 index = 4; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index of a transition in the transition list. Starting from 0. - * - * Generated from protobuf field int32 index = 4; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * The end node of a transition. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode|null - */ - public function getTarget() - { - return $this->target; - } - - public function hasTarget() - { - return isset($this->target); - } - - public function clearTarget() - { - unset($this->target); - } - - /** - * The end node of a transition. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode target = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage\TransitionNode::class); - $this->target = $var; - - return $this; - } - - /** - * Whether the transition is covered by at least one of the - * agent's test cases. - * - * Generated from protobuf field bool covered = 3; - * @return bool - */ - public function getCovered() - { - return $this->covered; - } - - /** - * Whether the transition is covered by at least one of the - * agent's test cases. - * - * Generated from protobuf field bool covered = 3; - * @param bool $var - * @return $this - */ - public function setCovered($var) - { - GPBUtil::checkBool($var); - $this->covered = $var; - - return $this; - } - - /** - * Intent route or condition route. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; - * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute|null - */ - public function getTransitionRoute() - { - return $this->readOneof(5); - } - - public function hasTransitionRoute() - { - return $this->hasOneof(5); - } - - /** - * Intent route or condition route. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 5; - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute $var - * @return $this - */ - public function setTransitionRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Event handler. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; - * @return \Google\Cloud\Dialogflow\Cx\V3\EventHandler|null - */ - public function getEventHandler() - { - return $this->readOneof(6); - } - - public function hasEventHandler() - { - return $this->hasOneof(6); - } - - /** - * Event handler. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EventHandler event_handler = 6; - * @param \Google\Cloud\Dialogflow\Cx\V3\EventHandler $var - * @return $this - */ - public function setEventHandler($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\EventHandler::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getDetail() - { - return $this->whichOneof("detail"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Transition::class, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage_Transition::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/TransitionNode.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/TransitionNode.php deleted file mode 100644 index 49038574b35d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionCoverage/TransitionNode.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - */ -class TransitionNode extends \Google\Protobuf\Internal\Message -{ - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Page $page - * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. - * Only some fields such as name and displayname will be set. - * @type \Google\Cloud\Dialogflow\Cx\V3\Flow $flow - * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. - * Only some fields such as name and displayname will be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. - * Only some fields such as name and displayname will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null - */ - public function getPage() - { - return $this->readOneof(1); - } - - public function hasPage() - { - return $this->hasOneof(1); - } - - /** - * Indicates a transition to a [Page][google.cloud.dialogflow.cx.v3.Page]. - * Only some fields such as name and displayname will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var - * @return $this - */ - public function setPage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. - * Only some fields such as name and displayname will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\Flow|null - */ - public function getFlow() - { - return $this->readOneof(2); - } - - public function hasFlow() - { - return $this->hasOneof(2); - } - - /** - * Indicates a transition to a [Flow][google.cloud.dialogflow.cx.v3.Flow]. - * Only some fields such as name and displayname will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $var - * @return $this - */ - public function setFlow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Flow::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TransitionNode::class, \Google\Cloud\Dialogflow\Cx\V3\TransitionCoverage_TransitionNode::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRoute.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRoute.php deleted file mode 100644 index 45a3baff3775..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRoute.php +++ /dev/null @@ -1,382 +0,0 @@ -google.cloud.dialogflow.cx.v3.TransitionRoute - */ -class TransitionRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique identifier of this transition route. - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. The description of the transition route. The maximum length is - * 500 characters. - * - * Generated from protobuf field string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. - * Format: - * `projects//locations//agents//intents/`. - * Indicates that the transition can only happen when the given intent is - * matched. - * At least one of `intent` or `condition` must be specified. When both - * `intent` and `condition` are specified, the transition can only happen - * when both are fulfilled. - * - * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { - */ - protected $intent = ''; - /** - * The condition to evaluate against [form - * parameters][google.cloud.dialogflow.cx.v3.Form.parameters] or [session - * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. - * See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * At least one of `intent` or `condition` must be specified. When both - * `intent` and `condition` are specified, the transition can only happen - * when both are fulfilled. - * - * Generated from protobuf field string condition = 2; - */ - protected $condition = ''; - /** - * The fulfillment to call when the condition is satisfied. At least one of - * `trigger_fulfillment` and `target` must be specified. When both are - * defined, `trigger_fulfillment` is executed first. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; - */ - protected $trigger_fulfillment = null; - protected $target; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique identifier of this transition route. - * @type string $description - * Optional. The description of the transition route. The maximum length is - * 500 characters. - * @type string $intent - * The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. - * Format: - * `projects//locations//agents//intents/`. - * Indicates that the transition can only happen when the given intent is - * matched. - * At least one of `intent` or `condition` must be specified. When both - * `intent` and `condition` are specified, the transition can only happen - * when both are fulfilled. - * @type string $condition - * The condition to evaluate against [form - * parameters][google.cloud.dialogflow.cx.v3.Form.parameters] or [session - * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. - * See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * At least one of `intent` or `condition` must be specified. When both - * `intent` and `condition` are specified, the transition can only happen - * when both are fulfilled. - * @type \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $trigger_fulfillment - * The fulfillment to call when the condition is satisfied. At least one of - * `trigger_fulfillment` and `target` must be specified. When both are - * defined, `trigger_fulfillment` is executed first. - * @type string $target_page - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * @type string $target_flow - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique identifier of this transition route. - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique identifier of this transition route. - * - * Generated from protobuf field string name = 6 [(.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 description of the transition route. The maximum length is - * 500 characters. - * - * Generated from protobuf field string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The description of the transition route. The maximum length is - * 500 characters. - * - * Generated from protobuf field string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. - * Format: - * `projects//locations//agents//intents/`. - * Indicates that the transition can only happen when the given intent is - * matched. - * At least one of `intent` or `condition` must be specified. When both - * `intent` and `condition` are specified, the transition can only happen - * when both are fulfilled. - * - * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getIntent() - { - return $this->intent; - } - - /** - * The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. - * Format: - * `projects//locations//agents//intents/`. - * Indicates that the transition can only happen when the given intent is - * matched. - * At least one of `intent` or `condition` must be specified. When both - * `intent` and `condition` are specified, the transition can only happen - * when both are fulfilled. - * - * Generated from protobuf field string intent = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkString($var, True); - $this->intent = $var; - - return $this; - } - - /** - * The condition to evaluate against [form - * parameters][google.cloud.dialogflow.cx.v3.Form.parameters] or [session - * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. - * See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * At least one of `intent` or `condition` must be specified. When both - * `intent` and `condition` are specified, the transition can only happen - * when both are fulfilled. - * - * Generated from protobuf field string condition = 2; - * @return string - */ - public function getCondition() - { - return $this->condition; - } - - /** - * The condition to evaluate against [form - * parameters][google.cloud.dialogflow.cx.v3.Form.parameters] or [session - * parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. - * See the [conditions - * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). - * At least one of `intent` or `condition` must be specified. When both - * `intent` and `condition` are specified, the transition can only happen - * when both are fulfilled. - * - * Generated from protobuf field string condition = 2; - * @param string $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkString($var, True); - $this->condition = $var; - - return $this; - } - - /** - * The fulfillment to call when the condition is satisfied. At least one of - * `trigger_fulfillment` and `target` must be specified. When both are - * defined, `trigger_fulfillment` is executed first. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\Fulfillment|null - */ - public function getTriggerFulfillment() - { - return $this->trigger_fulfillment; - } - - public function hasTriggerFulfillment() - { - return isset($this->trigger_fulfillment); - } - - public function clearTriggerFulfillment() - { - unset($this->trigger_fulfillment); - } - - /** - * The fulfillment to call when the condition is satisfied. At least one of - * `trigger_fulfillment` and `target` must be specified. When both are - * defined, `trigger_fulfillment` is executed first. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\Fulfillment $var - * @return $this - */ - public function setTriggerFulfillment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Fulfillment::class); - $this->trigger_fulfillment = $var; - - return $this; - } - - /** - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string target_page = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetPage() - { - return $this->readOneof(4); - } - - public function hasTargetPage() - { - return $this->hasOneof(4); - } - - /** - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string target_page = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetPage($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string target_flow = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetFlow() - { - return $this->readOneof(5); - } - - public function hasTargetFlow() - { - return $this->hasOneof(5); - } - - /** - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string target_flow = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetFlow($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php deleted file mode 100644 index 0a73ff6e0d8a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroup.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.dialogflow.cx.v3.TransitionRouteGroup - */ -class TransitionRouteGroup extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the transition route group. - * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] - * populates the name automatically. Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * . - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the transition route group, unique - * within the flow. The display name can be no longer than 30 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Transition routes associated with the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; - */ - private $transition_routes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the transition route group. - * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] - * populates the name automatically. Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * . - * @type string $display_name - * Required. The human-readable name of the transition route group, unique - * within the flow. The display name can be no longer than 30 characters. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $transition_routes - * Transition routes associated with the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the transition route group. - * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] - * populates the name automatically. Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * . - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the transition route group. - * [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] - * populates the name automatically. Format: - * `projects//locations//agents//flows//transitionRouteGroups/` - * . - * - * 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 human-readable name of the transition route group, unique - * within the flow. The display name can be no longer than 30 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the transition route group, unique - * within the flow. The display name can be no longer than 30 characters. - * - * 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; - } - - /** - * Transition routes associated with the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitionRoutes() - { - return $this->transition_routes; - } - - /** - * Transition routes associated with the - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 5; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitionRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute::class); - $this->transition_routes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage.php deleted file mode 100644 index fac11995fda2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage - */ -class TransitionRouteGroupCoverage extends \Google\Protobuf\Internal\Message -{ - /** - * Transition route group coverages. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; - */ - private $coverages; - /** - * The percent of transition routes in all the transition route groups that - * are covered. - * - * Generated from protobuf field float coverage_score = 2; - */ - protected $coverage_score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage>|\Google\Protobuf\Internal\RepeatedField $coverages - * Transition route group coverages. - * @type float $coverage_score - * The percent of transition routes in all the transition route groups that - * are covered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Transition route group coverages. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCoverages() - { - return $this->coverages; - } - - /** - * Transition route group coverages. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage coverages = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCoverages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage::class); - $this->coverages = $arr; - - return $this; - } - - /** - * The percent of transition routes in all the transition route groups that - * are covered. - * - * Generated from protobuf field float coverage_score = 2; - * @return float - */ - public function getCoverageScore() - { - return $this->coverage_score; - } - - /** - * The percent of transition routes in all the transition route groups that - * are covered. - * - * Generated from protobuf field float coverage_score = 2; - * @param float $var - * @return $this - */ - public function setCoverageScore($var) - { - GPBUtil::checkFloat($var); - $this->coverage_score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage.php deleted file mode 100644 index 0677e7b7fafd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage - */ -class Coverage extends \Google\Protobuf\Internal\Message -{ - /** - * Transition route group metadata. Only name and displayName will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; - */ - protected $route_group = null; - /** - * The list of transition routes and coverage in the transition route group. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; - */ - private $transitions; - /** - * The percent of transition routes in the transition route group that are - * covered. - * - * Generated from protobuf field float coverage_score = 3; - */ - protected $coverage_score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $route_group - * Transition route group metadata. Only name and displayName will be set. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage\Transition>|\Google\Protobuf\Internal\RepeatedField $transitions - * The list of transition routes and coverage in the transition route group. - * @type float $coverage_score - * The percent of transition routes in the transition route group that are - * covered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Transition route group metadata. Only name and displayName will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup|null - */ - public function getRouteGroup() - { - return $this->route_group; - } - - public function hasRouteGroup() - { - return isset($this->route_group); - } - - public function clearRouteGroup() - { - unset($this->route_group); - } - - /** - * Transition route group metadata. Only name and displayName will be set. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup route_group = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $var - * @return $this - */ - public function setRouteGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::class); - $this->route_group = $var; - - return $this; - } - - /** - * The list of transition routes and coverage in the transition route group. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitions() - { - return $this->transitions; - } - - /** - * The list of transition routes and coverage in the transition route group. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition transitions = 2; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage\Transition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage\Coverage\Transition::class); - $this->transitions = $arr; - - return $this; - } - - /** - * The percent of transition routes in the transition route group that are - * covered. - * - * Generated from protobuf field float coverage_score = 3; - * @return float - */ - public function getCoverageScore() - { - return $this->coverage_score; - } - - /** - * The percent of transition routes in the transition route group that are - * covered. - * - * Generated from protobuf field float coverage_score = 3; - * @param float $var - * @return $this - */ - public function setCoverageScore($var) - { - GPBUtil::checkFloat($var); - $this->coverage_score = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Coverage::class, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage_Coverage::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage/Transition.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage/Transition.php deleted file mode 100644 index 5b9c5a6674f4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/TransitionRouteGroupCoverage/Coverage/Transition.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition - */ -class Transition extends \Google\Protobuf\Internal\Message -{ - /** - * Intent route or condition route. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; - */ - protected $transition_route = null; - /** - * Whether the transition route is covered by at least one of the - * agent's test cases. - * - * Generated from protobuf field bool covered = 2; - */ - protected $covered = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute $transition_route - * Intent route or condition route. - * @type bool $covered - * Whether the transition route is covered by at least one of the - * agent's test cases. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Intent route or condition route. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute|null - */ - public function getTransitionRoute() - { - return $this->transition_route; - } - - public function hasTransitionRoute() - { - return isset($this->transition_route); - } - - public function clearTransitionRoute() - { - unset($this->transition_route); - } - - /** - * Intent route or condition route. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRoute transition_route = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute $var - * @return $this - */ - public function setTransitionRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRoute::class); - $this->transition_route = $var; - - return $this; - } - - /** - * Whether the transition route is covered by at least one of the - * agent's test cases. - * - * Generated from protobuf field bool covered = 2; - * @return bool - */ - public function getCovered() - { - return $this->covered; - } - - /** - * Whether the transition route is covered by at least one of the - * agent's test cases. - * - * Generated from protobuf field bool covered = 2; - * @param bool $var - * @return $this - */ - public function setCovered($var) - { - GPBUtil::checkBool($var); - $this->covered = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Transition::class, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupCoverage_Coverage_Transition::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateAgentRequest.php deleted file mode 100644 index 8420b023c8a6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateAgentRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateAgentRequest - */ -class UpdateAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $agent = null; - /** - * 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; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\Agent $agent Required. The agent to update. - * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, - * all fields will be updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateAgentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\Agent $agent, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAgent($agent) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Agent $agent - * Required. The agent to update. - * @type \Google\Protobuf\FieldMask $update_mask - * 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\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Agent agent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Agent $var - * @return $this - */ - public function setAgent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Agent::class); - $this->agent = $var; - - return $this; - } - - /** - * 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; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The 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; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEntityTypeRequest.php deleted file mode 100644 index eb795ce68bf3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEntityTypeRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - */ -class UpdateEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The entity type to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity_type = null; - /** - * The language of the following fields in `entity_type`: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - /** - * The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\EntityType $entityType Required. The entity type to update. - * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateEntityTypeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\EntityType $entityType, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEntityType($entityType) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\EntityType $entity_type - * Required. The entity type to update. - * @type string $language_code - * The language of the following fields in `entity_type`: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * are supported. - * Note: languages must be enabled in the agent before they can be used. - * @type \Google\Protobuf\FieldMask $update_mask - * The mask to control which fields get updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\EntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The entity type to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.EntityType entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\EntityType $var - * @return $this - */ - public function setEntityType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\EntityType::class); - $this->entity_type = $var; - - return $this; - } - - /** - * The language of the following fields in `entity_type`: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the following fields in `entity_type`: - * * `EntityType.entities.value` - * * `EntityType.entities.synonyms` - * * `EntityType.excluded_phrases.value` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEnvironmentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEnvironmentRequest.php deleted file mode 100644 index cadbf57a4152..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateEnvironmentRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest - */ -class UpdateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The environment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\Environment $environment Required. The environment to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The mask to control which fields get updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateEnvironmentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\Environment $environment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEnvironment($environment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Environment $environment - * Required. The environment 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\Cx\V3\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The environment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\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; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExperimentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExperimentRequest.php deleted file mode 100644 index 176d4b093336..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateExperimentRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateExperimentRequest - */ -class UpdateExperimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The experiment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $experiment = 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; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment Required. The experiment to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The mask to control which fields get updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateExperimentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setExperiment($experiment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Experiment $experiment - * Required. The experiment 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\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The experiment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Experiment|null - */ - public function getExperiment() - { - return $this->experiment; - } - - public function hasExperiment() - { - return isset($this->experiment); - } - - public function clearExperiment() - { - unset($this->experiment); - } - - /** - * Required. The experiment to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Experiment experiment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Experiment $var - * @return $this - */ - public function setExperiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Experiment::class); - $this->experiment = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateFlowRequest.php deleted file mode 100644 index 7958a5ad2242..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateFlowRequest.php +++ /dev/null @@ -1,212 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateFlowRequest - */ -class UpdateFlowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The flow to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $flow = null; - /** - * 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; - */ - protected $update_mask = null; - /** - * The language of the following fields in `flow`: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - */ - protected $language_code = ''; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $flow Required. The flow to update. - * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, - * all fields will be updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateFlowRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\Flow $flow, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setFlow($flow) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Flow $flow - * Required. The flow to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The mask to control which fields get updated. If the mask is not present, - * all fields will be updated. - * @type string $language_code - * The language of the following fields in `flow`: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Required. The flow to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Flow|null - */ - public function getFlow() - { - return $this->flow; - } - - public function hasFlow() - { - return isset($this->flow); - } - - public function clearFlow() - { - unset($this->flow); - } - - /** - * Required. The flow to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Flow flow = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Flow $var - * @return $this - */ - public function setFlow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Flow::class); - $this->flow = $var; - - return $this; - } - - /** - * 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; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The 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; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The language of the following fields in `flow`: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the following fields in `flow`: - * * `Flow.event_handlers.trigger_fulfillment.messages` - * * `Flow.event_handlers.trigger_fulfillment.conditional_cases` - * * `Flow.transition_routes.trigger_fulfillment.messages` - * * `Flow.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGenerativeSettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGenerativeSettingsRequest.php deleted file mode 100644 index bb137233d7ef..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGenerativeSettingsRequest.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest - */ -class UpdateGenerativeSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Generative settings to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $generative_settings = null; - /** - * Optional. 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) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings $generativeSettings Required. Generative settings to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The mask to control which fields get updated. If the mask is not - * present, all fields will be updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateGenerativeSettingsRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings $generativeSettings, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setGenerativeSettings($generativeSettings) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings $generative_settings - * Required. Generative settings to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. 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\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Generative settings to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings|null - */ - public function getGenerativeSettings() - { - return $this->generative_settings; - } - - public function hasGenerativeSettings() - { - return isset($this->generative_settings); - } - - public function clearGenerativeSettings() - { - unset($this->generative_settings); - } - - /** - * Required. Generative settings to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.GenerativeSettings generative_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings $var - * @return $this - */ - public function setGenerativeSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings::class); - $this->generative_settings = $var; - - return $this; - } - - /** - * Optional. 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) = 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. 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) = 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGeneratorRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGeneratorRequest.php deleted file mode 100644 index c7a6701d7dbd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateGeneratorRequest.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - */ -class UpdateGeneratorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The generator to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $generator = null; - /** - * The language to list generators for. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * 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 = 3; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\Generator $generator Required. The generator to update. - * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, - * all fields will be updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateGeneratorRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\Generator $generator, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setGenerator($generator) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Generator $generator - * Required. The generator to update. - * @type string $language_code - * The language to list generators for. - * @type \Google\Protobuf\FieldMask $update_mask - * 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\Cx\V3\Generator::initOnce(); - parent::__construct($data); - } - - /** - * Required. The generator to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Generator|null - */ - public function getGenerator() - { - return $this->generator; - } - - public function hasGenerator() - { - return isset($this->generator); - } - - public function clearGenerator() - { - unset($this->generator); - } - - /** - * Required. The generator to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Generator generator = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Generator $var - * @return $this - */ - public function setGenerator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Generator::class); - $this->generator = $var; - - return $this; - } - - /** - * The language to list generators for. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language to list generators for. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * 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 = 3; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The 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 = 3; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateIntentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateIntentRequest.php deleted file mode 100644 index 97ea71f67b8f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateIntentRequest.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateIntentRequest - */ -class UpdateIntentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The intent to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $intent = null; - /** - * The language of the following fields in `intent`: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - /** - * 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 = 3; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $intent Required. The intent to update. - * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, - * all fields will be updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateIntentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\Intent $intent, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setIntent($intent) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Intent $intent - * Required. The intent to update. - * @type string $language_code - * The language of the following fields in `intent`: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * are supported. - * Note: languages must be enabled in the agent before they can be used. - * @type \Google\Protobuf\FieldMask $update_mask - * 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\Cx\V3\Intent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The intent to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.Intent intent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Intent $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Intent::class); - $this->intent = $var; - - return $this; - } - - /** - * The language of the following fields in `intent`: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the following fields in `intent`: - * * `Intent.training_phrases.parts.text` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * 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 = 3; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The 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 = 3; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePageRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePageRequest.php deleted file mode 100644 index 12a53a370793..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdatePageRequest.php +++ /dev/null @@ -1,244 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdatePageRequest - */ -class UpdatePageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The page to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page = null; - /** - * The language of the following fields in `page`: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - */ - protected $language_code = ''; - /** - * 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 = 3; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\Page $page Required. The page to update. - * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, - * all fields will be updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdatePageRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\Page $page, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setPage($page) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Page $page - * Required. The page to update. - * @type string $language_code - * The language of the following fields in `page`: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * are supported. - * Note: languages must be enabled in the agent before they can be used. - * @type \Google\Protobuf\FieldMask $update_mask - * 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\Cx\V3\Page::initOnce(); - parent::__construct($data); - } - - /** - * Required. The page to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Page|null - */ - public function getPage() - { - return $this->page; - } - - public function hasPage() - { - return isset($this->page); - } - - public function clearPage() - { - unset($this->page); - } - - /** - * Required. The page to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Page page = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Page $var - * @return $this - */ - public function setPage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Page::class); - $this->page = $var; - - return $this; - } - - /** - * The language of the following fields in `page`: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the following fields in `page`: - * * `Page.entry_fulfillment.messages` - * * `Page.entry_fulfillment.conditional_cases` - * * `Page.event_handlers.trigger_fulfillment.messages` - * * `Page.event_handlers.trigger_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` - * * - * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` - * * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` - * * - * `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` - * * `Page.transition_routes.trigger_fulfillment.messages` - * * `Page.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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 = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * 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 = 3; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The 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 = 3; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSecuritySettingsRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSecuritySettingsRequest.php deleted file mode 100644 index 4615d8419770..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSecuritySettingsRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - */ -class UpdateSecuritySettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [SecuritySettings] object that contains values for each of the - * fields to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $security_settings = 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; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $securitySettings Required. [SecuritySettings] object that contains values for each of the - * fields to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The mask to control which fields get updated. If the mask is not - * present, all fields will be updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateSecuritySettingsRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $securitySettings, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSecuritySettings($securitySettings) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $security_settings - * Required. [SecuritySettings] object that contains values for each of the - * fields 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\Cx\V3\SecuritySettings::initOnce(); - parent::__construct($data); - } - - /** - * Required. [SecuritySettings] object that contains values for each of the - * fields to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings|null - */ - public function getSecuritySettings() - { - return $this->security_settings; - } - - public function hasSecuritySettings() - { - return isset($this->security_settings); - } - - public function clearSecuritySettings() - { - unset($this->security_settings); - } - - /** - * Required. [SecuritySettings] object that contains values for each of the - * fields to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SecuritySettings security_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings $var - * @return $this - */ - public function setSecuritySettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SecuritySettings::class); - $this->security_settings = $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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSessionEntityTypeRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSessionEntityTypeRequest.php deleted file mode 100644 index 7484171605b3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateSessionEntityTypeRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest - */ -class UpdateSessionEntityTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The session entity type to update. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $session_entity_type = null; - /** - * The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $sessionEntityType Required. The session entity type to update. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. - * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateSessionEntityTypeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $sessionEntityType, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSessionEntityType($sessionEntityType) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $session_entity_type - * Required. The session entity type to update. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. - * @type \Google\Protobuf\FieldMask $update_mask - * The mask to control which fields get updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::initOnce(); - parent::__construct($data); - } - - /** - * Required. The session entity type to update. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionEntityType session_entity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType $var - * @return $this - */ - public function setSessionEntityType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SessionEntityType::class); - $this->session_entity_type = $var; - - return $this; - } - - /** - * The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTestCaseRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTestCaseRequest.php deleted file mode 100644 index 4f7b23f1d441..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTestCaseRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest - */ -class UpdateTestCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The test case to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $test_case = null; - /** - * Required. The mask to specify which fields should be updated. The - * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and - * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] - * cannot be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\TestCase $testCase Required. The test case to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The mask to specify which fields should be updated. The - * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and - * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] - * cannot be updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateTestCaseRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\TestCase $testCase, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTestCase($testCase) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\TestCase $test_case - * Required. The test case to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The mask to specify which fields should be updated. The - * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and - * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] - * cannot be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The test case to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\TestCase|null - */ - public function getTestCase() - { - return $this->test_case; - } - - public function hasTestCase() - { - return isset($this->test_case); - } - - public function clearTestCase() - { - unset($this->test_case); - } - - /** - * Required. The test case to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TestCase test_case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\TestCase $var - * @return $this - */ - public function setTestCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TestCase::class); - $this->test_case = $var; - - return $this; - } - - /** - * Required. The mask to specify which fields should be updated. The - * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and - * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] - * cannot 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 specify which fields should be updated. The - * [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and - * [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] - * cannot 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTransitionRouteGroupRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTransitionRouteGroupRequest.php deleted file mode 100644 index e3e033c82b6b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateTransitionRouteGroupRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest - */ -class UpdateTransitionRouteGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The transition route group to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $transition_route_group = null; - /** - * The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * The language of the following fields in `TransitionRouteGroup`: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - */ - protected $language_code = ''; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transitionRouteGroup Required. The transition route group to update. - * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateTransitionRouteGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transitionRouteGroup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTransitionRouteGroup($transitionRouteGroup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $transition_route_group - * Required. The transition route group to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The mask to control which fields get updated. - * @type string $language_code - * The language of the following fields in `TransitionRouteGroup`: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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\Cx\V3\TransitionRouteGroup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The transition route group to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup|null - */ - public function getTransitionRouteGroup() - { - return $this->transition_route_group; - } - - public function hasTransitionRouteGroup() - { - return isset($this->transition_route_group); - } - - public function clearTransitionRouteGroup() - { - unset($this->transition_route_group); - } - - /** - * Required. The transition route group to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.TransitionRouteGroup transition_route_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup $var - * @return $this - */ - public function setTransitionRouteGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup::class); - $this->transition_route_group = $var; - - return $this; - } - - /** - * The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The mask to control which fields get updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The language of the following fields in `TransitionRouteGroup`: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the following fields in `TransitionRouteGroup`: - * * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages` - * * - * `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases` - * If not specified, the agent's default language is used. - * [Many - * languages](https://cloud.google.com/dialogflow/cx/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; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateVersionRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateVersionRequest.php deleted file mode 100644 index babda721b2ed..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateVersionRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateVersionRequest - */ -class UpdateVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The version to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = null; - /** - * Required. The mask to control which fields get updated. Currently only - * `description` and `display_name` can be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\Version $version Required. The version to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The mask to control which fields get updated. Currently only - * `description` and `display_name` can be updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateVersionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\Version $version, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setVersion($version) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Version $version - * Required. The version to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The mask to control which fields get updated. Currently only - * `description` and `display_name` can be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * Required. The version to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\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. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Version::class); - $this->version = $var; - - return $this; - } - - /** - * Required. The mask to control which fields get updated. Currently only - * `description` and `display_name` can 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. Currently only - * `description` and `display_name` can 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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateWebhookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateWebhookRequest.php deleted file mode 100644 index 621a1b1f29f1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/UpdateWebhookRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - */ -class UpdateWebhookRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The webhook to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $webhook = null; - /** - * 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; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook Required. The webhook to update. - * @param \Google\Protobuf\FieldMask $updateMask The mask to control which fields get updated. If the mask is not present, - * all fields will be updated. - * - * @return \Google\Cloud\Dialogflow\Cx\V3\UpdateWebhookRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setWebhook($webhook) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook $webhook - * Required. The webhook to update. - * @type \Google\Protobuf\FieldMask $update_mask - * 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\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Required. The webhook to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook|null - */ - public function getWebhook() - { - return $this->webhook; - } - - public function hasWebhook() - { - return isset($this->webhook); - } - - public function clearWebhook() - { - unset($this->webhook); - } - - /** - * Required. The webhook to update. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook webhook = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook $var - * @return $this - */ - public function setWebhook($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook::class); - $this->webhook = $var; - - return $this; - } - - /** - * 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; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The 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; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateAgentRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateAgentRequest.php deleted file mode 100644 index 2590a7924b4f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateAgentRequest.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dialogflow.cx.v3.ValidateAgentRequest - */ -class ValidateAgentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent to validate. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The agent to validate. - * Format: `projects//locations//agents/`. - * @type string $language_code - * If not specified, the agent's default language is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Agent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent to validate. - * Format: `projects//locations//agents/`. - * - * 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 agent to validate. - * Format: `projects//locations//agents/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateFlowRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateFlowRequest.php deleted file mode 100644 index 122750b9e695..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidateFlowRequest.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.dialogflow.cx.v3.ValidateFlowRequest - */ -class ValidateFlowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The flow to validate. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The flow to validate. - * Format: - * `projects//locations//agents//flows/`. - * @type string $language_code - * If not specified, the agent's default language is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Flow::initOnce(); - parent::__construct($data); - } - - /** - * Required. The flow to validate. - * Format: - * `projects//locations//agents//flows/`. - * - * 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 flow to validate. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * If not specified, the agent's default language is used. - * - * Generated from protobuf field string language_code = 2; - * @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/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php deleted file mode 100644 index afc82cf49f24..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage.php +++ /dev/null @@ -1,212 +0,0 @@ -google.cloud.dialogflow.cx.v3.ValidationMessage - */ -class ValidationMessage extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the resources where the message is found. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; - */ - protected $resource_type = 0; - /** - * The names of the resources where the message is found. - * - * Generated from protobuf field repeated string resources = 2 [deprecated = true]; - * @deprecated - */ - private $resources; - /** - * The resource names of the resources where the message is found. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; - */ - private $resource_names; - /** - * Indicates the severity of the message. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; - */ - protected $severity = 0; - /** - * The message detail. - * - * Generated from protobuf field string detail = 4; - */ - protected $detail = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $resource_type - * The type of the resources where the message is found. - * @type array|\Google\Protobuf\Internal\RepeatedField $resources - * The names of the resources where the message is found. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResourceName>|\Google\Protobuf\Internal\RepeatedField $resource_names - * The resource names of the resources where the message is found. - * @type int $severity - * Indicates the severity of the message. - * @type string $detail - * The message detail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ValidationMessage::initOnce(); - parent::__construct($data); - } - - /** - * The type of the resources where the message is found. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; - * @return int - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * The type of the resources where the message is found. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType resource_type = 1; - * @param int $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ValidationMessage\ResourceType::class); - $this->resource_type = $var; - - return $this; - } - - /** - * The names of the resources where the message is found. - * - * Generated from protobuf field repeated string resources = 2 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getResources() - { - if ($this->resources->count() !== 0) { - @trigger_error('resources is deprecated.', E_USER_DEPRECATED); - } - return $this->resources; - } - - /** - * The names of the resources where the message is found. - * - * Generated from protobuf field repeated string resources = 2 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - if ($arr->count() !== 0) { - @trigger_error('resources is deprecated.', E_USER_DEPRECATED); - } - $this->resources = $arr; - - return $this; - } - - /** - * The resource names of the resources where the message is found. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceNames() - { - return $this->resource_names; - } - - /** - * The resource names of the resources where the message is found. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResourceName resource_names = 6; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResourceName>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResourceName::class); - $this->resource_names = $arr; - - return $this; - } - - /** - * Indicates the severity of the message. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Indicates the severity of the message. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.ValidationMessage.Severity severity = 3; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\ValidationMessage\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * The message detail. - * - * Generated from protobuf field string detail = 4; - * @return string - */ - public function getDetail() - { - return $this->detail; - } - - /** - * The message detail. - * - * Generated from protobuf field string detail = 4; - * @param string $var - * @return $this - */ - public function setDetail($var) - { - GPBUtil::checkString($var, True); - $this->detail = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/ResourceType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/ResourceType.php deleted file mode 100644 index 306bb82066c8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/ResourceType.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType - */ -class ResourceType -{ - /** - * Unspecified. - * - * Generated from protobuf enum RESOURCE_TYPE_UNSPECIFIED = 0; - */ - const RESOURCE_TYPE_UNSPECIFIED = 0; - /** - * Agent. - * - * Generated from protobuf enum AGENT = 1; - */ - const AGENT = 1; - /** - * Intent. - * - * Generated from protobuf enum INTENT = 2; - */ - const INTENT = 2; - /** - * Intent training phrase. - * - * Generated from protobuf enum INTENT_TRAINING_PHRASE = 8; - */ - const INTENT_TRAINING_PHRASE = 8; - /** - * Intent parameter. - * - * Generated from protobuf enum INTENT_PARAMETER = 9; - */ - const INTENT_PARAMETER = 9; - /** - * Multiple intents. - * - * Generated from protobuf enum INTENTS = 10; - */ - const INTENTS = 10; - /** - * Multiple training phrases. - * - * Generated from protobuf enum INTENT_TRAINING_PHRASES = 11; - */ - const INTENT_TRAINING_PHRASES = 11; - /** - * Entity type. - * - * Generated from protobuf enum ENTITY_TYPE = 3; - */ - const ENTITY_TYPE = 3; - /** - * Multiple entity types. - * - * Generated from protobuf enum ENTITY_TYPES = 12; - */ - const ENTITY_TYPES = 12; - /** - * Webhook. - * - * Generated from protobuf enum WEBHOOK = 4; - */ - const WEBHOOK = 4; - /** - * Flow. - * - * Generated from protobuf enum FLOW = 5; - */ - const FLOW = 5; - /** - * Page. - * - * Generated from protobuf enum PAGE = 6; - */ - const PAGE = 6; - /** - * Multiple pages. - * - * Generated from protobuf enum PAGES = 13; - */ - const PAGES = 13; - /** - * Transition route group. - * - * Generated from protobuf enum TRANSITION_ROUTE_GROUP = 7; - */ - const TRANSITION_ROUTE_GROUP = 7; - /** - * Agent transition route group. - * - * Generated from protobuf enum AGENT_TRANSITION_ROUTE_GROUP = 14; - */ - const AGENT_TRANSITION_ROUTE_GROUP = 14; - - private static $valueToName = [ - self::RESOURCE_TYPE_UNSPECIFIED => 'RESOURCE_TYPE_UNSPECIFIED', - self::AGENT => 'AGENT', - self::INTENT => 'INTENT', - self::INTENT_TRAINING_PHRASE => 'INTENT_TRAINING_PHRASE', - self::INTENT_PARAMETER => 'INTENT_PARAMETER', - self::INTENTS => 'INTENTS', - self::INTENT_TRAINING_PHRASES => 'INTENT_TRAINING_PHRASES', - self::ENTITY_TYPE => 'ENTITY_TYPE', - self::ENTITY_TYPES => 'ENTITY_TYPES', - self::WEBHOOK => 'WEBHOOK', - self::FLOW => 'FLOW', - self::PAGE => 'PAGE', - self::PAGES => 'PAGES', - self::TRANSITION_ROUTE_GROUP => 'TRANSITION_ROUTE_GROUP', - self::AGENT_TRANSITION_ROUTE_GROUP => 'AGENT_TRANSITION_ROUTE_GROUP', - ]; - - 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(ResourceType::class, \Google\Cloud\Dialogflow\Cx\V3\ValidationMessage_ResourceType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/Severity.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/Severity.php deleted file mode 100644 index 4b54f20b6cdb..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/ValidationMessage/Severity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.cx.v3.ValidationMessage.Severity - */ -class Severity -{ - /** - * Unspecified. - * - * 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 failures. - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::INFO => 'INFO', - self::WARNING => 'WARNING', - self::ERROR => '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(Severity::class, \Google\Cloud\Dialogflow\Cx\V3\ValidationMessage_Severity::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VariantsHistory.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VariantsHistory.php deleted file mode 100644 index 94e51a84f8ee..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VariantsHistory.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.dialogflow.cx.v3.VariantsHistory - */ -class VariantsHistory extends \Google\Protobuf\Internal\Message -{ - /** - * Update time of the variants. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - protected $variants; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\VersionVariants $version_variants - * The flow versions as the variants. - * @type \Google\Protobuf\Timestamp $update_time - * Update time of the variants. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * The flow versions as the variants. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\VersionVariants|null - */ - public function getVersionVariants() - { - return $this->readOneof(1); - } - - public function hasVersionVariants() - { - return $this->hasOneof(1); - } - - /** - * The flow versions as the variants. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.VersionVariants version_variants = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\VersionVariants $var - * @return $this - */ - public function setVersionVariants($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\VersionVariants::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Update time of the variants. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @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); - } - - /** - * Update time of the variants. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getVariants() - { - return $this->whichOneof("variants"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version.php deleted file mode 100644 index 12cc69cc3bb1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version.php +++ /dev/null @@ -1,277 +0,0 @@ -google.cloud.dialogflow.cx.v3.Version - */ -class Version extends \Google\Protobuf\Internal\Message -{ - /** - * Format: - * projects//locations//agents//flows//versions/. - * Version ID is a self-increasing number generated by Dialogflow upon version - * creation. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the version. Limit of 64 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * The description of the version. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Output only. The NLU settings of the flow at version creation. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $nlu_settings = null; - /** - * Output only. Create time of the version. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The state of this version. This field is read-only and cannot - * be set by create and update methods. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Format: - * projects//locations//agents//flows//versions/. - * Version ID is a self-increasing number generated by Dialogflow upon version - * creation. - * @type string $display_name - * Required. The human-readable name of the version. Limit of 64 characters. - * @type string $description - * The description of the version. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * @type \Google\Cloud\Dialogflow\Cx\V3\NluSettings $nlu_settings - * Output only. The NLU settings of the flow at version creation. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create time of the version. - * @type int $state - * Output only. The state 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\Cx\V3\Version::initOnce(); - parent::__construct($data); - } - - /** - * Format: - * projects//locations//agents//flows//versions/. - * Version ID is a self-increasing number generated by Dialogflow upon version - * creation. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Format: - * projects//locations//agents//flows//versions/. - * Version ID is a self-increasing number generated by Dialogflow upon version - * creation. - * - * 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 human-readable name of the version. Limit of 64 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The human-readable name of the version. Limit of 64 characters. - * - * 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; - } - - /** - * The description of the version. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the version. The maximum length is 500 characters. If - * exceeded, the request is rejected. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The NLU settings of the flow at version creation. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dialogflow\Cx\V3\NluSettings|null - */ - public function getNluSettings() - { - return $this->nlu_settings; - } - - public function hasNluSettings() - { - return isset($this->nlu_settings); - } - - public function clearNluSettings() - { - unset($this->nlu_settings); - } - - /** - * Output only. The NLU settings of the flow at version creation. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dialogflow\Cx\V3\NluSettings $var - * @return $this - */ - public function setNluSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\NluSettings::class); - $this->nlu_settings = $var; - - return $this; - } - - /** - * Output only. Create time of the version. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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 version. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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 state of this version. This field is read-only and cannot - * be set by create and update methods. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of this version. This field is read-only and cannot - * be set by create and update methods. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Version.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Version\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version/State.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version/State.php deleted file mode 100644 index c2cd9105a082..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Version/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dialogflow.cx.v3.Version.State - */ -class State -{ - /** - * Not specified. This value is not used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Version is not ready to serve (e.g. training is running). - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * Training has succeeded and this version is ready to serve. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * Version training failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - 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\Cx\V3\Version_State::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants.php deleted file mode 100644 index 3dd423d41e7a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dialogflow.cx.v3.VersionVariants - */ -class VersionVariants extends \Google\Protobuf\Internal\Message -{ - /** - * A list of flow version variants. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; - */ - private $variants; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\VersionVariants\Variant>|\Google\Protobuf\Internal\RepeatedField $variants - * A list of flow version variants. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * A list of flow version variants. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVariants() - { - return $this->variants; - } - - /** - * A list of flow version variants. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.VersionVariants.Variant variants = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\VersionVariants\Variant>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVariants($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\VersionVariants\Variant::class); - $this->variants = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants/Variant.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants/Variant.php deleted file mode 100644 index 4ac680c1f322..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VersionVariants/Variant.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.dialogflow.cx.v3.VersionVariants.Variant - */ -class Variant extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the flow version. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * Percentage of the traffic which should be routed to this - * version of flow. Traffic allocation for a single flow must sum up to 1.0. - * - * Generated from protobuf field float traffic_allocation = 2; - */ - protected $traffic_allocation = 0.0; - /** - * Whether the variant is for the control group. - * - * Generated from protobuf field bool is_control_group = 3; - */ - protected $is_control_group = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * The name of the flow version. - * Format: - * `projects//locations//agents//flows//versions/`. - * @type float $traffic_allocation - * Percentage of the traffic which should be routed to this - * version of flow. Traffic allocation for a single flow must sum up to 1.0. - * @type bool $is_control_group - * Whether the variant is for the control group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Experiment::initOnce(); - parent::__construct($data); - } - - /** - * The name of the flow version. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The name of the flow version. - * Format: - * `projects//locations//agents//flows//versions/`. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Percentage of the traffic which should be routed to this - * version of flow. Traffic allocation for a single flow must sum up to 1.0. - * - * Generated from protobuf field float traffic_allocation = 2; - * @return float - */ - public function getTrafficAllocation() - { - return $this->traffic_allocation; - } - - /** - * Percentage of the traffic which should be routed to this - * version of flow. Traffic allocation for a single flow must sum up to 1.0. - * - * Generated from protobuf field float traffic_allocation = 2; - * @param float $var - * @return $this - */ - public function setTrafficAllocation($var) - { - GPBUtil::checkFloat($var); - $this->traffic_allocation = $var; - - return $this; - } - - /** - * Whether the variant is for the control group. - * - * Generated from protobuf field bool is_control_group = 3; - * @return bool - */ - public function getIsControlGroup() - { - return $this->is_control_group; - } - - /** - * Whether the variant is for the control group. - * - * Generated from protobuf field bool is_control_group = 3; - * @param bool $var - * @return $this - */ - public function setIsControlGroup($var) - { - GPBUtil::checkBool($var); - $this->is_control_group = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Variant::class, \Google\Cloud\Dialogflow\Cx\V3\VersionVariants_Variant::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VoiceSelectionParams.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VoiceSelectionParams.php deleted file mode 100644 index ed9476386ca5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/VoiceSelectionParams.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.dialogflow.cx.v3.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.cx.v3.VoiceSelectionParams.ssml_gender]. - * For the list of available voices, please refer to [Supported voices and - * languages](https://cloud.google.com/text-to-speech/docs/voices). - * - * 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.cx.v3.VoiceSelectionParams.name]. Note that - * this is only a preference, not requirement. If a voice of the appropriate - * gender is not available, the synthesizer substitutes a voice with a - * different gender rather than failing the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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.cx.v3.VoiceSelectionParams.ssml_gender]. - * For the list of available voices, please refer to [Supported voices and - * languages](https://cloud.google.com/text-to-speech/docs/voices). - * @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.cx.v3.VoiceSelectionParams.name]. Note that - * this is only a preference, not requirement. If a voice of the appropriate - * gender is not available, the synthesizer substitutes a voice with a - * different gender rather than failing the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\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.cx.v3.VoiceSelectionParams.ssml_gender]. - * For the list of available voices, please refer to [Supported voices and - * languages](https://cloud.google.com/text-to-speech/docs/voices). - * - * 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.cx.v3.VoiceSelectionParams.ssml_gender]. - * For the list of available voices, please refer to [Supported voices and - * languages](https://cloud.google.com/text-to-speech/docs/voices). - * - * 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.cx.v3.VoiceSelectionParams.name]. Note that - * this is only a preference, not requirement. If a voice of the appropriate - * gender is not available, the synthesizer substitutes a voice with a - * different gender rather than failing the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.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.cx.v3.VoiceSelectionParams.name]. Note that - * this is only a preference, not requirement. If a voice of the appropriate - * gender is not available, the synthesizer substitutes a voice with a - * different gender rather than failing the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SsmlVoiceGender ssml_gender = 2; - * @param int $var - * @return $this - */ - public function setSsmlGender($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\SsmlVoiceGender::class); - $this->ssml_gender = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook.php deleted file mode 100644 index ce20199fde7f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.dialogflow.cx.v3.Webhook - */ -class Webhook extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier of the webhook. - * Required for the - * [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook] - * method. - * [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook] - * populates the name automatically. Format: - * `projects//locations//agents//webhooks/`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The human-readable name of the webhook, unique within the agent. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Webhook execution timeout. Execution is considered failed if Dialogflow - * doesn't receive a response from webhook at the end of the timeout period. - * Defaults to 5 seconds, maximum allowed timeout is 30 seconds. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 6; - */ - protected $timeout = null; - /** - * Indicates whether the webhook is disabled. - * - * Generated from protobuf field bool disabled = 5; - */ - protected $disabled = false; - protected $webhook; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique identifier of the webhook. - * Required for the - * [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook] - * method. - * [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook] - * populates the name automatically. Format: - * `projects//locations//agents//webhooks/`. - * @type string $display_name - * Required. The human-readable name of the webhook, unique within the agent. - * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService $generic_web_service - * Configuration for a generic web service. - * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig $service_directory - * Configuration for a [Service - * Directory](https://cloud.google.com/service-directory) service. - * @type \Google\Protobuf\Duration $timeout - * Webhook execution timeout. Execution is considered failed if Dialogflow - * doesn't receive a response from webhook at the end of the timeout period. - * Defaults to 5 seconds, maximum allowed timeout is 30 seconds. - * @type bool $disabled - * Indicates whether the webhook is disabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier of the webhook. - * Required for the - * [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook] - * method. - * [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook] - * populates the name automatically. Format: - * `projects//locations//agents//webhooks/`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique identifier of the webhook. - * Required for the - * [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook] - * method. - * [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook] - * populates the name automatically. Format: - * `projects//locations//agents//webhooks/`. - * - * 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 human-readable name of the webhook, unique within the 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 human-readable name of the webhook, unique within the 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; - } - - /** - * Configuration for a generic web service. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4; - * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService|null - */ - public function getGenericWebService() - { - return $this->readOneof(4); - } - - public function hasGenericWebService() - { - return $this->hasOneof(4); - } - - /** - * Configuration for a generic web service. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4; - * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService $var - * @return $this - */ - public function setGenericWebService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Configuration for a [Service - * Directory](https://cloud.google.com/service-directory) service. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7; - * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig|null - */ - public function getServiceDirectory() - { - return $this->readOneof(7); - } - - public function hasServiceDirectory() - { - return $this->hasOneof(7); - } - - /** - * Configuration for a [Service - * Directory](https://cloud.google.com/service-directory) service. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig service_directory = 7; - * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig $var - * @return $this - */ - public function setServiceDirectory($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Webhook execution timeout. Execution is considered failed if Dialogflow - * doesn't receive a response from webhook at the end of the timeout period. - * Defaults to 5 seconds, maximum allowed timeout is 30 seconds. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Webhook execution timeout. Execution is considered failed if Dialogflow - * doesn't receive a response from webhook at the end of the timeout period. - * Defaults to 5 seconds, maximum allowed timeout is 30 seconds. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Indicates whether the webhook is disabled. - * - * Generated from protobuf field bool disabled = 5; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Indicates whether the webhook is disabled. - * - * Generated from protobuf field bool disabled = 5; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * @return string - */ - public function getWebhook() - { - return $this->whichOneof("webhook"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService.php deleted file mode 100644 index 070f41bf1345..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService.php +++ /dev/null @@ -1,658 +0,0 @@ -google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - */ -class GenericWebService extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The webhook URI for receiving POST requests. It must use https - * protocol. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * The user name for HTTP Basic authentication. - * - * Generated from protobuf field string username = 2 [deprecated = true]; - * @deprecated - */ - protected $username = ''; - /** - * The password for HTTP Basic authentication. - * - * Generated from protobuf field string password = 3 [deprecated = true]; - * @deprecated - */ - protected $password = ''; - /** - * Optional. The SecretManager secret version resource storing the - * username:password pair for HTTP Basic authentication. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $secret_version_for_username_password = ''; - /** - * The HTTP request headers to send together with webhook requests. - * - * Generated from protobuf field map request_headers = 4; - */ - private $request_headers; - /** - * Optional. The HTTP request headers to send together with webhook - * requests. Header values are stored in SecretManager secret versions. - * When the same header name is specified in both `request_headers` and - * `secret_versions_for_request_headers`, the value in - * `secret_versions_for_request_headers` will be used. - * - * Generated from protobuf field map secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $secret_versions_for_request_headers; - /** - * Optional. Specifies a list of allowed custom CA certificates (in DER - * format) for HTTPS verification. This overrides the default SSL trust - * store. If this is empty or unspecified, Dialogflow will use Google's - * default trust store to verify certificates. N.B. Make sure the HTTPS - * server certificates are signed with "subject alt name". For instance a - * certificate can be self-signed using the following command, - * ``` - * openssl x509 -req -days 200 -in example.com.csr \ - * -signkey example.com.key \ - * -out example.com.crt \ - * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") - * ``` - * - * Generated from protobuf field repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $allowed_ca_certs; - /** - * Optional. The OAuth configuration of the webhook. If specified, - * Dialogflow will initiate the OAuth client credential flow to exchange an - * access token from the 3rd party platform and put it in the auth header. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $oauth_config = null; - /** - * Optional. Indicate the auth token type generated from the [Diglogflow - * service - * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). - * The generated token is sent in the Authorization header. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_agent_auth = 0; - /** - * Optional. Configuration for service account authentication. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account_auth_config = null; - /** - * Optional. Type of the webhook. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $webhook_type = 0; - /** - * Optional. HTTP method for the flexible webhook calls. Standard webhook - * always uses POST. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $http_method = 0; - /** - * Optional. Defines a custom JSON object as request body to send to - * flexible webhook. - * - * Generated from protobuf field string request_body = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_body = ''; - /** - * Optional. Maps the values extracted from specific fields of the flexible - * webhook response into session parameters. - * - Key: session parameter name - * - Value: field path in the webhook response - * - * Generated from protobuf field map parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $parameter_mapping; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. The webhook URI for receiving POST requests. It must use https - * protocol. - * @type string $username - * The user name for HTTP Basic authentication. - * @type string $password - * The password for HTTP Basic authentication. - * @type string $secret_version_for_username_password - * Optional. The SecretManager secret version resource storing the - * username:password pair for HTTP Basic authentication. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * @type array|\Google\Protobuf\Internal\MapField $request_headers - * The HTTP request headers to send together with webhook requests. - * @type array|\Google\Protobuf\Internal\MapField $secret_versions_for_request_headers - * Optional. The HTTP request headers to send together with webhook - * requests. Header values are stored in SecretManager secret versions. - * When the same header name is specified in both `request_headers` and - * `secret_versions_for_request_headers`, the value in - * `secret_versions_for_request_headers` will be used. - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_ca_certs - * Optional. Specifies a list of allowed custom CA certificates (in DER - * format) for HTTPS verification. This overrides the default SSL trust - * store. If this is empty or unspecified, Dialogflow will use Google's - * default trust store to verify certificates. N.B. Make sure the HTTPS - * server certificates are signed with "subject alt name". For instance a - * certificate can be self-signed using the following command, - * ``` - * openssl x509 -req -days 200 -in example.com.csr \ - * -signkey example.com.key \ - * -out example.com.crt \ - * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") - * ``` - * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\OAuthConfig $oauth_config - * Optional. The OAuth configuration of the webhook. If specified, - * Dialogflow will initiate the OAuth client credential flow to exchange an - * access token from the 3rd party platform and put it in the auth header. - * @type int $service_agent_auth - * Optional. Indicate the auth token type generated from the [Diglogflow - * service - * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). - * The generated token is sent in the Authorization header. - * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig $service_account_auth_config - * Optional. Configuration for service account authentication. - * @type int $webhook_type - * Optional. Type of the webhook. - * @type int $http_method - * Optional. HTTP method for the flexible webhook calls. Standard webhook - * always uses POST. - * @type string $request_body - * Optional. Defines a custom JSON object as request body to send to - * flexible webhook. - * @type array|\Google\Protobuf\Internal\MapField $parameter_mapping - * Optional. Maps the values extracted from specific fields of the flexible - * webhook response into session parameters. - * - Key: session parameter name - * - Value: field path in the webhook response - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Required. The webhook 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 webhook 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; - } - - /** - * The user name for HTTP Basic authentication. - * - * Generated from protobuf field string username = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getUsername() - { - if ($this->username !== '') { - @trigger_error('username is deprecated.', E_USER_DEPRECATED); - } - return $this->username; - } - - /** - * The user name for HTTP Basic authentication. - * - * Generated from protobuf field string username = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setUsername($var) - { - @trigger_error('username is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * The password for HTTP Basic authentication. - * - * Generated from protobuf field string password = 3 [deprecated = true]; - * @return string - * @deprecated - */ - public function getPassword() - { - if ($this->password !== '') { - @trigger_error('password is deprecated.', E_USER_DEPRECATED); - } - return $this->password; - } - - /** - * The password for HTTP Basic authentication. - * - * Generated from protobuf field string password = 3 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setPassword($var) - { - @trigger_error('password is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * Optional. The SecretManager secret version resource storing the - * username:password pair for HTTP Basic authentication. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getSecretVersionForUsernamePassword() - { - return $this->secret_version_for_username_password; - } - - /** - * Optional. The SecretManager secret version resource storing the - * username:password pair for HTTP Basic authentication. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSecretVersionForUsernamePassword($var) - { - GPBUtil::checkString($var, True); - $this->secret_version_for_username_password = $var; - - return $this; - } - - /** - * The HTTP request headers to send together with webhook requests. - * - * Generated from protobuf field map request_headers = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getRequestHeaders() - { - return $this->request_headers; - } - - /** - * The HTTP request headers to send together with webhook requests. - * - * Generated from protobuf field map request_headers = 4; - * @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. The HTTP request headers to send together with webhook - * requests. Header values are stored in SecretManager secret versions. - * When the same header name is specified in both `request_headers` and - * `secret_versions_for_request_headers`, the value in - * `secret_versions_for_request_headers` will be used. - * - * Generated from protobuf field map secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSecretVersionsForRequestHeaders() - { - return $this->secret_versions_for_request_headers; - } - - /** - * Optional. The HTTP request headers to send together with webhook - * requests. Header values are stored in SecretManager secret versions. - * When the same header name is specified in both `request_headers` and - * `secret_versions_for_request_headers`, the value in - * `secret_versions_for_request_headers` will be used. - * - * Generated from protobuf field map secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setSecretVersionsForRequestHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\SecretVersionHeaderValue::class); - $this->secret_versions_for_request_headers = $arr; - - return $this; - } - - /** - * Optional. Specifies a list of allowed custom CA certificates (in DER - * format) for HTTPS verification. This overrides the default SSL trust - * store. If this is empty or unspecified, Dialogflow will use Google's - * default trust store to verify certificates. N.B. Make sure the HTTPS - * server certificates are signed with "subject alt name". For instance a - * certificate can be self-signed using the following command, - * ``` - * openssl x509 -req -days 200 -in example.com.csr \ - * -signkey example.com.key \ - * -out example.com.crt \ - * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") - * ``` - * - * Generated from protobuf field repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedCaCerts() - { - return $this->allowed_ca_certs; - } - - /** - * Optional. Specifies a list of allowed custom CA certificates (in DER - * format) for HTTPS verification. This overrides the default SSL trust - * store. If this is empty or unspecified, Dialogflow will use Google's - * default trust store to verify certificates. N.B. Make sure the HTTPS - * server certificates are signed with "subject alt name". For instance a - * certificate can be self-signed using the following command, - * ``` - * openssl x509 -req -days 200 -in example.com.csr \ - * -signkey example.com.key \ - * -out example.com.crt \ - * -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") - * ``` - * - * Generated from protobuf field repeated bytes allowed_ca_certs = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedCaCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); - $this->allowed_ca_certs = $arr; - - return $this; - } - - /** - * Optional. The OAuth configuration of the webhook. If specified, - * Dialogflow will initiate the OAuth client credential flow to exchange an - * access token from the 3rd party platform and put it in the auth header. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\OAuthConfig|null - */ - public function getOauthConfig() - { - return $this->oauth_config; - } - - public function hasOauthConfig() - { - return isset($this->oauth_config); - } - - public function clearOauthConfig() - { - unset($this->oauth_config); - } - - /** - * Optional. The OAuth configuration of the webhook. If specified, - * Dialogflow will initiate the OAuth client credential flow to exchange an - * access token from the 3rd party platform and put it in the auth header. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig oauth_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\OAuthConfig $var - * @return $this - */ - public function setOauthConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\OAuthConfig::class); - $this->oauth_config = $var; - - return $this; - } - - /** - * Optional. Indicate the auth token type generated from the [Diglogflow - * service - * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). - * The generated token is sent in the Authorization header. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getServiceAgentAuth() - { - return $this->service_agent_auth; - } - - /** - * Optional. Indicate the auth token type generated from the [Diglogflow - * service - * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). - * The generated token is sent in the Authorization header. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth service_agent_auth = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setServiceAgentAuth($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAgentAuth::class); - $this->service_agent_auth = $var; - - return $this; - } - - /** - * Optional. Configuration for service account authentication. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig|null - */ - public function getServiceAccountAuthConfig() - { - return $this->service_account_auth_config; - } - - public function hasServiceAccountAuthConfig() - { - return isset($this->service_account_auth_config); - } - - public function clearServiceAccountAuthConfig() - { - unset($this->service_account_auth_config); - } - - /** - * Optional. Configuration for service account authentication. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig $var - * @return $this - */ - public function setServiceAccountAuthConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\ServiceAccountAuthConfig::class); - $this->service_account_auth_config = $var; - - return $this; - } - - /** - * Optional. Type of the webhook. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getWebhookType() - { - return $this->webhook_type; - } - - /** - * Optional. Type of the webhook. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType webhook_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setWebhookType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\WebhookType::class); - $this->webhook_type = $var; - - return $this; - } - - /** - * Optional. HTTP method for the flexible webhook calls. Standard webhook - * always uses POST. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * Optional. HTTP method for the flexible webhook calls. Standard webhook - * always uses POST. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod http_method = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService\HttpMethod::class); - $this->http_method = $var; - - return $this; - } - - /** - * Optional. Defines a custom JSON object as request body to send to - * flexible webhook. - * - * Generated from protobuf field string request_body = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestBody() - { - return $this->request_body; - } - - /** - * Optional. Defines a custom JSON object as request body to send to - * flexible webhook. - * - * Generated from protobuf field string request_body = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestBody($var) - { - GPBUtil::checkString($var, True); - $this->request_body = $var; - - return $this; - } - - /** - * Optional. Maps the values extracted from specific fields of the flexible - * webhook response into session parameters. - * - Key: session parameter name - * - Value: field path in the webhook response - * - * Generated from protobuf field map parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParameterMapping() - { - return $this->parameter_mapping; - } - - /** - * Optional. Maps the values extracted from specific fields of the flexible - * webhook response into session parameters. - * - Key: session parameter name - * - Value: field path in the webhook response - * - * Generated from protobuf field map parameter_mapping = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParameterMapping($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->parameter_mapping = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GenericWebService::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/HttpMethod.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/HttpMethod.php deleted file mode 100644 index ddfa110512cd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/HttpMethod.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod - */ -class HttpMethod -{ - /** - * HTTP method not specified. - * - * Generated from protobuf enum HTTP_METHOD_UNSPECIFIED = 0; - */ - const HTTP_METHOD_UNSPECIFIED = 0; - /** - * HTTP POST Method. - * - * Generated from protobuf enum POST = 1; - */ - const POST = 1; - /** - * HTTP GET Method. - * - * Generated from protobuf enum GET = 2; - */ - const GET = 2; - /** - * HTTP HEAD Method. - * - * Generated from protobuf enum HEAD = 3; - */ - const HEAD = 3; - /** - * HTTP PUT Method. - * - * Generated from protobuf enum PUT = 4; - */ - const PUT = 4; - /** - * HTTP DELETE Method. - * - * Generated from protobuf enum DELETE = 5; - */ - const DELETE = 5; - /** - * HTTP PATCH Method. - * - * Generated from protobuf enum PATCH = 6; - */ - const PATCH = 6; - /** - * HTTP OPTIONS Method. - * - * Generated from protobuf enum OPTIONS = 7; - */ - const OPTIONS = 7; - - private static $valueToName = [ - self::HTTP_METHOD_UNSPECIFIED => 'HTTP_METHOD_UNSPECIFIED', - self::POST => 'POST', - self::GET => 'GET', - self::HEAD => 'HEAD', - self::PUT => 'PUT', - self::DELETE => 'DELETE', - self::PATCH => 'PATCH', - self::OPTIONS => 'OPTIONS', - ]; - - 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(HttpMethod::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_HttpMethod::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/OAuthConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/OAuthConfig.php deleted file mode 100644 index 0efa470f202c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/OAuthConfig.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - */ -class OAuthConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The client ID provided by the 3rd party platform. - * - * Generated from protobuf field string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_id = ''; - /** - * Optional. The client secret provided by the 3rd party platform. - * - * Generated from protobuf field string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $client_secret = ''; - /** - * Optional. The name of the SecretManager secret version resource storing - * the client secret. If this field is set, the `client_secret` field will - * be ignored. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $secret_version_for_client_secret = ''; - /** - * Required. The token endpoint provided by the 3rd party platform to - * exchange an access token. - * - * Generated from protobuf field string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $token_endpoint = ''; - /** - * Optional. The OAuth scopes to grant. - * - * Generated from protobuf field repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $scopes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $client_id - * Required. The client ID provided by the 3rd party platform. - * @type string $client_secret - * Optional. The client secret provided by the 3rd party platform. - * @type string $secret_version_for_client_secret - * Optional. The name of the SecretManager secret version resource storing - * the client secret. If this field is set, the `client_secret` field will - * be ignored. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * @type string $token_endpoint - * Required. The token endpoint provided by the 3rd party platform to - * exchange an access token. - * @type array|\Google\Protobuf\Internal\RepeatedField $scopes - * Optional. The OAuth scopes to grant. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Required. The client ID provided by the 3rd party platform. - * - * Generated from protobuf field string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClientId() - { - return $this->client_id; - } - - /** - * Required. The client ID provided by the 3rd party platform. - * - * Generated from protobuf field string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClientId($var) - { - GPBUtil::checkString($var, True); - $this->client_id = $var; - - return $this; - } - - /** - * Optional. The client secret provided by the 3rd party platform. - * - * Generated from protobuf field string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClientSecret() - { - return $this->client_secret; - } - - /** - * Optional. The client secret provided by the 3rd party platform. - * - * Generated from protobuf field string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClientSecret($var) - { - GPBUtil::checkString($var, True); - $this->client_secret = $var; - - return $this; - } - - /** - * Optional. The name of the SecretManager secret version resource storing - * the client secret. If this field is set, the `client_secret` field will - * be ignored. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getSecretVersionForClientSecret() - { - return $this->secret_version_for_client_secret; - } - - /** - * Optional. The name of the SecretManager secret version resource storing - * the client secret. If this field is set, the `client_secret` field will - * be ignored. Format: - * `projects/{project}/secrets/{secret}/versions/{version}` - * - * Generated from protobuf field string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSecretVersionForClientSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret_version_for_client_secret = $var; - - return $this; - } - - /** - * Required. The token endpoint provided by the 3rd party platform to - * exchange an access token. - * - * Generated from protobuf field string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTokenEndpoint() - { - return $this->token_endpoint; - } - - /** - * Required. The token endpoint provided by the 3rd party platform to - * exchange an access token. - * - * Generated from protobuf field string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTokenEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->token_endpoint = $var; - - return $this; - } - - /** - * Optional. The OAuth scopes to grant. - * - * Generated from protobuf field repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScopes() - { - return $this->scopes; - } - - /** - * Optional. The OAuth scopes to grant. - * - * Generated from protobuf field repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scopes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OAuthConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_OAuthConfig::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAgentAuth.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAgentAuth.php deleted file mode 100644 index 19a4b6a37a33..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/ServiceAgentAuth.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth - */ -class ServiceAgentAuth -{ - /** - * Service agent auth type unspecified. Default to ID_TOKEN. - * - * Generated from protobuf enum SERVICE_AGENT_AUTH_UNSPECIFIED = 0; - */ - const SERVICE_AGENT_AUTH_UNSPECIFIED = 0; - /** - * No token used. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * Use [ID - * token](https://cloud.google.com/docs/authentication/token-types#id) - * generated from service agent. This can be used to access Cloud Function - * and Cloud Run after you grant Invoker role to - * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. - * - * Generated from protobuf enum ID_TOKEN = 2; - */ - const ID_TOKEN = 2; - /** - * Use [access - * token](https://cloud.google.com/docs/authentication/token-types#access) - * generated from service agent. This can be used to access other Google - * Cloud APIs after you grant required roles to - * `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. - * - * Generated from protobuf enum ACCESS_TOKEN = 3; - */ - const ACCESS_TOKEN = 3; - - private static $valueToName = [ - self::SERVICE_AGENT_AUTH_UNSPECIFIED => 'SERVICE_AGENT_AUTH_UNSPECIFIED', - self::NONE => 'NONE', - self::ID_TOKEN => 'ID_TOKEN', - self::ACCESS_TOKEN => 'ACCESS_TOKEN', - ]; - - 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(ServiceAgentAuth::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_ServiceAgentAuth::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/WebhookType.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/WebhookType.php deleted file mode 100644 index a700af424e80..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/GenericWebService/WebhookType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType - */ -class WebhookType -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum WEBHOOK_TYPE_UNSPECIFIED = 0; - */ - const WEBHOOK_TYPE_UNSPECIFIED = 0; - /** - * Represents a standard webhook. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * Represents a flexible webhook. - * - * Generated from protobuf enum FLEXIBLE = 2; - */ - const FLEXIBLE = 2; - - private static $valueToName = [ - self::WEBHOOK_TYPE_UNSPECIFIED => 'WEBHOOK_TYPE_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::FLEXIBLE => 'FLEXIBLE', - ]; - - 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(WebhookType::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_GenericWebService_WebhookType::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/ServiceDirectoryConfig.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/ServiceDirectoryConfig.php deleted file mode 100644 index a452a45b6a0e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/Webhook/ServiceDirectoryConfig.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - */ -class ServiceDirectoryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of [Service - * Directory](https://cloud.google.com/service-directory) service. - * Format: - * `projects//locations//namespaces//services/`. - * `Location ID` of the service directory must be the same as the location - * of the agent. - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $service = ''; - /** - * Generic Service configuration of this webhook. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 2; - */ - protected $generic_web_service = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * Required. The name of [Service - * Directory](https://cloud.google.com/service-directory) service. - * Format: - * `projects//locations//namespaces//services/`. - * `Location ID` of the service directory must be the same as the location - * of the agent. - * @type \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService $generic_web_service - * Generic Service configuration of this webhook. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of [Service - * Directory](https://cloud.google.com/service-directory) service. - * Format: - * `projects//locations//namespaces//services/`. - * `Location ID` of the service directory must be the same as the location - * of the agent. - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Required. The name of [Service - * Directory](https://cloud.google.com/service-directory) service. - * Format: - * `projects//locations//namespaces//services/`. - * `Location ID` of the service directory must be the same as the location - * of the agent. - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Generic Service configuration of this webhook. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService|null - */ - public function getGenericWebService() - { - return $this->generic_web_service; - } - - public function hasGenericWebService() - { - return isset($this->generic_web_service); - } - - public function clearGenericWebService() - { - unset($this->generic_web_service); - } - - /** - * Generic Service configuration of this webhook. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService $var - * @return $this - */ - public function setGenericWebService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService::class); - $this->generic_web_service = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceDirectoryConfig::class, \Google\Cloud\Dialogflow\Cx\V3\Webhook_ServiceDirectoryConfig::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest.php deleted file mode 100644 index 1123abe23f0e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest.php +++ /dev/null @@ -1,673 +0,0 @@ -google.cloud.dialogflow.cx.v3.WebhookRequest - */ -class WebhookRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Always present. The unique identifier of the - * [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] - * that will be returned to the API caller. - * - * Generated from protobuf field string detect_intent_response_id = 1; - */ - protected $detect_intent_response_id = ''; - /** - * The language code specified in the [original - * request][QueryInput.language_code]. - * - * Generated from protobuf field string language_code = 15; - */ - protected $language_code = ''; - /** - * Always present. Information about the fulfillment that triggered this - * webhook call. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; - */ - protected $fulfillment_info = null; - /** - * Information about the last matched intent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; - */ - protected $intent_info = null; - /** - * Information about page status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; - */ - protected $page_info = null; - /** - * Information about session status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5; - */ - protected $session_info = null; - /** - * The list of rich message responses to present to the user. Webhook can - * choose to append or replace this list in - * [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response]; - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7; - */ - private $messages; - /** - * Custom data set in - * [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload]. - * - * Generated from protobuf field .google.protobuf.Struct payload = 8; - */ - protected $payload = null; - /** - * The sentiment analysis result of the current user request. The field is - * filled when sentiment analysis is configured to be enabled for the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; - */ - protected $sentiment_analysis_result = null; - /** - * Information about the language of the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LanguageInfo language_info = 18; - */ - protected $language_info = null; - protected $query; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $detect_intent_response_id - * Always present. The unique identifier of the - * [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] - * that will be returned to the API caller. - * @type string $text - * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was - * provided as input, this field will contain a copy of the text. - * @type string $trigger_intent - * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as - * input, this field will contain a copy of the intent identifier. Format: - * `projects//locations//agents//intents/`. - * @type string $transcript - * If [natural language speech - * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, - * this field will contain the transcript for the audio. - * @type string $trigger_event - * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as - * input, this field will contain the name of the event. - * @type string $dtmf_digits - * If [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input, - * this field will contain the DTMF digits. - * @type string $language_code - * The language code specified in the [original - * request][QueryInput.language_code]. - * @type \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo $fulfillment_info - * Always present. Information about the fulfillment that triggered this - * webhook call. - * @type \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo $intent_info - * Information about the last matched intent. - * @type \Google\Cloud\Dialogflow\Cx\V3\PageInfo $page_info - * Information about page status. - * @type \Google\Cloud\Dialogflow\Cx\V3\SessionInfo $session_info - * Information about session status. - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $messages - * The list of rich message responses to present to the user. Webhook can - * choose to append or replace this list in - * [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response]; - * @type \Google\Protobuf\Struct $payload - * Custom data set in - * [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload]. - * @type \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\SentimentAnalysisResult $sentiment_analysis_result - * The sentiment analysis result of the current user request. The field is - * filled when sentiment analysis is configured to be enabled for the request. - * @type \Google\Cloud\Dialogflow\Cx\V3\LanguageInfo $language_info - * Information about the language of the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Always present. The unique identifier of the - * [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] - * that will be returned to the API caller. - * - * Generated from protobuf field string detect_intent_response_id = 1; - * @return string - */ - public function getDetectIntentResponseId() - { - return $this->detect_intent_response_id; - } - - /** - * Always present. The unique identifier of the - * [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] - * that will be returned to the API caller. - * - * Generated from protobuf field string detect_intent_response_id = 1; - * @param string $var - * @return $this - */ - public function setDetectIntentResponseId($var) - { - GPBUtil::checkString($var, True); - $this->detect_intent_response_id = $var; - - return $this; - } - - /** - * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was - * provided as input, this field will contain a copy of the text. - * - * Generated from protobuf field string text = 10; - * @return string - */ - public function getText() - { - return $this->readOneof(10); - } - - public function hasText() - { - return $this->hasOneof(10); - } - - /** - * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was - * provided as input, this field will contain a copy of the text. - * - * Generated from protobuf field string text = 10; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as - * input, this field will contain a copy of the intent identifier. Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string trigger_intent = 11 [(.google.api.resource_reference) = { - * @return string - */ - public function getTriggerIntent() - { - return $this->readOneof(11); - } - - public function hasTriggerIntent() - { - return $this->hasOneof(11); - } - - /** - * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as - * input, this field will contain a copy of the intent identifier. Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string trigger_intent = 11 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTriggerIntent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * If [natural language speech - * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, - * this field will contain the transcript for the audio. - * - * Generated from protobuf field string transcript = 12; - * @return string - */ - public function getTranscript() - { - return $this->readOneof(12); - } - - public function hasTranscript() - { - return $this->hasOneof(12); - } - - /** - * If [natural language speech - * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, - * this field will contain the transcript for the audio. - * - * Generated from protobuf field string transcript = 12; - * @param string $var - * @return $this - */ - public function setTranscript($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as - * input, this field will contain the name of the event. - * - * Generated from protobuf field string trigger_event = 14; - * @return string - */ - public function getTriggerEvent() - { - return $this->readOneof(14); - } - - public function hasTriggerEvent() - { - return $this->hasOneof(14); - } - - /** - * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as - * input, this field will contain the name of the event. - * - * Generated from protobuf field string trigger_event = 14; - * @param string $var - * @return $this - */ - public function setTriggerEvent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * If [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input, - * this field will contain the DTMF digits. - * - * Generated from protobuf field string dtmf_digits = 17; - * @return string - */ - public function getDtmfDigits() - { - return $this->readOneof(17); - } - - public function hasDtmfDigits() - { - return $this->hasOneof(17); - } - - /** - * If [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input, - * this field will contain the DTMF digits. - * - * Generated from protobuf field string dtmf_digits = 17; - * @param string $var - * @return $this - */ - public function setDtmfDigits($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * The language code specified in the [original - * request][QueryInput.language_code]. - * - * Generated from protobuf field string language_code = 15; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language code specified in the [original - * request][QueryInput.language_code]. - * - * 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; - } - - /** - * Always present. Information about the fulfillment that triggered this - * webhook call. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; - * @return \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo|null - */ - public function getFulfillmentInfo() - { - return $this->fulfillment_info; - } - - public function hasFulfillmentInfo() - { - return isset($this->fulfillment_info); - } - - public function clearFulfillmentInfo() - { - unset($this->fulfillment_info); - } - - /** - * Always present. Information about the fulfillment that triggered this - * webhook call. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6; - * @param \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo $var - * @return $this - */ - public function setFulfillmentInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo::class); - $this->fulfillment_info = $var; - - return $this; - } - - /** - * Information about the last matched intent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo|null - */ - public function getIntentInfo() - { - return $this->intent_info; - } - - public function hasIntentInfo() - { - return isset($this->intent_info); - } - - public function clearIntentInfo() - { - unset($this->intent_info); - } - - /** - * Information about the last matched intent. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo $var - * @return $this - */ - public function setIntentInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo::class); - $this->intent_info = $var; - - return $this; - } - - /** - * Information about page status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; - * @return \Google\Cloud\Dialogflow\Cx\V3\PageInfo|null - */ - public function getPageInfo() - { - return $this->page_info; - } - - public function hasPageInfo() - { - return isset($this->page_info); - } - - public function clearPageInfo() - { - unset($this->page_info); - } - - /** - * Information about page status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4; - * @param \Google\Cloud\Dialogflow\Cx\V3\PageInfo $var - * @return $this - */ - public function setPageInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PageInfo::class); - $this->page_info = $var; - - return $this; - } - - /** - * Information about session status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5; - * @return \Google\Cloud\Dialogflow\Cx\V3\SessionInfo|null - */ - public function getSessionInfo() - { - return $this->session_info; - } - - public function hasSessionInfo() - { - return isset($this->session_info); - } - - public function clearSessionInfo() - { - unset($this->session_info); - } - - /** - * Information about session status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5; - * @param \Google\Cloud\Dialogflow\Cx\V3\SessionInfo $var - * @return $this - */ - public function setSessionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SessionInfo::class); - $this->session_info = $var; - - return $this; - } - - /** - * The list of rich message responses to present to the user. Webhook can - * choose to append or replace this list in - * [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response]; - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessages() - { - return $this->messages; - } - - /** - * The list of rich message responses to present to the user. Webhook can - * choose to append or replace this list in - * [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response]; - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::class); - $this->messages = $arr; - - return $this; - } - - /** - * Custom data set in - * [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload]. - * - * Generated from protobuf field .google.protobuf.Struct payload = 8; - * @return \Google\Protobuf\Struct|null - */ - public function getPayload() - { - return $this->payload; - } - - public function hasPayload() - { - return isset($this->payload); - } - - public function clearPayload() - { - unset($this->payload); - } - - /** - * Custom data set in - * [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload]. - * - * Generated from protobuf field .google.protobuf.Struct payload = 8; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->payload = $var; - - return $this; - } - - /** - * The sentiment analysis result of the current user request. The field is - * filled when sentiment analysis is configured to be enabled for the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; - * @return \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\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 of the current user request. The field is - * filled when sentiment analysis is configured to be enabled for the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9; - * @param \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\SentimentAnalysisResult $var - * @return $this - */ - public function setSentimentAnalysisResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\SentimentAnalysisResult::class); - $this->sentiment_analysis_result = $var; - - return $this; - } - - /** - * Information about the language of the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LanguageInfo language_info = 18; - * @return \Google\Cloud\Dialogflow\Cx\V3\LanguageInfo|null - */ - public function getLanguageInfo() - { - return $this->language_info; - } - - public function hasLanguageInfo() - { - return isset($this->language_info); - } - - public function clearLanguageInfo() - { - unset($this->language_info); - } - - /** - * Information about the language of the request. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.LanguageInfo language_info = 18; - * @param \Google\Cloud\Dialogflow\Cx\V3\LanguageInfo $var - * @return $this - */ - public function setLanguageInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\LanguageInfo::class); - $this->language_info = $var; - - return $this; - } - - /** - * @return string - */ - public function getQuery() - { - return $this->whichOneof("query"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/FulfillmentInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/FulfillmentInfo.php deleted file mode 100644 index 9c52c94b594b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/FulfillmentInfo.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - */ -class FulfillmentInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Always present. - * The value of the - * [Fulfillment.tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag] field - * will be populated in this field by Dialogflow when the associated webhook - * is called. The tag is typically used by the webhook service to identify - * which fulfillment is being called, but it could be used for other - * purposes. - * - * Generated from protobuf field string tag = 1; - */ - protected $tag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $tag - * Always present. - * The value of the - * [Fulfillment.tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag] field - * will be populated in this field by Dialogflow when the associated webhook - * is called. The tag is typically used by the webhook service to identify - * which fulfillment is being called, but it could be used for other - * purposes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Always present. - * The value of the - * [Fulfillment.tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag] field - * will be populated in this field by Dialogflow when the associated webhook - * is called. The tag is typically used by the webhook service to identify - * which fulfillment is being called, but it could be used for other - * purposes. - * - * Generated from protobuf field string tag = 1; - * @return string - */ - public function getTag() - { - return $this->tag; - } - - /** - * Always present. - * The value of the - * [Fulfillment.tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag] field - * will be populated in this field by Dialogflow when the associated webhook - * is called. The tag is typically used by the webhook service to identify - * which fulfillment is being called, but it could be used for other - * purposes. - * - * Generated from protobuf field string tag = 1; - * @param string $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkString($var, True); - $this->tag = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FulfillmentInfo::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest_FulfillmentInfo::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo.php deleted file mode 100644 index f1863407758c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - */ -class IntentInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Always present. The unique identifier of the last matched - * [intent][google.cloud.dialogflow.cx.v3.Intent]. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string last_matched_intent = 1 [(.google.api.resource_reference) = { - */ - protected $last_matched_intent = ''; - /** - * Always present. The display name of the last matched - * [intent][google.cloud.dialogflow.cx.v3.Intent]. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * Parameters identified as a result of intent matching. This is a map of - * the name of the identified parameter to the value of the parameter - * identified from the user's utterance. All parameters defined in the - * matched intent that are identified will be surfaced here. - * - * Generated from protobuf field map parameters = 2; - */ - private $parameters; - /** - * The confidence of the matched intent. Values range from 0.0 (completely - * uncertain) to 1.0 (completely certain). - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $last_matched_intent - * Always present. The unique identifier of the last matched - * [intent][google.cloud.dialogflow.cx.v3.Intent]. - * Format: - * `projects//locations//agents//intents/`. - * @type string $display_name - * Always present. The display name of the last matched - * [intent][google.cloud.dialogflow.cx.v3.Intent]. - * @type array|\Google\Protobuf\Internal\MapField $parameters - * Parameters identified as a result of intent matching. This is a map of - * the name of the identified parameter to the value of the parameter - * identified from the user's utterance. All parameters defined in the - * matched intent that are identified will be surfaced here. - * @type float $confidence - * The confidence of the matched intent. Values range from 0.0 (completely - * uncertain) to 1.0 (completely certain). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Always present. The unique identifier of the last matched - * [intent][google.cloud.dialogflow.cx.v3.Intent]. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string last_matched_intent = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getLastMatchedIntent() - { - return $this->last_matched_intent; - } - - /** - * Always present. The unique identifier of the last matched - * [intent][google.cloud.dialogflow.cx.v3.Intent]. - * Format: - * `projects//locations//agents//intents/`. - * - * Generated from protobuf field string last_matched_intent = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLastMatchedIntent($var) - { - GPBUtil::checkString($var, True); - $this->last_matched_intent = $var; - - return $this; - } - - /** - * Always present. The display name of the last matched - * [intent][google.cloud.dialogflow.cx.v3.Intent]. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Always present. The display name of the last matched - * [intent][google.cloud.dialogflow.cx.v3.Intent]. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Parameters identified as a result of intent matching. This is a map of - * the name of the identified parameter to the value of the parameter - * identified from the user's utterance. All parameters defined in the - * matched intent that are identified will be surfaced here. - * - * Generated from protobuf field map parameters = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Parameters identified as a result of intent matching. This is a map of - * the name of the identified parameter to the value of the parameter - * identified from the user's utterance. All parameters defined in the - * matched intent that are identified will be surfaced here. - * - * Generated from protobuf field map parameters = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo\IntentParameterValue::class); - $this->parameters = $arr; - - return $this; - } - - /** - * The confidence of the matched intent. Values range 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; - } - - /** - * The confidence of the matched intent. Values range 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IntentInfo::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest_IntentInfo::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo/IntentParameterValue.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo/IntentParameterValue.php deleted file mode 100644 index e8460cd057b6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/IntentInfo/IntentParameterValue.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - */ -class IntentParameterValue extends \Google\Protobuf\Internal\Message -{ - /** - * Always present. Original text value extracted from user utterance. - * - * Generated from protobuf field string original_value = 1; - */ - protected $original_value = ''; - /** - * Always present. Structured value for the parameter extracted from user - * utterance. - * - * Generated from protobuf field .google.protobuf.Value resolved_value = 2; - */ - protected $resolved_value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $original_value - * Always present. Original text value extracted from user utterance. - * @type \Google\Protobuf\Value $resolved_value - * Always present. Structured value for the parameter extracted from user - * utterance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * Always present. Original text value extracted from user utterance. - * - * Generated from protobuf field string original_value = 1; - * @return string - */ - public function getOriginalValue() - { - return $this->original_value; - } - - /** - * Always present. Original text value extracted from user utterance. - * - * Generated from protobuf field string original_value = 1; - * @param string $var - * @return $this - */ - public function setOriginalValue($var) - { - GPBUtil::checkString($var, True); - $this->original_value = $var; - - return $this; - } - - /** - * Always present. Structured value for the parameter extracted from user - * utterance. - * - * Generated from protobuf field .google.protobuf.Value resolved_value = 2; - * @return \Google\Protobuf\Value|null - */ - public function getResolvedValue() - { - return $this->resolved_value; - } - - public function hasResolvedValue() - { - return isset($this->resolved_value); - } - - public function clearResolvedValue() - { - unset($this->resolved_value); - } - - /** - * Always present. Structured value for the parameter extracted from user - * utterance. - * - * Generated from protobuf field .google.protobuf.Value resolved_value = 2; - * @param \Google\Protobuf\Value $var - * @return $this - */ - public function setResolvedValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); - $this->resolved_value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IntentParameterValue::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest_IntentInfo_IntentParameterValue::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/SentimentAnalysisResult.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/SentimentAnalysisResult.php deleted file mode 100644 index 51d43085e82e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookRequest/SentimentAnalysisResult.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult - */ -class SentimentAnalysisResult 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\Cx\V3\Webhook::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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SentimentAnalysisResult::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookRequest_SentimentAnalysisResult::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse.php deleted file mode 100644 index 7b8e07cc6404..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse.php +++ /dev/null @@ -1,312 +0,0 @@ -google.cloud.dialogflow.cx.v3.WebhookResponse - */ -class WebhookResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The fulfillment response to send to the user. This field can be omitted by - * the webhook if it does not intend to send any response to the user. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1; - */ - protected $fulfillment_response = null; - /** - * Information about page status. This field can be omitted by the webhook if - * it does not intend to modify page status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2; - */ - protected $page_info = null; - /** - * Information about session status. This field can be omitted by the webhook - * if it does not intend to modify session status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3; - */ - protected $session_info = null; - /** - * Value to append directly to - * [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads]. - * - * Generated from protobuf field .google.protobuf.Struct payload = 4; - */ - protected $payload = null; - protected $transition; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse\FulfillmentResponse $fulfillment_response - * The fulfillment response to send to the user. This field can be omitted by - * the webhook if it does not intend to send any response to the user. - * @type \Google\Cloud\Dialogflow\Cx\V3\PageInfo $page_info - * Information about page status. This field can be omitted by the webhook if - * it does not intend to modify page status. - * @type \Google\Cloud\Dialogflow\Cx\V3\SessionInfo $session_info - * Information about session status. This field can be omitted by the webhook - * if it does not intend to modify session status. - * @type \Google\Protobuf\Struct $payload - * Value to append directly to - * [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads]. - * @type string $target_page - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * @type string $target_flow - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * The fulfillment response to send to the user. This field can be omitted by - * the webhook if it does not intend to send any response to the user. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1; - * @return \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse\FulfillmentResponse|null - */ - public function getFulfillmentResponse() - { - return $this->fulfillment_response; - } - - public function hasFulfillmentResponse() - { - return isset($this->fulfillment_response); - } - - public function clearFulfillmentResponse() - { - unset($this->fulfillment_response); - } - - /** - * The fulfillment response to send to the user. This field can be omitted by - * the webhook if it does not intend to send any response to the user. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1; - * @param \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse\FulfillmentResponse $var - * @return $this - */ - public function setFulfillmentResponse($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse\FulfillmentResponse::class); - $this->fulfillment_response = $var; - - return $this; - } - - /** - * Information about page status. This field can be omitted by the webhook if - * it does not intend to modify page status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2; - * @return \Google\Cloud\Dialogflow\Cx\V3\PageInfo|null - */ - public function getPageInfo() - { - return $this->page_info; - } - - public function hasPageInfo() - { - return isset($this->page_info); - } - - public function clearPageInfo() - { - unset($this->page_info); - } - - /** - * Information about page status. This field can be omitted by the webhook if - * it does not intend to modify page status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2; - * @param \Google\Cloud\Dialogflow\Cx\V3\PageInfo $var - * @return $this - */ - public function setPageInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PageInfo::class); - $this->page_info = $var; - - return $this; - } - - /** - * Information about session status. This field can be omitted by the webhook - * if it does not intend to modify session status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3; - * @return \Google\Cloud\Dialogflow\Cx\V3\SessionInfo|null - */ - public function getSessionInfo() - { - return $this->session_info; - } - - public function hasSessionInfo() - { - return isset($this->session_info); - } - - public function clearSessionInfo() - { - unset($this->session_info); - } - - /** - * Information about session status. This field can be omitted by the webhook - * if it does not intend to modify session status. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3; - * @param \Google\Cloud\Dialogflow\Cx\V3\SessionInfo $var - * @return $this - */ - public function setSessionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\SessionInfo::class); - $this->session_info = $var; - - return $this; - } - - /** - * Value to append directly to - * [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads]. - * - * 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); - } - - /** - * Value to append directly to - * [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads]. - * - * 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; - } - - /** - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string target_page = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetPage() - { - return $this->readOneof(5); - } - - public function hasTargetPage() - { - return $this->hasOneof(5); - } - - /** - * The target page to transition to. - * Format: - * `projects//locations//agents//flows//pages/`. - * - * Generated from protobuf field string target_page = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetPage($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string target_flow = 6 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetFlow() - { - return $this->readOneof(6); - } - - public function hasTargetFlow() - { - return $this->hasOneof(6); - } - - /** - * The target flow to transition to. - * Format: - * `projects//locations//agents//flows/`. - * - * Generated from protobuf field string target_flow = 6 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetFlow($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getTransition() - { - return $this->whichOneof("transition"); - } - -} - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse.php deleted file mode 100644 index 7a7e6c859ded..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - */ -class FulfillmentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of rich message responses to present to the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; - */ - private $messages; - /** - * Merge behavior for `messages`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2; - */ - protected $merge_behavior = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $messages - * The list of rich message responses to present to the user. - * @type int $merge_behavior - * Merge behavior for `messages`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Webhook::initOnce(); - parent::__construct($data); - } - - /** - * The list of rich message responses to present to the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessages() - { - return $this->messages; - } - - /** - * The list of rich message responses to present to the user. - * - * Generated from protobuf field repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1; - * @param array<\Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\ResponseMessage::class); - $this->messages = $arr; - - return $this; - } - - /** - * Merge behavior for `messages`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2; - * @return int - */ - public function getMergeBehavior() - { - return $this->merge_behavior; - } - - /** - * Merge behavior for `messages`. - * - * Generated from protobuf field .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2; - * @param int $var - * @return $this - */ - public function setMergeBehavior($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse\FulfillmentResponse\MergeBehavior::class); - $this->merge_behavior = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FulfillmentResponse::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse_FulfillmentResponse::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse/MergeBehavior.php b/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse/MergeBehavior.php deleted file mode 100644 index 42da4fb710c2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/proto/src/Google/Cloud/Dialogflow/Cx/V3/WebhookResponse/FulfillmentResponse/MergeBehavior.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior - */ -class MergeBehavior -{ - /** - * Not specified. `APPEND` will be used. - * - * Generated from protobuf enum MERGE_BEHAVIOR_UNSPECIFIED = 0; - */ - const MERGE_BEHAVIOR_UNSPECIFIED = 0; - /** - * `messages` will be appended to the list of messages waiting to be sent - * to the user. - * - * Generated from protobuf enum APPEND = 1; - */ - const APPEND = 1; - /** - * `messages` will replace the list of messages waiting to be sent to the - * user. - * - * Generated from protobuf enum REPLACE = 2; - */ - const REPLACE = 2; - - private static $valueToName = [ - self::MERGE_BEHAVIOR_UNSPECIFIED => 'MERGE_BEHAVIOR_UNSPECIFIED', - self::APPEND => 'APPEND', - self::REPLACE => 'REPLACE', - ]; - - 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(MergeBehavior::class, \Google\Cloud\Dialogflow\Cx\V3\WebhookResponse_FulfillmentResponse_MergeBehavior::class); - diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/create_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/create_agent.php deleted file mode 100644 index a5719c3d9ab7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/create_agent.php +++ /dev/null @@ -1,99 +0,0 @@ -/locations/`. Please see - * {@see AgentsClient::locationName()} for help formatting this field. - * @param string $agentDisplayName The human-readable name of the agent, unique within the location. - * @param string $agentDefaultLanguageCode Immutable. The default language of the agent as a language tag. - * See [Language - * Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) - * for a list of the currently supported language codes. - * This field cannot be set by the - * [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] - * method. - * @param string $agentTimeZone The time zone of the agent from the [time zone - * database](https://www.iana.org/time-zones), e.g., America/New_York, - * Europe/Paris. - */ -function create_agent_sample( - string $formattedParent, - string $agentDisplayName, - string $agentDefaultLanguageCode, - string $agentTimeZone -): void { - // Create a client. - $agentsClient = new AgentsClient(); - - // Prepare the request message. - $agent = (new Agent()) - ->setDisplayName($agentDisplayName) - ->setDefaultLanguageCode($agentDefaultLanguageCode) - ->setTimeZone($agentTimeZone); - $request = (new CreateAgentRequest()) - ->setParent($formattedParent) - ->setAgent($agent); - - // Call the API and handle any network failures. - try { - /** @var Agent $response */ - $response = $agentsClient->createAgent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AgentsClient::locationName('[PROJECT]', '[LOCATION]'); - $agentDisplayName = '[DISPLAY_NAME]'; - $agentDefaultLanguageCode = '[DEFAULT_LANGUAGE_CODE]'; - $agentTimeZone = '[TIME_ZONE]'; - - create_agent_sample($formattedParent, $agentDisplayName, $agentDefaultLanguageCode, $agentTimeZone); -} -// [END dialogflow_v3_generated_Agents_CreateAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/delete_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/delete_agent.php deleted file mode 100644 index 87f972c5c240..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/delete_agent.php +++ /dev/null @@ -1,70 +0,0 @@ -/locations//agents/`. Please see - * {@see AgentsClient::agentName()} for help formatting this field. - */ -function delete_agent_sample(string $formattedName): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Prepare the request message. - $request = (new DeleteAgentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $agentsClient->deleteAgent($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AgentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - delete_agent_sample($formattedName); -} -// [END dialogflow_v3_generated_Agents_DeleteAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/export_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/export_agent.php deleted file mode 100644 index d46ce177ed87..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/export_agent.php +++ /dev/null @@ -1,93 +0,0 @@ -/locations//agents/`. Please see - * {@see AgentsClient::agentName()} for help formatting this field. - */ -function export_agent_sample(string $formattedName): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Prepare the request message. - $request = (new ExportAgentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $agentsClient->exportAgent($request); - $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 -{ - $formattedName = AgentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - export_agent_sample($formattedName); -} -// [END dialogflow_v3_generated_Agents_ExportAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent.php deleted file mode 100644 index 9d5ad409aa13..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent.php +++ /dev/null @@ -1,72 +0,0 @@ -/locations//agents/`. Please see - * {@see AgentsClient::agentName()} for help formatting this field. - */ -function get_agent_sample(string $formattedName): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Prepare the request message. - $request = (new GetAgentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Agent $response */ - $response = $agentsClient->getAgent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AgentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - get_agent_sample($formattedName); -} -// [END dialogflow_v3_generated_Agents_GetAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent_validation_result.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent_validation_result.php deleted file mode 100644 index 78c4bade1b39..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_agent_validation_result.php +++ /dev/null @@ -1,74 +0,0 @@ -/locations//agents//validationResult`. Please see - * {@see AgentsClient::agentValidationResultName()} for help formatting this field. - */ -function get_agent_validation_result_sample(string $formattedName): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Prepare the request message. - $request = (new GetAgentValidationResultRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AgentValidationResult $response */ - $response = $agentsClient->getAgentValidationResult($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AgentsClient::agentValidationResultName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - get_agent_validation_result_sample($formattedName); -} -// [END dialogflow_v3_generated_Agents_GetAgentValidationResult_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_generative_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_generative_settings.php deleted file mode 100644 index ff37e7650127..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_generative_settings.php +++ /dev/null @@ -1,75 +0,0 @@ -/locations//agents//generativeSettings`. Please see - * {@see AgentsClient::agentGenerativeSettingsName()} for help formatting this field. - * @param string $languageCode Language code of the generative settings. - */ -function get_generative_settings_sample(string $formattedName, string $languageCode): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Prepare the request message. - $request = (new GetGenerativeSettingsRequest()) - ->setName($formattedName) - ->setLanguageCode($languageCode); - - // Call the API and handle any network failures. - try { - /** @var GenerativeSettings $response */ - $response = $agentsClient->getGenerativeSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AgentsClient::agentGenerativeSettingsName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $languageCode = '[LANGUAGE_CODE]'; - - get_generative_settings_sample($formattedName, $languageCode); -} -// [END dialogflow_v3_generated_Agents_GetGenerativeSettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_location.php deleted file mode 100644 index f1711f0437c7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Agents_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_agents.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_agents.php deleted file mode 100644 index a4b9d1032d66..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_agents.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations/`. Please see - * {@see AgentsClient::locationName()} for help formatting this field. - */ -function list_agents_sample(string $formattedParent): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Prepare the request message. - $request = (new ListAgentsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $agentsClient->listAgents($request); - - /** @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::locationName('[PROJECT]', '[LOCATION]'); - - list_agents_sample($formattedParent); -} -// [END dialogflow_v3_generated_Agents_ListAgents_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_locations.php deleted file mode 100644 index d1e2c9cb7997..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Agents_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/restore_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/restore_agent.php deleted file mode 100644 index bcb6ac8f7b2e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/restore_agent.php +++ /dev/null @@ -1,97 +0,0 @@ -/locations//agents/`. Please see - * {@see AgentsClient::agentName()} for help formatting this field. - */ -function restore_agent_sample(string $formattedName): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Prepare the request message. - $request = (new RestoreAgentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $agentsClient->restoreAgent($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AgentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - restore_agent_sample($formattedName); -} -// [END dialogflow_v3_generated_Agents_RestoreAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_agent.php deleted file mode 100644 index 7c323deb68ba..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_agent.php +++ /dev/null @@ -1,93 +0,0 @@ -setDisplayName($agentDisplayName) - ->setDefaultLanguageCode($agentDefaultLanguageCode) - ->setTimeZone($agentTimeZone); - $request = (new UpdateAgentRequest()) - ->setAgent($agent); - - // Call the API and handle any network failures. - try { - /** @var Agent $response */ - $response = $agentsClient->updateAgent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $agentDisplayName = '[DISPLAY_NAME]'; - $agentDefaultLanguageCode = '[DEFAULT_LANGUAGE_CODE]'; - $agentTimeZone = '[TIME_ZONE]'; - - update_agent_sample($agentDisplayName, $agentDefaultLanguageCode, $agentTimeZone); -} -// [END dialogflow_v3_generated_Agents_UpdateAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_generative_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_generative_settings.php deleted file mode 100644 index 03c04a4efc50..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/update_generative_settings.php +++ /dev/null @@ -1,59 +0,0 @@ -setGenerativeSettings($generativeSettings); - - // Call the API and handle any network failures. - try { - /** @var GenerativeSettings $response */ - $response = $agentsClient->updateGenerativeSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Agents_UpdateGenerativeSettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/validate_agent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/validate_agent.php deleted file mode 100644 index c6853d24c5f3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/AgentsClient/validate_agent.php +++ /dev/null @@ -1,74 +0,0 @@ -/locations//agents/`. Please see - * {@see AgentsClient::agentName()} for help formatting this field. - */ -function validate_agent_sample(string $formattedName): void -{ - // Create a client. - $agentsClient = new AgentsClient(); - - // Prepare the request message. - $request = (new ValidateAgentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AgentValidationResult $response */ - $response = $agentsClient->validateAgent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AgentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - validate_agent_sample($formattedName); -} -// [END dialogflow_v3_generated_Agents_ValidateAgent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_changelog.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_changelog.php deleted file mode 100644 index deb70691311d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_changelog.php +++ /dev/null @@ -1,78 +0,0 @@ -/locations//agents//changelogs/`. Please see - * {@see ChangelogsClient::changelogName()} for help formatting this field. - */ -function get_changelog_sample(string $formattedName): void -{ - // Create a client. - $changelogsClient = new ChangelogsClient(); - - // Prepare the request message. - $request = (new GetChangelogRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Changelog $response */ - $response = $changelogsClient->getChangelog($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ChangelogsClient::changelogName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[CHANGELOG]' - ); - - get_changelog_sample($formattedName); -} -// [END dialogflow_v3_generated_Changelogs_GetChangelog_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_location.php deleted file mode 100644 index ba9dc294d4fc..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Changelogs_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_changelogs.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_changelogs.php deleted file mode 100644 index 33539c507dab..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_changelogs.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//agents/`. Please see - * {@see ChangelogsClient::agentName()} for help formatting this field. - */ -function list_changelogs_sample(string $formattedParent): void -{ - // Create a client. - $changelogsClient = new ChangelogsClient(); - - // Prepare the request message. - $request = (new ListChangelogsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $changelogsClient->listChangelogs($request); - - /** @var Changelog $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 = ChangelogsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - list_changelogs_sample($formattedParent); -} -// [END dialogflow_v3_generated_Changelogs_ListChangelogs_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_locations.php deleted file mode 100644 index ef4be5edd420..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ChangelogsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Changelogs_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_deployment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_deployment.php deleted file mode 100644 index 19f1e206b02d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_deployment.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//agents//environments//deployments/`. Please see - * {@see DeploymentsClient::deploymentName()} for help formatting this field. - */ -function get_deployment_sample(string $formattedName): void -{ - // Create a client. - $deploymentsClient = new DeploymentsClient(); - - // Prepare the request message. - $request = (new GetDeploymentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $deploymentsClient->getDeployment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DeploymentsClient::deploymentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]', - '[DEPLOYMENT]' - ); - - get_deployment_sample($formattedName); -} -// [END dialogflow_v3_generated_Deployments_GetDeployment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_location.php deleted file mode 100644 index 73722eb84a85..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Deployments_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_deployments.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_deployments.php deleted file mode 100644 index 41805186877e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_deployments.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//agents//environments/`. Please see - * {@see DeploymentsClient::environmentName()} for help formatting this field. - */ -function list_deployments_sample(string $formattedParent): void -{ - // Create a client. - $deploymentsClient = new DeploymentsClient(); - - // Prepare the request message. - $request = (new ListDeploymentsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $deploymentsClient->listDeployments($request); - - /** @var Deployment $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 = DeploymentsClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]' - ); - - list_deployments_sample($formattedParent); -} -// [END dialogflow_v3_generated_Deployments_ListDeployments_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_locations.php deleted file mode 100644 index 1730b2bdff62..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/DeploymentsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Deployments_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/create_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/create_entity_type.php deleted file mode 100644 index 9e9a280d795d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/create_entity_type.php +++ /dev/null @@ -1,89 +0,0 @@ -/locations//agents/`. Please see - * {@see EntityTypesClient::agentName()} for help formatting this field. - * @param string $entityTypeDisplayName The human-readable name of the entity type, unique within the - * agent. - * @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 the request message. - $entityType = (new EntityType()) - ->setDisplayName($entityTypeDisplayName) - ->setKind($entityTypeKind); - $request = (new CreateEntityTypeRequest()) - ->setParent($formattedParent) - ->setEntityType($entityType); - - // Call the API and handle any network failures. - try { - /** @var EntityType $response */ - $response = $entityTypesClient->createEntityType($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EntityTypesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $entityTypeDisplayName = '[DISPLAY_NAME]'; - $entityTypeKind = Kind::KIND_UNSPECIFIED; - - create_entity_type_sample($formattedParent, $entityTypeDisplayName, $entityTypeKind); -} -// [END dialogflow_v3_generated_EntityTypes_CreateEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/delete_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/delete_entity_type.php deleted file mode 100644 index a42d63aff203..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/delete_entity_type.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//agents//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(); - - // Prepare the request message. - $request = (new DeleteEntityTypeRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $entityTypesClient->deleteEntityType($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EntityTypesClient::entityTypeName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENTITY_TYPE]' - ); - - delete_entity_type_sample($formattedName); -} -// [END dialogflow_v3_generated_EntityTypes_DeleteEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/export_entity_types.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/export_entity_types.php deleted file mode 100644 index f7252bf3ed3c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/export_entity_types.php +++ /dev/null @@ -1,90 +0,0 @@ -/locations//agents/`. Please see - * {@see EntityTypesClient::agentName()} for help formatting this field. - * @param string $entityTypesElement The name of the entity types to export. - * Format: - * `projects//locations//agents//entityTypes/`. - */ -function export_entity_types_sample(string $formattedParent, string $entityTypesElement): void -{ - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Prepare the request message. - $entityTypes = [$entityTypesElement,]; - $request = (new ExportEntityTypesRequest()) - ->setParent($formattedParent) - ->setEntityTypes($entityTypes); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $entityTypesClient->exportEntityTypes($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportEntityTypesResponse $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]', '[LOCATION]', '[AGENT]'); - $entityTypesElement = '[ENTITY_TYPES]'; - - export_entity_types_sample($formattedParent, $entityTypesElement); -} -// [END dialogflow_v3_generated_EntityTypes_ExportEntityTypes_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_entity_type.php deleted file mode 100644 index f7315f7df88c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_entity_type.php +++ /dev/null @@ -1,78 +0,0 @@ -/locations//agents//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(); - - // Prepare the request message. - $request = (new GetEntityTypeRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var EntityType $response */ - $response = $entityTypesClient->getEntityType($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EntityTypesClient::entityTypeName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENTITY_TYPE]' - ); - - get_entity_type_sample($formattedName); -} -// [END dialogflow_v3_generated_EntityTypes_GetEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_location.php deleted file mode 100644 index c7aaa710c49a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_EntityTypes_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/import_entity_types.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/import_entity_types.php deleted file mode 100644 index 85fdd193c353..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/import_entity_types.php +++ /dev/null @@ -1,88 +0,0 @@ -/locations//agents/`. Please see - * {@see EntityTypesClient::agentName()} for help formatting this field. - * @param int $mergeOption Merge option for importing entity types. - */ -function import_entity_types_sample(string $formattedParent, int $mergeOption): void -{ - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Prepare the request message. - $request = (new ImportEntityTypesRequest()) - ->setParent($formattedParent) - ->setMergeOption($mergeOption); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $entityTypesClient->importEntityTypes($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportEntityTypesResponse $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]', '[LOCATION]', '[AGENT]'); - $mergeOption = MergeOption::MERGE_OPTION_UNSPECIFIED; - - import_entity_types_sample($formattedParent, $mergeOption); -} -// [END dialogflow_v3_generated_EntityTypes_ImportEntityTypes_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_entity_types.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_entity_types.php deleted file mode 100644 index 50f94f49582e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_entity_types.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//agents/`. Please see - * {@see EntityTypesClient::agentName()} for help formatting this field. - */ -function list_entity_types_sample(string $formattedParent): void -{ - // Create a client. - $entityTypesClient = new EntityTypesClient(); - - // Prepare the request message. - $request = (new ListEntityTypesRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $entityTypesClient->listEntityTypes($request); - - /** @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]', '[LOCATION]', '[AGENT]'); - - list_entity_types_sample($formattedParent); -} -// [END dialogflow_v3_generated_EntityTypes_ListEntityTypes_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_locations.php deleted file mode 100644 index 51f845bf873e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_EntityTypes_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/update_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/update_entity_type.php deleted file mode 100644 index 13ec57175934..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EntityTypesClient/update_entity_type.php +++ /dev/null @@ -1,81 +0,0 @@ -setDisplayName($entityTypeDisplayName) - ->setKind($entityTypeKind); - $request = (new UpdateEntityTypeRequest()) - ->setEntityType($entityType); - - // Call the API and handle any network failures. - try { - /** @var EntityType $response */ - $response = $entityTypesClient->updateEntityType($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $entityTypeDisplayName = '[DISPLAY_NAME]'; - $entityTypeKind = Kind::KIND_UNSPECIFIED; - - update_entity_type_sample($entityTypeDisplayName, $entityTypeKind); -} -// [END dialogflow_v3_generated_EntityTypes_UpdateEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/create_environment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/create_environment.php deleted file mode 100644 index 616eeac27bcd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/create_environment.php +++ /dev/null @@ -1,100 +0,0 @@ -/locations//agents/`. Please see - * {@see EnvironmentsClient::agentName()} for help formatting this field. - * @param string $environmentDisplayName The human-readable name of the environment (unique in an agent). - * Limit of 64 characters. - */ -function create_environment_sample(string $formattedParent, string $environmentDisplayName): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Prepare the request message. - $environment = (new Environment()) - ->setDisplayName($environmentDisplayName); - $request = (new CreateEnvironmentRequest()) - ->setParent($formattedParent) - ->setEnvironment($environment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $environmentsClient->createEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Environment $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 = EnvironmentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $environmentDisplayName = '[DISPLAY_NAME]'; - - create_environment_sample($formattedParent, $environmentDisplayName); -} -// [END dialogflow_v3_generated_Environments_CreateEnvironment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/delete_environment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/delete_environment.php deleted file mode 100644 index 77309bc5c28b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/delete_environment.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//agents//environments/`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - */ -function delete_environment_sample(string $formattedName): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Prepare the request message. - $request = (new DeleteEnvironmentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $environmentsClient->deleteEnvironment($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EnvironmentsClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]' - ); - - delete_environment_sample($formattedName); -} -// [END dialogflow_v3_generated_Environments_DeleteEnvironment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/deploy_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/deploy_flow.php deleted file mode 100644 index d98f06fc7fee..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/deploy_flow.php +++ /dev/null @@ -1,112 +0,0 @@ -/locations//agents//environments/`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - * @param string $formattedFlowVersion The flow version to deploy. - * Format: - * `projects//locations//agents//flows//versions/`. Please see - * {@see EnvironmentsClient::versionName()} for help formatting this field. - */ -function deploy_flow_sample(string $formattedEnvironment, string $formattedFlowVersion): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Prepare the request message. - $request = (new DeployFlowRequest()) - ->setEnvironment($formattedEnvironment) - ->setFlowVersion($formattedFlowVersion); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $environmentsClient->deployFlow($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DeployFlowResponse $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 -{ - $formattedEnvironment = EnvironmentsClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]' - ); - $formattedFlowVersion = EnvironmentsClient::versionName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]', - '[VERSION]' - ); - - deploy_flow_sample($formattedEnvironment, $formattedFlowVersion); -} -// [END dialogflow_v3_generated_Environments_DeployFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_environment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_environment.php deleted file mode 100644 index 7a81fc6979b5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_environment.php +++ /dev/null @@ -1,79 +0,0 @@ -/locations//agents//environments/`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - */ -function get_environment_sample(string $formattedName): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Prepare the request message. - $request = (new GetEnvironmentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Environment $response */ - $response = $environmentsClient->getEnvironment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EnvironmentsClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]' - ); - - get_environment_sample($formattedName); -} -// [END dialogflow_v3_generated_Environments_GetEnvironment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_location.php deleted file mode 100644 index 9ea8659b3ac5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Environments_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_continuous_test_results.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_continuous_test_results.php deleted file mode 100644 index 6cd9cb606e3d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_continuous_test_results.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations//agents//environments/`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - */ -function list_continuous_test_results_sample(string $formattedParent): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Prepare the request message. - $request = (new ListContinuousTestResultsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $environmentsClient->listContinuousTestResults($request); - - /** @var ContinuousTestResult $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]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]' - ); - - list_continuous_test_results_sample($formattedParent); -} -// [END dialogflow_v3_generated_Environments_ListContinuousTestResults_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_environments.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_environments.php deleted file mode 100644 index 2b198ce7d06b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_environments.php +++ /dev/null @@ -1,79 +0,0 @@ -/locations//agents/`. Please see - * {@see EnvironmentsClient::agentName()} for help formatting this field. - */ -function list_environments_sample(string $formattedParent): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Prepare the request message. - $request = (new ListEnvironmentsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $environmentsClient->listEnvironments($request); - - /** @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]', '[LOCATION]', '[AGENT]'); - - list_environments_sample($formattedParent); -} -// [END dialogflow_v3_generated_Environments_ListEnvironments_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_locations.php deleted file mode 100644 index 979561869d9a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Environments_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/lookup_environment_history.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/lookup_environment_history.php deleted file mode 100644 index df6a5d60b5c6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/lookup_environment_history.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//agents//environments/`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - */ -function lookup_environment_history_sample(string $formattedName): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Prepare the request message. - $request = (new LookupEnvironmentHistoryRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $environmentsClient->lookupEnvironmentHistory($request); - - /** @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 -{ - $formattedName = EnvironmentsClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]' - ); - - lookup_environment_history_sample($formattedName); -} -// [END dialogflow_v3_generated_Environments_LookupEnvironmentHistory_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/run_continuous_test.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/run_continuous_test.php deleted file mode 100644 index 2144257d9ebc..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/run_continuous_test.php +++ /dev/null @@ -1,99 +0,0 @@ -/locations//agents//environments/`. Please see - * {@see EnvironmentsClient::environmentName()} for help formatting this field. - */ -function run_continuous_test_sample(string $formattedEnvironment): void -{ - // Create a client. - $environmentsClient = new EnvironmentsClient(); - - // Prepare the request message. - $request = (new RunContinuousTestRequest()) - ->setEnvironment($formattedEnvironment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $environmentsClient->runContinuousTest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RunContinuousTestResponse $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 -{ - $formattedEnvironment = EnvironmentsClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]' - ); - - run_continuous_test_sample($formattedEnvironment); -} -// [END dialogflow_v3_generated_Environments_RunContinuousTest_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/update_environment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/update_environment.php deleted file mode 100644 index 5dda85b697fc..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/EnvironmentsClient/update_environment.php +++ /dev/null @@ -1,97 +0,0 @@ -setDisplayName($environmentDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateEnvironmentRequest()) - ->setEnvironment($environment) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $environmentsClient->updateEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Environment $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 -{ - $environmentDisplayName = '[DISPLAY_NAME]'; - - update_environment_sample($environmentDisplayName); -} -// [END dialogflow_v3_generated_Environments_UpdateEnvironment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/create_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/create_experiment.php deleted file mode 100644 index 2eb7ff14dd0f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/create_experiment.php +++ /dev/null @@ -1,85 +0,0 @@ -/locations//agents//environments/`. Please see - * {@see ExperimentsClient::environmentName()} for help formatting this field. - * @param string $experimentDisplayName The human-readable name of the experiment (unique in an - * environment). Limit of 64 characters. - */ -function create_experiment_sample(string $formattedParent, string $experimentDisplayName): void -{ - // Create a client. - $experimentsClient = new ExperimentsClient(); - - // Prepare the request message. - $experiment = (new Experiment()) - ->setDisplayName($experimentDisplayName); - $request = (new CreateExperimentRequest()) - ->setParent($formattedParent) - ->setExperiment($experiment); - - // Call the API and handle any network failures. - try { - /** @var Experiment $response */ - $response = $experimentsClient->createExperiment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ExperimentsClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]' - ); - $experimentDisplayName = '[DISPLAY_NAME]'; - - create_experiment_sample($formattedParent, $experimentDisplayName); -} -// [END dialogflow_v3_generated_Experiments_CreateExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/delete_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/delete_experiment.php deleted file mode 100644 index 5be5fa7ac008..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/delete_experiment.php +++ /dev/null @@ -1,78 +0,0 @@ -/locations//agents//environments//experiments/`. Please see - * {@see ExperimentsClient::experimentName()} for help formatting this field. - */ -function delete_experiment_sample(string $formattedName): void -{ - // Create a client. - $experimentsClient = new ExperimentsClient(); - - // Prepare the request message. - $request = (new DeleteExperimentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $experimentsClient->deleteExperiment($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExperimentsClient::experimentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]', - '[EXPERIMENT]' - ); - - delete_experiment_sample($formattedName); -} -// [END dialogflow_v3_generated_Experiments_DeleteExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_experiment.php deleted file mode 100644 index 0d2927a34abd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_experiment.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//agents//environments//experiments/`. Please see - * {@see ExperimentsClient::experimentName()} for help formatting this field. - */ -function get_experiment_sample(string $formattedName): void -{ - // Create a client. - $experimentsClient = new ExperimentsClient(); - - // Prepare the request message. - $request = (new GetExperimentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Experiment $response */ - $response = $experimentsClient->getExperiment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExperimentsClient::experimentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]', - '[EXPERIMENT]' - ); - - get_experiment_sample($formattedName); -} -// [END dialogflow_v3_generated_Experiments_GetExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_location.php deleted file mode 100644 index 87944cddd970..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Experiments_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_experiments.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_experiments.php deleted file mode 100644 index 258a97f31ef5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_experiments.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//agents//environments/`. Please see - * {@see ExperimentsClient::environmentName()} for help formatting this field. - */ -function list_experiments_sample(string $formattedParent): void -{ - // Create a client. - $experimentsClient = new ExperimentsClient(); - - // Prepare the request message. - $request = (new ListExperimentsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $experimentsClient->listExperiments($request); - - /** @var Experiment $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 = ExperimentsClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]' - ); - - list_experiments_sample($formattedParent); -} -// [END dialogflow_v3_generated_Experiments_ListExperiments_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_locations.php deleted file mode 100644 index a858818001da..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Experiments_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/start_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/start_experiment.php deleted file mode 100644 index ecda4fdb5fc2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/start_experiment.php +++ /dev/null @@ -1,81 +0,0 @@ -/locations//agents//environments//experiments/`. Please see - * {@see ExperimentsClient::experimentName()} for help formatting this field. - */ -function start_experiment_sample(string $formattedName): void -{ - // Create a client. - $experimentsClient = new ExperimentsClient(); - - // Prepare the request message. - $request = (new StartExperimentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Experiment $response */ - $response = $experimentsClient->startExperiment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExperimentsClient::experimentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]', - '[EXPERIMENT]' - ); - - start_experiment_sample($formattedName); -} -// [END dialogflow_v3_generated_Experiments_StartExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/stop_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/stop_experiment.php deleted file mode 100644 index 61af435b22a8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/stop_experiment.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//agents//environments//experiments/`. Please see - * {@see ExperimentsClient::experimentName()} for help formatting this field. - */ -function stop_experiment_sample(string $formattedName): void -{ - // Create a client. - $experimentsClient = new ExperimentsClient(); - - // Prepare the request message. - $request = (new StopExperimentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Experiment $response */ - $response = $experimentsClient->stopExperiment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExperimentsClient::experimentName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[ENVIRONMENT]', - '[EXPERIMENT]' - ); - - stop_experiment_sample($formattedName); -} -// [END dialogflow_v3_generated_Experiments_StopExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/update_experiment.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/update_experiment.php deleted file mode 100644 index b51ee0e62573..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/ExperimentsClient/update_experiment.php +++ /dev/null @@ -1,77 +0,0 @@ -setDisplayName($experimentDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateExperimentRequest()) - ->setExperiment($experiment) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Experiment $response */ - $response = $experimentsClient->updateExperiment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $experimentDisplayName = '[DISPLAY_NAME]'; - - update_experiment_sample($experimentDisplayName); -} -// [END dialogflow_v3_generated_Experiments_UpdateExperiment_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/create_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/create_flow.php deleted file mode 100644 index cb38305fde0c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/create_flow.php +++ /dev/null @@ -1,81 +0,0 @@ -/locations//agents/`. Please see - * {@see FlowsClient::agentName()} for help formatting this field. - * @param string $flowDisplayName The human-readable name of the flow. - */ -function create_flow_sample(string $formattedParent, string $flowDisplayName): void -{ - // Create a client. - $flowsClient = new FlowsClient(); - - // Prepare the request message. - $flow = (new Flow()) - ->setDisplayName($flowDisplayName); - $request = (new CreateFlowRequest()) - ->setParent($formattedParent) - ->setFlow($flow); - - // Call the API and handle any network failures. - try { - /** @var Flow $response */ - $response = $flowsClient->createFlow($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FlowsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $flowDisplayName = '[DISPLAY_NAME]'; - - create_flow_sample($formattedParent, $flowDisplayName); -} -// [END dialogflow_v3_generated_Flows_CreateFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/delete_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/delete_flow.php deleted file mode 100644 index 263ab2e067e4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/delete_flow.php +++ /dev/null @@ -1,71 +0,0 @@ -/locations//agents//flows/`. Please see - * {@see FlowsClient::flowName()} for help formatting this field. - */ -function delete_flow_sample(string $formattedName): void -{ - // Create a client. - $flowsClient = new FlowsClient(); - - // Prepare the request message. - $request = (new DeleteFlowRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $flowsClient->deleteFlow($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FlowsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - - delete_flow_sample($formattedName); -} -// [END dialogflow_v3_generated_Flows_DeleteFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/export_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/export_flow.php deleted file mode 100644 index dc9d790da79e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/export_flow.php +++ /dev/null @@ -1,97 +0,0 @@ -/locations//agents//flows/`. Please see - * {@see FlowsClient::flowName()} for help formatting this field. - */ -function export_flow_sample(string $formattedName): void -{ - // Create a client. - $flowsClient = new FlowsClient(); - - // Prepare the request message. - $request = (new ExportFlowRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $flowsClient->exportFlow($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportFlowResponse $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 = FlowsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - - export_flow_sample($formattedName); -} -// [END dialogflow_v3_generated_Flows_ExportFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow.php deleted file mode 100644 index 83f04a23d156..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations//agents//flows/`. Please see - * {@see FlowsClient::flowName()} for help formatting this field. - */ -function get_flow_sample(string $formattedName): void -{ - // Create a client. - $flowsClient = new FlowsClient(); - - // Prepare the request message. - $request = (new GetFlowRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Flow $response */ - $response = $flowsClient->getFlow($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FlowsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - - get_flow_sample($formattedName); -} -// [END dialogflow_v3_generated_Flows_GetFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow_validation_result.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow_validation_result.php deleted file mode 100644 index ed938bd9134f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_flow_validation_result.php +++ /dev/null @@ -1,79 +0,0 @@ -/locations//agents//flows//validationResult`. Please see - * {@see FlowsClient::flowValidationResultName()} for help formatting this field. - */ -function get_flow_validation_result_sample(string $formattedName): void -{ - // Create a client. - $flowsClient = new FlowsClient(); - - // Prepare the request message. - $request = (new GetFlowValidationResultRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var FlowValidationResult $response */ - $response = $flowsClient->getFlowValidationResult($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FlowsClient::flowValidationResultName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]' - ); - - get_flow_validation_result_sample($formattedName); -} -// [END dialogflow_v3_generated_Flows_GetFlowValidationResult_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_location.php deleted file mode 100644 index 30973a52c786..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Flows_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/import_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/import_flow.php deleted file mode 100644 index d7e5bcd46f3a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/import_flow.php +++ /dev/null @@ -1,97 +0,0 @@ -/locations//agents/`. Please see - * {@see FlowsClient::agentName()} for help formatting this field. - */ -function import_flow_sample(string $formattedParent): void -{ - // Create a client. - $flowsClient = new FlowsClient(); - - // Prepare the request message. - $request = (new ImportFlowRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $flowsClient->importFlow($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportFlowResponse $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 = FlowsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - import_flow_sample($formattedParent); -} -// [END dialogflow_v3_generated_Flows_ImportFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_flows.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_flows.php deleted file mode 100644 index 73cfac5312f6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_flows.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//agents/`. Please see - * {@see FlowsClient::agentName()} for help formatting this field. - */ -function list_flows_sample(string $formattedParent): void -{ - // Create a client. - $flowsClient = new FlowsClient(); - - // Prepare the request message. - $request = (new ListFlowsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $flowsClient->listFlows($request); - - /** @var Flow $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 = FlowsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - list_flows_sample($formattedParent); -} -// [END dialogflow_v3_generated_Flows_ListFlows_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_locations.php deleted file mode 100644 index 12e680793a4a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Flows_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/train_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/train_flow.php deleted file mode 100644 index 1cc7b4865b5d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/train_flow.php +++ /dev/null @@ -1,96 +0,0 @@ -/locations//agents//flows/`. Please see - * {@see FlowsClient::flowName()} for help formatting this field. - */ -function train_flow_sample(string $formattedName): void -{ - // Create a client. - $flowsClient = new FlowsClient(); - - // Prepare the request message. - $request = (new TrainFlowRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $flowsClient->trainFlow($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FlowsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - - train_flow_sample($formattedName); -} -// [END dialogflow_v3_generated_Flows_TrainFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/update_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/update_flow.php deleted file mode 100644 index 189213f83483..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/update_flow.php +++ /dev/null @@ -1,76 +0,0 @@ -setDisplayName($flowDisplayName); - $request = (new UpdateFlowRequest()) - ->setFlow($flow); - - // Call the API and handle any network failures. - try { - /** @var Flow $response */ - $response = $flowsClient->updateFlow($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $flowDisplayName = '[DISPLAY_NAME]'; - - update_flow_sample($flowDisplayName); -} -// [END dialogflow_v3_generated_Flows_UpdateFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/validate_flow.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/validate_flow.php deleted file mode 100644 index 72dfcfc25b03..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/FlowsClient/validate_flow.php +++ /dev/null @@ -1,75 +0,0 @@ -/locations//agents//flows/`. Please see - * {@see FlowsClient::flowName()} for help formatting this field. - */ -function validate_flow_sample(string $formattedName): void -{ - // Create a client. - $flowsClient = new FlowsClient(); - - // Prepare the request message. - $request = (new ValidateFlowRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var FlowValidationResult $response */ - $response = $flowsClient->validateFlow($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FlowsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - - validate_flow_sample($formattedName); -} -// [END dialogflow_v3_generated_Flows_ValidateFlow_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/create_generator.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/create_generator.php deleted file mode 100644 index 5c0d6c2ef96d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/create_generator.php +++ /dev/null @@ -1,89 +0,0 @@ -/locations//agents/`. Please see - * {@see GeneratorsClient::agentName()} for help formatting this field. - * @param string $generatorDisplayName The human-readable name of the generator, unique within the - * agent. The prompt contains pre-defined parameters such as $conversation, - * $last-user-utterance, etc. populated by Dialogflow. It can also contain - * custom placeholders which will be resolved during fulfillment. - * @param string $generatorPromptTextText Text input which can be used for prompt or banned phrases. - */ -function create_generator_sample( - string $formattedParent, - string $generatorDisplayName, - string $generatorPromptTextText -): void { - // Create a client. - $generatorsClient = new GeneratorsClient(); - - // Prepare the request message. - $generatorPromptText = (new Phrase()) - ->setText($generatorPromptTextText); - $generator = (new Generator()) - ->setDisplayName($generatorDisplayName) - ->setPromptText($generatorPromptText); - $request = (new CreateGeneratorRequest()) - ->setParent($formattedParent) - ->setGenerator($generator); - - // Call the API and handle any network failures. - try { - /** @var Generator $response */ - $response = $generatorsClient->createGenerator($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GeneratorsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $generatorDisplayName = '[DISPLAY_NAME]'; - $generatorPromptTextText = '[TEXT]'; - - create_generator_sample($formattedParent, $generatorDisplayName, $generatorPromptTextText); -} -// [END dialogflow_v3_generated_Generators_CreateGenerator_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/delete_generator.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/delete_generator.php deleted file mode 100644 index 32f9ea673e67..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/delete_generator.php +++ /dev/null @@ -1,76 +0,0 @@ -/locations//agents//generators/`. Please see - * {@see GeneratorsClient::generatorName()} for help formatting this field. - */ -function delete_generator_sample(string $formattedName): void -{ - // Create a client. - $generatorsClient = new GeneratorsClient(); - - // Prepare the request message. - $request = (new DeleteGeneratorRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $generatorsClient->deleteGenerator($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GeneratorsClient::generatorName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[GENERATOR]' - ); - - delete_generator_sample($formattedName); -} -// [END dialogflow_v3_generated_Generators_DeleteGenerator_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_generator.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_generator.php deleted file mode 100644 index cc2585e8cb91..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_generator.php +++ /dev/null @@ -1,78 +0,0 @@ -/locations//agents//generators/`. Please see - * {@see GeneratorsClient::generatorName()} for help formatting this field. - */ -function get_generator_sample(string $formattedName): void -{ - // Create a client. - $generatorsClient = new GeneratorsClient(); - - // Prepare the request message. - $request = (new GetGeneratorRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Generator $response */ - $response = $generatorsClient->getGenerator($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GeneratorsClient::generatorName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[GENERATOR]' - ); - - get_generator_sample($formattedName); -} -// [END dialogflow_v3_generated_Generators_GetGenerator_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_location.php deleted file mode 100644 index 7670c9eca2b4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Generators_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_generators.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_generators.php deleted file mode 100644 index 287d35f8e48b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_generators.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//agents/`. Please see - * {@see GeneratorsClient::agentName()} for help formatting this field. - */ -function list_generators_sample(string $formattedParent): void -{ - // Create a client. - $generatorsClient = new GeneratorsClient(); - - // Prepare the request message. - $request = (new ListGeneratorsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $generatorsClient->listGenerators($request); - - /** @var Generator $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 = GeneratorsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - list_generators_sample($formattedParent); -} -// [END dialogflow_v3_generated_Generators_ListGenerators_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_locations.php deleted file mode 100644 index 69b42e4a6c95..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Generators_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/update_generator.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/update_generator.php deleted file mode 100644 index 0ba8aec91d5e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/GeneratorsClient/update_generator.php +++ /dev/null @@ -1,83 +0,0 @@ -setText($generatorPromptTextText); - $generator = (new Generator()) - ->setDisplayName($generatorDisplayName) - ->setPromptText($generatorPromptText); - $request = (new UpdateGeneratorRequest()) - ->setGenerator($generator); - - // Call the API and handle any network failures. - try { - /** @var Generator $response */ - $response = $generatorsClient->updateGenerator($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $generatorDisplayName = '[DISPLAY_NAME]'; - $generatorPromptTextText = '[TEXT]'; - - update_generator_sample($generatorDisplayName, $generatorPromptTextText); -} -// [END dialogflow_v3_generated_Generators_UpdateGenerator_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/create_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/create_intent.php deleted file mode 100644 index 19c188c3c8d3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/create_intent.php +++ /dev/null @@ -1,81 +0,0 @@ -/locations//agents/`. Please see - * {@see IntentsClient::agentName()} for help formatting this field. - * @param string $intentDisplayName The human-readable name of the intent, unique within the agent. - */ -function create_intent_sample(string $formattedParent, string $intentDisplayName): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Prepare the request message. - $intent = (new Intent()) - ->setDisplayName($intentDisplayName); - $request = (new CreateIntentRequest()) - ->setParent($formattedParent) - ->setIntent($intent); - - // Call the API and handle any network failures. - try { - /** @var Intent $response */ - $response = $intentsClient->createIntent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = IntentsClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $intentDisplayName = '[DISPLAY_NAME]'; - - create_intent_sample($formattedParent, $intentDisplayName); -} -// [END dialogflow_v3_generated_Intents_CreateIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/delete_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/delete_intent.php deleted file mode 100644 index 1d5345701cd8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/delete_intent.php +++ /dev/null @@ -1,75 +0,0 @@ -/locations//agents//intents/`. Please see - * {@see IntentsClient::intentName()} for help formatting this field. - */ -function delete_intent_sample(string $formattedName): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Prepare the request message. - $request = (new DeleteIntentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $intentsClient->deleteIntent($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = IntentsClient::intentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[INTENT]'); - - delete_intent_sample($formattedName); -} -// [END dialogflow_v3_generated_Intents_DeleteIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/export_intents.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/export_intents.php deleted file mode 100644 index 60a983d6690b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/export_intents.php +++ /dev/null @@ -1,99 +0,0 @@ -/locations//agents/`. Please see - * {@see IntentsClient::agentName()} for help formatting this field. - * @param string $intentsElement The name of the intents to export. - * Format: - * `projects//locations//agents//intents/`. - */ -function export_intents_sample(string $formattedParent, string $intentsElement): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Prepare the request message. - $intents = [$intentsElement,]; - $request = (new ExportIntentsRequest()) - ->setParent($formattedParent) - ->setIntents($intents); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $intentsClient->exportIntents($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportIntentsResponse $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]', '[LOCATION]', '[AGENT]'); - $intentsElement = '[INTENTS]'; - - export_intents_sample($formattedParent, $intentsElement); -} -// [END dialogflow_v3_generated_Intents_ExportIntents_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_intent.php deleted file mode 100644 index 1aa991aabfc9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_intent.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations//agents//intents/`. Please see - * {@see IntentsClient::intentName()} for help formatting this field. - */ -function get_intent_sample(string $formattedName): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Prepare the request message. - $request = (new GetIntentRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Intent $response */ - $response = $intentsClient->getIntent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = IntentsClient::intentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[INTENT]'); - - get_intent_sample($formattedName); -} -// [END dialogflow_v3_generated_Intents_GetIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_location.php deleted file mode 100644 index eef330a3cd70..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Intents_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/import_intents.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/import_intents.php deleted file mode 100644 index 2741b8bed542..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/import_intents.php +++ /dev/null @@ -1,93 +0,0 @@ -/locations//agents/`. Please see - * {@see IntentsClient::agentName()} for help formatting this field. - */ -function import_intents_sample(string $formattedParent): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Prepare the request message. - $request = (new ImportIntentsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $intentsClient->importIntents($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportIntentsResponse $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]', '[LOCATION]', '[AGENT]'); - - import_intents_sample($formattedParent); -} -// [END dialogflow_v3_generated_Intents_ImportIntents_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_intents.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_intents.php deleted file mode 100644 index 38d890c213c5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_intents.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//agents/`. Please see - * {@see IntentsClient::agentName()} for help formatting this field. - */ -function list_intents_sample(string $formattedParent): void -{ - // Create a client. - $intentsClient = new IntentsClient(); - - // Prepare the request message. - $request = (new ListIntentsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $intentsClient->listIntents($request); - - /** @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]', '[LOCATION]', '[AGENT]'); - - list_intents_sample($formattedParent); -} -// [END dialogflow_v3_generated_Intents_ListIntents_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_locations.php deleted file mode 100644 index 80403b5b125a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Intents_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/update_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/update_intent.php deleted file mode 100644 index d854dfbba341..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/IntentsClient/update_intent.php +++ /dev/null @@ -1,76 +0,0 @@ -setDisplayName($intentDisplayName); - $request = (new UpdateIntentRequest()) - ->setIntent($intent); - - // Call the API and handle any network failures. - try { - /** @var Intent $response */ - $response = $intentsClient->updateIntent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $intentDisplayName = '[DISPLAY_NAME]'; - - update_intent_sample($intentDisplayName); -} -// [END dialogflow_v3_generated_Intents_UpdateIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/create_page.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/create_page.php deleted file mode 100644 index c3c2844aaad0..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/create_page.php +++ /dev/null @@ -1,82 +0,0 @@ -/locations//agents//flows/`. Please see - * {@see PagesClient::flowName()} for help formatting this field. - * @param string $pageDisplayName The human-readable name of the page, unique within the flow. - */ -function create_page_sample(string $formattedParent, string $pageDisplayName): void -{ - // Create a client. - $pagesClient = new PagesClient(); - - // Prepare the request message. - $page = (new Page()) - ->setDisplayName($pageDisplayName); - $request = (new CreatePageRequest()) - ->setParent($formattedParent) - ->setPage($page); - - // Call the API and handle any network failures. - try { - /** @var Page $response */ - $response = $pagesClient->createPage($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = PagesClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $pageDisplayName = '[DISPLAY_NAME]'; - - create_page_sample($formattedParent, $pageDisplayName); -} -// [END dialogflow_v3_generated_Pages_CreatePage_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/delete_page.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/delete_page.php deleted file mode 100644 index 1019f7b7689c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/delete_page.php +++ /dev/null @@ -1,75 +0,0 @@ -/locations//agents//Flows//pages/`. Please see - * {@see PagesClient::pageName()} for help formatting this field. - */ -function delete_page_sample(string $formattedName): void -{ - // Create a client. - $pagesClient = new PagesClient(); - - // Prepare the request message. - $request = (new DeletePageRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $pagesClient->deletePage($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = PagesClient::pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); - - delete_page_sample($formattedName); -} -// [END dialogflow_v3_generated_Pages_DeletePage_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_location.php deleted file mode 100644 index 5f048afd84aa..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Pages_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_page.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_page.php deleted file mode 100644 index dea01097dc18..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/get_page.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations//agents//flows//pages/`. Please see - * {@see PagesClient::pageName()} for help formatting this field. - */ -function get_page_sample(string $formattedName): void -{ - // Create a client. - $pagesClient = new PagesClient(); - - // Prepare the request message. - $request = (new GetPageRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Page $response */ - $response = $pagesClient->getPage($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = PagesClient::pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); - - get_page_sample($formattedName); -} -// [END dialogflow_v3_generated_Pages_GetPage_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_locations.php deleted file mode 100644 index aca37f26d631..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Pages_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_pages.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_pages.php deleted file mode 100644 index 540cf5b1ac96..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/list_pages.php +++ /dev/null @@ -1,78 +0,0 @@ -/locations//agents//flows/`. Please see - * {@see PagesClient::flowName()} for help formatting this field. - */ -function list_pages_sample(string $formattedParent): void -{ - // Create a client. - $pagesClient = new PagesClient(); - - // Prepare the request message. - $request = (new ListPagesRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $pagesClient->listPages($request); - - /** @var Page $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 = PagesClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - - list_pages_sample($formattedParent); -} -// [END dialogflow_v3_generated_Pages_ListPages_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/update_page.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/update_page.php deleted file mode 100644 index 47d7addc03e2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/PagesClient/update_page.php +++ /dev/null @@ -1,76 +0,0 @@ -setDisplayName($pageDisplayName); - $request = (new UpdatePageRequest()) - ->setPage($page); - - // Call the API and handle any network failures. - try { - /** @var Page $response */ - $response = $pagesClient->updatePage($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $pageDisplayName = '[DISPLAY_NAME]'; - - update_page_sample($pageDisplayName); -} -// [END dialogflow_v3_generated_Pages_UpdatePage_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/create_security_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/create_security_settings.php deleted file mode 100644 index ae0a1d85db07..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/create_security_settings.php +++ /dev/null @@ -1,81 +0,0 @@ -/locations/`. Please see - * {@see SecuritySettingsServiceClient::locationName()} for help formatting this field. - * @param string $securitySettingsDisplayName The human-readable name of the security settings, unique within - * the location. - */ -function create_security_settings_sample( - string $formattedParent, - string $securitySettingsDisplayName -): void { - // Create a client. - $securitySettingsServiceClient = new SecuritySettingsServiceClient(); - - // Prepare the request message. - $securitySettings = (new SecuritySettings()) - ->setDisplayName($securitySettingsDisplayName); - $request = (new CreateSecuritySettingsRequest()) - ->setParent($formattedParent) - ->setSecuritySettings($securitySettings); - - // Call the API and handle any network failures. - try { - /** @var SecuritySettings $response */ - $response = $securitySettingsServiceClient->createSecuritySettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecuritySettingsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $securitySettingsDisplayName = '[DISPLAY_NAME]'; - - create_security_settings_sample($formattedParent, $securitySettingsDisplayName); -} -// [END dialogflow_v3_generated_SecuritySettingsService_CreateSecuritySettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/delete_security_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/delete_security_settings.php deleted file mode 100644 index 2c8af1a9da06..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/delete_security_settings.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//securitySettings/`. Please see - * {@see SecuritySettingsServiceClient::securitySettingsName()} for help formatting this field. - */ -function delete_security_settings_sample(string $formattedName): void -{ - // Create a client. - $securitySettingsServiceClient = new SecuritySettingsServiceClient(); - - // Prepare the request message. - $request = (new DeleteSecuritySettingsRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $securitySettingsServiceClient->deleteSecuritySettings($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecuritySettingsServiceClient::securitySettingsName( - '[PROJECT]', - '[LOCATION]', - '[SECURITY_SETTINGS]' - ); - - delete_security_settings_sample($formattedName); -} -// [END dialogflow_v3_generated_SecuritySettingsService_DeleteSecuritySettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_location.php deleted file mode 100644 index 5abaeb210a8c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_SecuritySettingsService_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_security_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_security_settings.php deleted file mode 100644 index 891ad5aa88f9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/get_security_settings.php +++ /dev/null @@ -1,79 +0,0 @@ -/locations//securitySettings/`. Please see - * {@see SecuritySettingsServiceClient::securitySettingsName()} for help formatting this field. - */ -function get_security_settings_sample(string $formattedName): void -{ - // Create a client. - $securitySettingsServiceClient = new SecuritySettingsServiceClient(); - - // Prepare the request message. - $request = (new GetSecuritySettingsRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SecuritySettings $response */ - $response = $securitySettingsServiceClient->getSecuritySettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecuritySettingsServiceClient::securitySettingsName( - '[PROJECT]', - '[LOCATION]', - '[SECURITY_SETTINGS]' - ); - - get_security_settings_sample($formattedName); -} -// [END dialogflow_v3_generated_SecuritySettingsService_GetSecuritySettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_locations.php deleted file mode 100644 index 49baa373b75c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_SecuritySettingsService_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_security_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_security_settings.php deleted file mode 100644 index 8aa89b032a3f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/list_security_settings.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations/`. Please see - * {@see SecuritySettingsServiceClient::locationName()} for help formatting this field. - */ -function list_security_settings_sample(string $formattedParent): void -{ - // Create a client. - $securitySettingsServiceClient = new SecuritySettingsServiceClient(); - - // Prepare the request message. - $request = (new ListSecuritySettingsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $securitySettingsServiceClient->listSecuritySettings($request); - - /** @var SecuritySettings $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 = SecuritySettingsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_security_settings_sample($formattedParent); -} -// [END dialogflow_v3_generated_SecuritySettingsService_ListSecuritySettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/update_security_settings.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/update_security_settings.php deleted file mode 100644 index dbf1e2303656..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SecuritySettingsServiceClient/update_security_settings.php +++ /dev/null @@ -1,77 +0,0 @@ -setDisplayName($securitySettingsDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateSecuritySettingsRequest()) - ->setSecuritySettings($securitySettings) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var SecuritySettings $response */ - $response = $securitySettingsServiceClient->updateSecuritySettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $securitySettingsDisplayName = '[DISPLAY_NAME]'; - - update_security_settings_sample($securitySettingsDisplayName); -} -// [END dialogflow_v3_generated_SecuritySettingsService_UpdateSecuritySettings_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/create_session_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/create_session_entity_type.php deleted file mode 100644 index 2dff06924af5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/create_session_entity_type.php +++ /dev/null @@ -1,137 +0,0 @@ -/locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. Please see - * {@see SessionEntityTypesClient::sessionName()} for help formatting this field. - * @param string $sessionEntityTypeName The unique identifier of the session entity type. - * Format: - * `projects//locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * @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 canonical 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 the request message. - $sessionEntityTypeEntitiesSynonyms = [$sessionEntityTypeEntitiesSynonymsElement,]; - $entity = (new Entity()) - ->setValue($sessionEntityTypeEntitiesValue) - ->setSynonyms($sessionEntityTypeEntitiesSynonyms); - $sessionEntityTypeEntities = [$entity,]; - $sessionEntityType = (new SessionEntityType()) - ->setName($sessionEntityTypeName) - ->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode) - ->setEntities($sessionEntityTypeEntities); - $request = (new CreateSessionEntityTypeRequest()) - ->setParent($formattedParent) - ->setSessionEntityType($sessionEntityType); - - // Call the API and handle any network failures. - try { - /** @var SessionEntityType $response */ - $response = $sessionEntityTypesClient->createSessionEntityType($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SessionEntityTypesClient::sessionName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[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_v3_generated_SessionEntityTypes_CreateSessionEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/delete_session_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/delete_session_entity_type.php deleted file mode 100644 index 43921d6abe63..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/delete_session_entity_type.php +++ /dev/null @@ -1,81 +0,0 @@ -/locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, - * we assume default 'draft' environment. 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(); - - // Prepare the request message. - $request = (new DeleteSessionEntityTypeRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $sessionEntityTypesClient->deleteSessionEntityType($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SessionEntityTypesClient::sessionEntityTypeName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[SESSION]', - '[ENTITY_TYPE]' - ); - - delete_session_entity_type_sample($formattedName); -} -// [END dialogflow_v3_generated_SessionEntityTypes_DeleteSessionEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_location.php deleted file mode 100644 index bdbf48bbfc64..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_SessionEntityTypes_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_session_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_session_entity_type.php deleted file mode 100644 index 87d74a006482..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/get_session_entity_type.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. 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(); - - // Prepare the request message. - $request = (new GetSessionEntityTypeRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SessionEntityType $response */ - $response = $sessionEntityTypesClient->getSessionEntityType($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SessionEntityTypesClient::sessionEntityTypeName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[SESSION]', - '[ENTITY_TYPE]' - ); - - get_session_entity_type_sample($formattedName); -} -// [END dialogflow_v3_generated_SessionEntityTypes_GetSessionEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_locations.php deleted file mode 100644 index 015952eb0041..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_SessionEntityTypes_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_session_entity_types.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_session_entity_types.php deleted file mode 100644 index 10263350372d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/list_session_entity_types.php +++ /dev/null @@ -1,87 +0,0 @@ -/locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. 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(); - - // Prepare the request message. - $request = (new ListSessionEntityTypesRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $sessionEntityTypesClient->listSessionEntityTypes($request); - - /** @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]', - '[LOCATION]', - '[AGENT]', - '[SESSION]' - ); - - list_session_entity_types_sample($formattedParent); -} -// [END dialogflow_v3_generated_SessionEntityTypes_ListSessionEntityTypes_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/update_session_entity_type.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/update_session_entity_type.php deleted file mode 100644 index 8a1e5fc67ab2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionEntityTypesClient/update_session_entity_type.php +++ /dev/null @@ -1,120 +0,0 @@ -/locations//agents//sessions//entityTypes/` - * or - * `projects//locations//agents//environments//sessions//entityTypes/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * @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 canonical 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 the request message. - $sessionEntityTypeEntitiesSynonyms = [$sessionEntityTypeEntitiesSynonymsElement,]; - $entity = (new Entity()) - ->setValue($sessionEntityTypeEntitiesValue) - ->setSynonyms($sessionEntityTypeEntitiesSynonyms); - $sessionEntityTypeEntities = [$entity,]; - $sessionEntityType = (new SessionEntityType()) - ->setName($sessionEntityTypeName) - ->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode) - ->setEntities($sessionEntityTypeEntities); - $request = (new UpdateSessionEntityTypeRequest()) - ->setSessionEntityType($sessionEntityType); - - // Call the API and handle any network failures. - try { - /** @var SessionEntityType $response */ - $response = $sessionEntityTypesClient->updateSessionEntityType($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $sessionEntityTypeName = '[NAME]'; - $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; - $sessionEntityTypeEntitiesValue = '[VALUE]'; - $sessionEntityTypeEntitiesSynonymsElement = '[SYNONYMS]'; - - update_session_entity_type_sample( - $sessionEntityTypeName, - $sessionEntityTypeEntityOverrideMode, - $sessionEntityTypeEntitiesValue, - $sessionEntityTypeEntitiesSynonymsElement - ); -} -// [END dialogflow_v3_generated_SessionEntityTypes_UpdateSessionEntityType_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/detect_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/detect_intent.php deleted file mode 100644 index 864a08774522..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/detect_intent.php +++ /dev/null @@ -1,103 +0,0 @@ -/locations//agents//sessions/` or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). Please see - * {@see SessionsClient::sessionName()} for help formatting this field. - * @param string $queryInputLanguageCode The language of the input. See [Language - * Support](https://cloud.google.com/dialogflow/cx/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. - */ -function detect_intent_sample(string $formattedSession, string $queryInputLanguageCode): void -{ - // Create a client. - $sessionsClient = new SessionsClient(); - - // Prepare the request message. - $queryInput = (new QueryInput()) - ->setLanguageCode($queryInputLanguageCode); - $request = (new DetectIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - - // Call the API and handle any network failures. - try { - /** @var DetectIntentResponse $response */ - $response = $sessionsClient->detectIntent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedSession = SessionsClient::sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $queryInputLanguageCode = '[LANGUAGE_CODE]'; - - detect_intent_sample($formattedSession, $queryInputLanguageCode); -} -// [END dialogflow_v3_generated_Sessions_DetectIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/fulfill_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/fulfill_intent.php deleted file mode 100644 index bbeeec263b85..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/fulfill_intent.php +++ /dev/null @@ -1,63 +0,0 @@ -fulfillIntent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Sessions_FulfillIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/get_location.php deleted file mode 100644 index 9b2d2236e474..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Sessions_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/list_locations.php deleted file mode 100644 index 73d0e88f3ecc..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Sessions_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/match_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/match_intent.php deleted file mode 100644 index 5f121baf95e6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/match_intent.php +++ /dev/null @@ -1,93 +0,0 @@ -/locations//agents//sessions/` - * or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). Please see - * {@see SessionsClient::sessionName()} for help formatting this field. - * @param string $queryInputLanguageCode The language of the input. See [Language - * Support](https://cloud.google.com/dialogflow/cx/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. - */ -function match_intent_sample(string $formattedSession, string $queryInputLanguageCode): void -{ - // Create a client. - $sessionsClient = new SessionsClient(); - - // Prepare the request message. - $queryInput = (new QueryInput()) - ->setLanguageCode($queryInputLanguageCode); - $request = (new MatchIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - - // Call the API and handle any network failures. - try { - /** @var MatchIntentResponse $response */ - $response = $sessionsClient->matchIntent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedSession = SessionsClient::sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $queryInputLanguageCode = '[LANGUAGE_CODE]'; - - match_intent_sample($formattedSession, $queryInputLanguageCode); -} -// [END dialogflow_v3_generated_Sessions_MatchIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/server_streaming_detect_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/server_streaming_detect_intent.php deleted file mode 100644 index 2638fadc2597..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/server_streaming_detect_intent.php +++ /dev/null @@ -1,107 +0,0 @@ -/locations//agents//sessions/` or - * `projects//locations//agents//environments//sessions/`. - * If `Environment ID` is not specified, we assume default 'draft' - * environment. - * It's up to the API caller to choose an appropriate `Session ID`. It can be - * a random number or some type of session identifiers (preferably hashed). - * The length of the `Session ID` must not exceed 36 characters. - * - * For more information, see the [sessions - * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). - * - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). Please see - * {@see SessionsClient::sessionName()} for help formatting this field. - * @param string $queryInputLanguageCode The language of the input. See [Language - * Support](https://cloud.google.com/dialogflow/cx/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. - */ -function server_streaming_detect_intent_sample( - string $formattedSession, - string $queryInputLanguageCode -): void { - // Create a client. - $sessionsClient = new SessionsClient(); - - // Prepare the request message. - $queryInput = (new QueryInput()) - ->setLanguageCode($queryInputLanguageCode); - $request = (new DetectIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $sessionsClient->serverStreamingDetectIntent($request); - - /** @var DetectIntentResponse $element */ - foreach ($stream->readAll() 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]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $queryInputLanguageCode = '[LANGUAGE_CODE]'; - - server_streaming_detect_intent_sample($formattedSession, $queryInputLanguageCode); -} -// [END dialogflow_v3_generated_Sessions_ServerStreamingDetectIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/streaming_detect_intent.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/streaming_detect_intent.php deleted file mode 100644 index 507229b31143..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/streaming_detect_intent.php +++ /dev/null @@ -1,88 +0,0 @@ -setLanguageCode($queryInputLanguageCode); - $request = (new StreamingDetectIntentRequest()) - ->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 -{ - $queryInputLanguageCode = '[LANGUAGE_CODE]'; - - streaming_detect_intent_sample($queryInputLanguageCode); -} -// [END dialogflow_v3_generated_Sessions_StreamingDetectIntent_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/submit_answer_feedback.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/submit_answer_feedback.php deleted file mode 100644 index 0be84ae032ea..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/SessionsClient/submit_answer_feedback.php +++ /dev/null @@ -1,78 +0,0 @@ -setSession($formattedSession) - ->setResponseId($responseId) - ->setAnswerFeedback($answerFeedback); - - // Call the API and handle any network failures. - try { - /** @var AnswerFeedback $response */ - $response = $sessionsClient->submitAnswerFeedback($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedSession = SessionsClient::sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $responseId = '[RESPONSE_ID]'; - - submit_answer_feedback_sample($formattedSession, $responseId); -} -// [END dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_delete_test_cases.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_delete_test_cases.php deleted file mode 100644 index c6d23ce2b95c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_delete_test_cases.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations//agents/`. Please see - * {@see TestCasesClient::agentName()} for help formatting this field. - * @param string $formattedNamesElement Format of test case names: - * `projects//locations//agents//testCases/`. Please see - * {@see TestCasesClient::testCaseName()} for help formatting this field. - */ -function batch_delete_test_cases_sample( - string $formattedParent, - string $formattedNamesElement -): void { - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $formattedNames = [$formattedNamesElement,]; - $request = (new BatchDeleteTestCasesRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - - // Call the API and handle any network failures. - try { - $testCasesClient->batchDeleteTestCases($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $formattedNamesElement = TestCasesClient::testCaseName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[TEST_CASE]' - ); - - batch_delete_test_cases_sample($formattedParent, $formattedNamesElement); -} -// [END dialogflow_v3_generated_TestCases_BatchDeleteTestCases_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_run_test_cases.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_run_test_cases.php deleted file mode 100644 index a1da36def90c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/batch_run_test_cases.php +++ /dev/null @@ -1,106 +0,0 @@ -/locations//agents/`. Please see - * {@see TestCasesClient::agentName()} for help formatting this field. - * @param string $formattedTestCasesElement Format: - * `projects//locations//agents//testCases/`. Please see - * {@see TestCasesClient::testCaseName()} for help formatting this field. - */ -function batch_run_test_cases_sample( - string $formattedParent, - string $formattedTestCasesElement -): void { - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $formattedTestCases = [$formattedTestCasesElement,]; - $request = (new BatchRunTestCasesRequest()) - ->setParent($formattedParent) - ->setTestCases($formattedTestCases); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $testCasesClient->batchRunTestCases($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchRunTestCasesResponse $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 = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $formattedTestCasesElement = TestCasesClient::testCaseName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[TEST_CASE]' - ); - - batch_run_test_cases_sample($formattedParent, $formattedTestCasesElement); -} -// [END dialogflow_v3_generated_TestCases_BatchRunTestCases_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/calculate_coverage.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/calculate_coverage.php deleted file mode 100644 index 3f0580d42624..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/calculate_coverage.php +++ /dev/null @@ -1,76 +0,0 @@ -/locations//agents/`. Please see - * {@see TestCasesClient::agentName()} for help formatting this field. - * @param int $type The type of coverage requested. - */ -function calculate_coverage_sample(string $formattedAgent, int $type): void -{ - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $request = (new CalculateCoverageRequest()) - ->setAgent($formattedAgent) - ->setType($type); - - // Call the API and handle any network failures. - try { - /** @var CalculateCoverageResponse $response */ - $response = $testCasesClient->calculateCoverage($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedAgent = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $type = CoverageType::COVERAGE_TYPE_UNSPECIFIED; - - calculate_coverage_sample($formattedAgent, $type); -} -// [END dialogflow_v3_generated_TestCases_CalculateCoverage_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/create_test_case.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/create_test_case.php deleted file mode 100644 index 4492c868b23f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/create_test_case.php +++ /dev/null @@ -1,78 +0,0 @@ -/locations//agents/`. Please see - * {@see TestCasesClient::agentName()} for help formatting this field. - * @param string $testCaseDisplayName The human-readable name of the test case, unique within the - * agent. Limit of 200 characters. - */ -function create_test_case_sample(string $formattedParent, string $testCaseDisplayName): void -{ - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $testCase = (new TestCase()) - ->setDisplayName($testCaseDisplayName); - $request = (new CreateTestCaseRequest()) - ->setParent($formattedParent) - ->setTestCase($testCase); - - // Call the API and handle any network failures. - try { - /** @var TestCase $response */ - $response = $testCasesClient->createTestCase($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $testCaseDisplayName = '[DISPLAY_NAME]'; - - create_test_case_sample($formattedParent, $testCaseDisplayName); -} -// [END dialogflow_v3_generated_TestCases_CreateTestCase_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/export_test_cases.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/export_test_cases.php deleted file mode 100644 index dbfdeff71b6f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/export_test_cases.php +++ /dev/null @@ -1,94 +0,0 @@ -/locations//agents/`. Please see - * {@see TestCasesClient::agentName()} for help formatting this field. - */ -function export_test_cases_sample(string $formattedParent): void -{ - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $request = (new ExportTestCasesRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $testCasesClient->exportTestCases($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportTestCasesResponse $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 = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - export_test_cases_sample($formattedParent); -} -// [END dialogflow_v3_generated_TestCases_ExportTestCases_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_location.php deleted file mode 100644 index 6de856cb0e2d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_TestCases_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case.php deleted file mode 100644 index f409772d7eee..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations//agents//testCases/`. Please see - * {@see TestCasesClient::testCaseName()} for help formatting this field. - */ -function get_test_case_sample(string $formattedName): void -{ - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $request = (new GetTestCaseRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TestCase $response */ - $response = $testCasesClient->getTestCase($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TestCasesClient::testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); - - get_test_case_sample($formattedName); -} -// [END dialogflow_v3_generated_TestCases_GetTestCase_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case_result.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case_result.php deleted file mode 100644 index 7e4d070dee44..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/get_test_case_result.php +++ /dev/null @@ -1,79 +0,0 @@ -/locations//agents//testCases//results/`. Please see - * {@see TestCasesClient::testCaseResultName()} for help formatting this field. - */ -function get_test_case_result_sample(string $formattedName): void -{ - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $request = (new GetTestCaseResultRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TestCaseResult $response */ - $response = $testCasesClient->getTestCaseResult($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TestCasesClient::testCaseResultName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[TEST_CASE]', - '[RESULT]' - ); - - get_test_case_result_sample($formattedName); -} -// [END dialogflow_v3_generated_TestCases_GetTestCaseResult_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/import_test_cases.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/import_test_cases.php deleted file mode 100644 index 9182939b0756..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/import_test_cases.php +++ /dev/null @@ -1,95 +0,0 @@ -/locations//agents/`. Please see - * {@see TestCasesClient::agentName()} for help formatting this field. - */ -function import_test_cases_sample(string $formattedParent): void -{ - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $request = (new ImportTestCasesRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $testCasesClient->importTestCases($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportTestCasesResponse $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 = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - import_test_cases_sample($formattedParent); -} -// [END dialogflow_v3_generated_TestCases_ImportTestCases_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_locations.php deleted file mode 100644 index 0e281a5d15bd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_TestCases_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_case_results.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_case_results.php deleted file mode 100644 index 2fa9fa3c3b94..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_case_results.php +++ /dev/null @@ -1,86 +0,0 @@ -/locations//agents//testCases/`. - * Specify a `-` as a wildcard for TestCase ID to - * list results across multiple test cases. Please see - * {@see TestCasesClient::testCaseName()} for help formatting this field. - */ -function list_test_case_results_sample(string $formattedParent): void -{ - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $request = (new ListTestCaseResultsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $testCasesClient->listTestCaseResults($request); - - /** @var TestCaseResult $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 = TestCasesClient::testCaseName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[TEST_CASE]' - ); - - list_test_case_results_sample($formattedParent); -} -// [END dialogflow_v3_generated_TestCases_ListTestCaseResults_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_cases.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_cases.php deleted file mode 100644 index 3d8702fdf698..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/list_test_cases.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//agents/`. Please see - * {@see TestCasesClient::agentName()} for help formatting this field. - */ -function list_test_cases_sample(string $formattedParent): void -{ - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $request = (new ListTestCasesRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $testCasesClient->listTestCases($request); - - /** @var TestCase $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 = TestCasesClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - list_test_cases_sample($formattedParent); -} -// [END dialogflow_v3_generated_TestCases_ListTestCases_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/run_test_case.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/run_test_case.php deleted file mode 100644 index 6408e0c300c6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/run_test_case.php +++ /dev/null @@ -1,93 +0,0 @@ -/locations//agents//testCases/`. Please see - * {@see TestCasesClient::testCaseName()} for help formatting this field. - */ -function run_test_case_sample(string $formattedName): void -{ - // Create a client. - $testCasesClient = new TestCasesClient(); - - // Prepare the request message. - $request = (new RunTestCaseRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $testCasesClient->runTestCase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RunTestCaseResponse $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 = TestCasesClient::testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); - - run_test_case_sample($formattedName); -} -// [END dialogflow_v3_generated_TestCases_RunTestCase_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/update_test_case.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/update_test_case.php deleted file mode 100644 index b1f2ca91d334..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TestCasesClient/update_test_case.php +++ /dev/null @@ -1,76 +0,0 @@ -setDisplayName($testCaseDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateTestCaseRequest()) - ->setTestCase($testCase) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var TestCase $response */ - $response = $testCasesClient->updateTestCase($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $testCaseDisplayName = '[DISPLAY_NAME]'; - - update_test_case_sample($testCaseDisplayName); -} -// [END dialogflow_v3_generated_TestCases_UpdateTestCase_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/create_transition_route_group.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/create_transition_route_group.php deleted file mode 100644 index ced2833b8fcf..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/create_transition_route_group.php +++ /dev/null @@ -1,95 +0,0 @@ -/locations//agents//flows/` - * or `projects//locations//agents/` - * for agent-level groups. Please see - * {@see TransitionRouteGroupsClient::flowName()} for help formatting this field. - * @param string $transitionRouteGroupDisplayName The human-readable name of the transition route group, unique - * within the flow. The display name can be no longer than 30 characters. - */ -function create_transition_route_group_sample( - string $formattedParent, - string $transitionRouteGroupDisplayName -): void { - // Create a client. - $transitionRouteGroupsClient = new TransitionRouteGroupsClient(); - - // Prepare the request message. - $transitionRouteGroup = (new TransitionRouteGroup()) - ->setDisplayName($transitionRouteGroupDisplayName); - $request = (new CreateTransitionRouteGroupRequest()) - ->setParent($formattedParent) - ->setTransitionRouteGroup($transitionRouteGroup); - - // Call the API and handle any network failures. - try { - /** @var TransitionRouteGroup $response */ - $response = $transitionRouteGroupsClient->createTransitionRouteGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = TransitionRouteGroupsClient::flowName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]' - ); - $transitionRouteGroupDisplayName = '[DISPLAY_NAME]'; - - create_transition_route_group_sample($formattedParent, $transitionRouteGroupDisplayName); -} -// [END dialogflow_v3_generated_TransitionRouteGroups_CreateTransitionRouteGroup_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/delete_transition_route_group.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/delete_transition_route_group.php deleted file mode 100644 index 2f2a87252147..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/delete_transition_route_group.php +++ /dev/null @@ -1,85 +0,0 @@ -/locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. Please see - * {@see TransitionRouteGroupsClient::transitionRouteGroupName()} for help formatting this field. - */ -function delete_transition_route_group_sample(string $formattedName): void -{ - // Create a client. - $transitionRouteGroupsClient = new TransitionRouteGroupsClient(); - - // Prepare the request message. - $request = (new DeleteTransitionRouteGroupRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $transitionRouteGroupsClient->deleteTransitionRouteGroup($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TransitionRouteGroupsClient::transitionRouteGroupName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]', - '[TRANSITION_ROUTE_GROUP]' - ); - - delete_transition_route_group_sample($formattedName); -} -// [END dialogflow_v3_generated_TransitionRouteGroups_DeleteTransitionRouteGroup_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_location.php deleted file mode 100644 index bc1d7de3a28e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_TransitionRouteGroups_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_transition_route_group.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_transition_route_group.php deleted file mode 100644 index 6a7011a8d2b4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/get_transition_route_group.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations//agents//flows//transitionRouteGroups/` - * or - * `projects//locations//agents//transitionRouteGroups/`. Please see - * {@see TransitionRouteGroupsClient::transitionRouteGroupName()} for help formatting this field. - */ -function get_transition_route_group_sample(string $formattedName): void -{ - // Create a client. - $transitionRouteGroupsClient = new TransitionRouteGroupsClient(); - - // Prepare the request message. - $request = (new GetTransitionRouteGroupRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TransitionRouteGroup $response */ - $response = $transitionRouteGroupsClient->getTransitionRouteGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TransitionRouteGroupsClient::transitionRouteGroupName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]', - '[TRANSITION_ROUTE_GROUP]' - ); - - get_transition_route_group_sample($formattedName); -} -// [END dialogflow_v3_generated_TransitionRouteGroups_GetTransitionRouteGroup_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_locations.php deleted file mode 100644 index 5b788eabe87c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_TransitionRouteGroups_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_transition_route_groups.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_transition_route_groups.php deleted file mode 100644 index 801bb9ca10e7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/list_transition_route_groups.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//agents//flows/` - * or `projects//locations//agents/. Please see - * {@see TransitionRouteGroupsClient::flowName()} for help formatting this field. - */ -function list_transition_route_groups_sample(string $formattedParent): void -{ - // Create a client. - $transitionRouteGroupsClient = new TransitionRouteGroupsClient(); - - // Prepare the request message. - $request = (new ListTransitionRouteGroupsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $transitionRouteGroupsClient->listTransitionRouteGroups($request); - - /** @var TransitionRouteGroup $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 = TransitionRouteGroupsClient::flowName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]' - ); - - list_transition_route_groups_sample($formattedParent); -} -// [END dialogflow_v3_generated_TransitionRouteGroups_ListTransitionRouteGroups_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/update_transition_route_group.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/update_transition_route_group.php deleted file mode 100644 index 94e65cd77e20..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/TransitionRouteGroupsClient/update_transition_route_group.php +++ /dev/null @@ -1,78 +0,0 @@ -setDisplayName($transitionRouteGroupDisplayName); - $request = (new UpdateTransitionRouteGroupRequest()) - ->setTransitionRouteGroup($transitionRouteGroup); - - // Call the API and handle any network failures. - try { - /** @var TransitionRouteGroup $response */ - $response = $transitionRouteGroupsClient->updateTransitionRouteGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $transitionRouteGroupDisplayName = '[DISPLAY_NAME]'; - - update_transition_route_group_sample($transitionRouteGroupDisplayName); -} -// [END dialogflow_v3_generated_TransitionRouteGroups_UpdateTransitionRouteGroup_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/compare_versions.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/compare_versions.php deleted file mode 100644 index 3dd1d372f0a1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/compare_versions.php +++ /dev/null @@ -1,96 +0,0 @@ -/locations//agents//flows//versions/`. Please see - * {@see VersionsClient::versionName()} for help formatting this field. - * @param string $formattedTargetVersion Name of the target flow version to compare with the - * base version. Use version ID `0` to indicate the draft version of the - * specified flow. Format: - * `projects//locations//agents//flows//versions/`. Please see - * {@see VersionsClient::versionName()} for help formatting this field. - */ -function compare_versions_sample( - string $formattedBaseVersion, - string $formattedTargetVersion -): void { - // Create a client. - $versionsClient = new VersionsClient(); - - // Prepare the request message. - $request = (new CompareVersionsRequest()) - ->setBaseVersion($formattedBaseVersion) - ->setTargetVersion($formattedTargetVersion); - - // Call the API and handle any network failures. - try { - /** @var CompareVersionsResponse $response */ - $response = $versionsClient->compareVersions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedBaseVersion = VersionsClient::versionName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]', - '[VERSION]' - ); - $formattedTargetVersion = VersionsClient::versionName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]', - '[VERSION]' - ); - - compare_versions_sample($formattedBaseVersion, $formattedTargetVersion); -} -// [END dialogflow_v3_generated_Versions_CompareVersions_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/create_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/create_version.php deleted file mode 100644 index 51b454061e38..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/create_version.php +++ /dev/null @@ -1,99 +0,0 @@ -/locations//agents//flows/`. Please see - * {@see VersionsClient::flowName()} for help formatting this field. - * @param string $versionDisplayName The human-readable name of the version. Limit of 64 characters. - */ -function create_version_sample(string $formattedParent, string $versionDisplayName): void -{ - // Create a client. - $versionsClient = new VersionsClient(); - - // Prepare the request message. - $version = (new Version()) - ->setDisplayName($versionDisplayName); - $request = (new CreateVersionRequest()) - ->setParent($formattedParent) - ->setVersion($version); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $versionsClient->createVersion($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Version $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 = VersionsClient::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $versionDisplayName = '[DISPLAY_NAME]'; - - create_version_sample($formattedParent, $versionDisplayName); -} -// [END dialogflow_v3_generated_Versions_CreateVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/delete_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/delete_version.php deleted file mode 100644 index cb8ae4e329e3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/delete_version.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//agents//flows//versions/`. Please see - * {@see VersionsClient::versionName()} for help formatting this field. - */ -function delete_version_sample(string $formattedName): void -{ - // Create a client. - $versionsClient = new VersionsClient(); - - // Prepare the request message. - $request = (new DeleteVersionRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $versionsClient->deleteVersion($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VersionsClient::versionName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]', - '[VERSION]' - ); - - delete_version_sample($formattedName); -} -// [END dialogflow_v3_generated_Versions_DeleteVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_location.php deleted file mode 100644 index 1c7fc2bc1f36..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Versions_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_version.php deleted file mode 100644 index 2cbd2398bb94..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/get_version.php +++ /dev/null @@ -1,79 +0,0 @@ -/locations//agents//flows//versions/`. Please see - * {@see VersionsClient::versionName()} for help formatting this field. - */ -function get_version_sample(string $formattedName): void -{ - // Create a client. - $versionsClient = new VersionsClient(); - - // Prepare the request message. - $request = (new GetVersionRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Version $response */ - $response = $versionsClient->getVersion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VersionsClient::versionName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]', - '[VERSION]' - ); - - get_version_sample($formattedName); -} -// [END dialogflow_v3_generated_Versions_GetVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_locations.php deleted file mode 100644 index 27db37ece659..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Versions_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_versions.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_versions.php deleted file mode 100644 index aef92559f089..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/list_versions.php +++ /dev/null @@ -1,79 +0,0 @@ -/locations//agents//flows/`. Please see - * {@see VersionsClient::flowName()} for help formatting this field. - */ -function list_versions_sample(string $formattedParent): void -{ - // Create a client. - $versionsClient = new VersionsClient(); - - // Prepare the request message. - $request = (new ListVersionsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $versionsClient->listVersions($request); - - /** @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::flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - - list_versions_sample($formattedParent); -} -// [END dialogflow_v3_generated_Versions_ListVersions_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/load_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/load_version.php deleted file mode 100644 index 17e7107b4e03..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/load_version.php +++ /dev/null @@ -1,97 +0,0 @@ -/locations//agents//flows//versions/`. Please see - * {@see VersionsClient::versionName()} for help formatting this field. - */ -function load_version_sample(string $formattedName): void -{ - // Create a client. - $versionsClient = new VersionsClient(); - - // Prepare the request message. - $request = (new LoadVersionRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $versionsClient->loadVersion($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VersionsClient::versionName( - '[PROJECT]', - '[LOCATION]', - '[AGENT]', - '[FLOW]', - '[VERSION]' - ); - - load_version_sample($formattedName); -} -// [END dialogflow_v3_generated_Versions_LoadVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/update_version.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/update_version.php deleted file mode 100644 index 1157e689d14e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/VersionsClient/update_version.php +++ /dev/null @@ -1,75 +0,0 @@ -setDisplayName($versionDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateVersionRequest()) - ->setVersion($version) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Version $response */ - $response = $versionsClient->updateVersion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $versionDisplayName = '[DISPLAY_NAME]'; - - update_version_sample($versionDisplayName); -} -// [END dialogflow_v3_generated_Versions_UpdateVersion_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/create_webhook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/create_webhook.php deleted file mode 100644 index d856896aff0a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/create_webhook.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//agents/`. Please see - * {@see WebhooksClient::agentName()} for help formatting this field. - * @param string $webhookDisplayName The human-readable name of the webhook, unique within the agent. - */ -function create_webhook_sample(string $formattedParent, string $webhookDisplayName): void -{ - // Create a client. - $webhooksClient = new WebhooksClient(); - - // Prepare the request message. - $webhook = (new Webhook()) - ->setDisplayName($webhookDisplayName); - $request = (new CreateWebhookRequest()) - ->setParent($formattedParent) - ->setWebhook($webhook); - - // Call the API and handle any network failures. - try { - /** @var Webhook $response */ - $response = $webhooksClient->createWebhook($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WebhooksClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $webhookDisplayName = '[DISPLAY_NAME]'; - - create_webhook_sample($formattedParent, $webhookDisplayName); -} -// [END dialogflow_v3_generated_Webhooks_CreateWebhook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/delete_webhook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/delete_webhook.php deleted file mode 100644 index aff3b1c075b5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/delete_webhook.php +++ /dev/null @@ -1,71 +0,0 @@ -/locations//agents//webhooks/`. Please see - * {@see WebhooksClient::webhookName()} for help formatting this field. - */ -function delete_webhook_sample(string $formattedName): void -{ - // Create a client. - $webhooksClient = new WebhooksClient(); - - // Prepare the request message. - $request = (new DeleteWebhookRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - $webhooksClient->deleteWebhook($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WebhooksClient::webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); - - delete_webhook_sample($formattedName); -} -// [END dialogflow_v3_generated_Webhooks_DeleteWebhook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_location.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_location.php deleted file mode 100644 index 9c6859fe6bf4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dialogflow_v3_generated_Webhooks_GetLocation_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_webhook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_webhook.php deleted file mode 100644 index 972d5e8b8265..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/get_webhook.php +++ /dev/null @@ -1,73 +0,0 @@ -/locations//agents//webhooks/`. Please see - * {@see WebhooksClient::webhookName()} for help formatting this field. - */ -function get_webhook_sample(string $formattedName): void -{ - // Create a client. - $webhooksClient = new WebhooksClient(); - - // Prepare the request message. - $request = (new GetWebhookRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Webhook $response */ - $response = $webhooksClient->getWebhook($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WebhooksClient::webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); - - get_webhook_sample($formattedName); -} -// [END dialogflow_v3_generated_Webhooks_GetWebhook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_locations.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_locations.php deleted file mode 100644 index c9ff21adc3b9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @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_v3_generated_Webhooks_ListLocations_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_webhooks.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_webhooks.php deleted file mode 100644 index 86889427ea93..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/list_webhooks.php +++ /dev/null @@ -1,77 +0,0 @@ -/locations//agents/`. Please see - * {@see WebhooksClient::agentName()} for help formatting this field. - */ -function list_webhooks_sample(string $formattedParent): void -{ - // Create a client. - $webhooksClient = new WebhooksClient(); - - // Prepare the request message. - $request = (new ListWebhooksRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $webhooksClient->listWebhooks($request); - - /** @var Webhook $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 = WebhooksClient::agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - - list_webhooks_sample($formattedParent); -} -// [END dialogflow_v3_generated_Webhooks_ListWebhooks_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/update_webhook.php b/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/update_webhook.php deleted file mode 100644 index 16a2231f545e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/samples/V3/WebhooksClient/update_webhook.php +++ /dev/null @@ -1,72 +0,0 @@ -setDisplayName($webhookDisplayName); - $request = (new UpdateWebhookRequest()) - ->setWebhook($webhook); - - // Call the API and handle any network failures. - try { - /** @var Webhook $response */ - $response = $webhooksClient->updateWebhook($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $webhookDisplayName = '[DISPLAY_NAME]'; - - update_webhook_sample($webhookDisplayName); -} -// [END dialogflow_v3_generated_Webhooks_UpdateWebhook_sync] diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/AgentsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/AgentsClient.php deleted file mode 100644 index 57e722eb0490..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/AgentsClient.php +++ /dev/null @@ -1,850 +0,0 @@ - createAgentAsync(CreateAgentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAgentAsync(DeleteAgentRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportAgentAsync(ExportAgentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAgentAsync(GetAgentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAgentValidationResultAsync(GetAgentValidationResultRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGenerativeSettingsAsync(GetGenerativeSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAgentsAsync(ListAgentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreAgentAsync(RestoreAgentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAgentAsync(UpdateAgentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGenerativeSettingsAsync(UpdateGenerativeSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface validateAgentAsync(ValidateAgentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class AgentsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Agents'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 $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', - ], - ], - ]; - } - - /** - * 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 = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * agent_generative_settings resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent_generative_settings resource. - */ - public static function agentGenerativeSettingsName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agentGenerativeSettings')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * agent_validation_result resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent_validation_result resource. - */ - public static function agentValidationResultName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agentValidationResult')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName(string $project, string $location, string $agent, string $environment): string - { - return self::getPathTemplate('environment')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a flow - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * - * @return string The formatted flow resource. - */ - public static function flowName(string $project, string $location, string $agent, string $flow): string - { - return self::getPathTemplate('flow')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a playbook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $playbook - * - * @return string The formatted playbook resource. - */ - public static function playbookName(string $project, string $location, string $agent, string $playbook): string - { - return self::getPathTemplate('playbook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'playbook' => $playbook, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * secret_version resource. - * - * @param string $project - * @param string $secret - * @param string $version - * - * @return string The formatted secret_version resource. - */ - public static function secretVersionName(string $project, string $secret, string $version): string - { - return self::getPathTemplate('secretVersion')->render([ - 'project' => $project, - 'secret' => $secret, - 'version' => $version, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * security_settings resource. - * - * @param string $project - * @param string $location - * @param string $securitySettings - * - * @return string The formatted security_settings resource. - */ - public static function securitySettingsName(string $project, string $location, string $securitySettings): string - { - return self::getPathTemplate('securitySettings')->render([ - 'project' => $project, - 'location' => $location, - 'security_settings' => $securitySettings, - ]); - } - - /** - * 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}/locations/{location}/agents/{agent} - * - agentGenerativeSettings: projects/{project}/locations/{location}/agents/{agent}/generativeSettings - * - agentValidationResult: projects/{project}/locations/{location}/agents/{agent}/validationResult - * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} - * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} - * - location: projects/{project}/locations/{location} - * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} - * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} - * - securitySettings: projects/{project}/locations/{location}/securitySettings/{security_settings} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\AgentsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new AgentsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an agent in the specified location. - * - * Note: You should always train flows prior to sending them queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see AgentsClient::createAgentAsync()} . - * - * @example samples/V3/AgentsClient/create_agent.php - * - * @param CreateAgentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Agent - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAgent(CreateAgentRequest $request, array $callOptions = []): Agent - { - return $this->startApiCall('CreateAgent', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified agent. - * - * The async variant is {@see AgentsClient::deleteAgentAsync()} . - * - * @example samples/V3/AgentsClient/delete_agent.php - * - * @param DeleteAgentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAgent(DeleteAgentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAgent', $request, $callOptions)->wait(); - } - - /** - * Exports the specified agent to a binary file. - * - * 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`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: - * [ExportAgentResponse][google.cloud.dialogflow.cx.v3.ExportAgentResponse] - * - * The async variant is {@see AgentsClient::exportAgentAsync()} . - * - * @example samples/V3/AgentsClient/export_agent.php - * - * @param ExportAgentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportAgent(ExportAgentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportAgent', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified agent. - * - * The async variant is {@see AgentsClient::getAgentAsync()} . - * - * @example samples/V3/AgentsClient/get_agent.php - * - * @param GetAgentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Agent - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAgent(GetAgentRequest $request, array $callOptions = []): Agent - { - return $this->startApiCall('GetAgent', $request, $callOptions)->wait(); - } - - /** - * Gets the latest agent validation result. Agent validation is performed - * when ValidateAgent is called. - * - * The async variant is {@see AgentsClient::getAgentValidationResultAsync()} . - * - * @example samples/V3/AgentsClient/get_agent_validation_result.php - * - * @param GetAgentValidationResultRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AgentValidationResult - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAgentValidationResult(GetAgentValidationResultRequest $request, array $callOptions = []): AgentValidationResult - { - return $this->startApiCall('GetAgentValidationResult', $request, $callOptions)->wait(); - } - - /** - * Gets the generative settings for the agent. - * - * The async variant is {@see AgentsClient::getGenerativeSettingsAsync()} . - * - * @example samples/V3/AgentsClient/get_generative_settings.php - * - * @param GetGenerativeSettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerativeSettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGenerativeSettings(GetGenerativeSettingsRequest $request, array $callOptions = []): GenerativeSettings - { - return $this->startApiCall('GetGenerativeSettings', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all agents in the specified location. - * - * The async variant is {@see AgentsClient::listAgentsAsync()} . - * - * @example samples/V3/AgentsClient/list_agents.php - * - * @param ListAgentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAgents(ListAgentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAgents', $request, $callOptions); - } - - /** - * Restores the specified agent from a binary file. - * - * Replaces the current agent with a new one. Note that all existing resources - * in agent (e.g. intents, entity types, flows) will be removed. - * - * 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`: 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 flows prior to sending them queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see AgentsClient::restoreAgentAsync()} . - * - * @example samples/V3/AgentsClient/restore_agent.php - * - * @param RestoreAgentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function restoreAgent(RestoreAgentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RestoreAgent', $request, $callOptions)->wait(); - } - - /** - * Updates the specified agent. - * - * Note: You should always train flows prior to sending them queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see AgentsClient::updateAgentAsync()} . - * - * @example samples/V3/AgentsClient/update_agent.php - * - * @param UpdateAgentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Agent - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAgent(UpdateAgentRequest $request, array $callOptions = []): Agent - { - return $this->startApiCall('UpdateAgent', $request, $callOptions)->wait(); - } - - /** - * Updates the generative settings for the agent. - * - * The async variant is {@see AgentsClient::updateGenerativeSettingsAsync()} . - * - * @example samples/V3/AgentsClient/update_generative_settings.php - * - * @param UpdateGenerativeSettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerativeSettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGenerativeSettings(UpdateGenerativeSettingsRequest $request, array $callOptions = []): GenerativeSettings - { - return $this->startApiCall('UpdateGenerativeSettings', $request, $callOptions)->wait(); - } - - /** - * Validates the specified agent and creates or updates validation results. - * The agent in draft version is validated. Please call this API after the - * training is completed to get the complete validation results. - * - * The async variant is {@see AgentsClient::validateAgentAsync()} . - * - * @example samples/V3/AgentsClient/validate_agent.php - * - * @param ValidateAgentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AgentValidationResult - * - * @throws ApiException Thrown if the API call fails. - */ - public function validateAgent(ValidateAgentRequest $request, array $callOptions = []): AgentValidationResult - { - return $this->startApiCall('ValidateAgent', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AgentsClient::getLocationAsync()} . - * - * @example samples/V3/AgentsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see AgentsClient::listLocationsAsync()} . - * - * @example samples/V3/AgentsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ChangelogsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ChangelogsClient.php deleted file mode 100644 index 8851ca167ed1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ChangelogsClient.php +++ /dev/null @@ -1,364 +0,0 @@ - getChangelogAsync(GetChangelogRequest $request, array $optionalArgs = []) - * @method PromiseInterface listChangelogsAsync(ListChangelogsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class ChangelogsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Changelogs'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/changelogs_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/changelogs_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/changelogs_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/changelogs_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a changelog - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $changelog - * - * @return string The formatted changelog resource. - */ - public static function changelogName(string $project, string $location, string $agent, string $changelog): string - { - return self::getPathTemplate('changelog')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'changelog' => $changelog, - ]); - } - - /** - * 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}/locations/{location}/agents/{agent} - * - changelog: projects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\ChangelogsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new ChangelogsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Retrieves the specified Changelog. - * - * The async variant is {@see ChangelogsClient::getChangelogAsync()} . - * - * @example samples/V3/ChangelogsClient/get_changelog.php - * - * @param GetChangelogRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Changelog - * - * @throws ApiException Thrown if the API call fails. - */ - public function getChangelog(GetChangelogRequest $request, array $callOptions = []): Changelog - { - return $this->startApiCall('GetChangelog', $request, $callOptions)->wait(); - } - - /** - * Returns the list of Changelogs. - * - * The async variant is {@see ChangelogsClient::listChangelogsAsync()} . - * - * @example samples/V3/ChangelogsClient/list_changelogs.php - * - * @param ListChangelogsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listChangelogs(ListChangelogsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListChangelogs', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ChangelogsClient::getLocationAsync()} . - * - * @example samples/V3/ChangelogsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ChangelogsClient::listLocationsAsync()} . - * - * @example samples/V3/ChangelogsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/DeploymentsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/DeploymentsClient.php deleted file mode 100644 index 547b69a14b49..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/DeploymentsClient.php +++ /dev/null @@ -1,370 +0,0 @@ - getDeploymentAsync(GetDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDeploymentsAsync(ListDeploymentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class DeploymentsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Deployments'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/deployments_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/deployments_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/deployments_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/deployments_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a deployment - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * @param string $deployment - * - * @return string The formatted deployment resource. - */ - public static function deploymentName(string $project, string $location, string $agent, string $environment, string $deployment): string - { - return self::getPathTemplate('deployment')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - 'deployment' => $deployment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName(string $project, string $location, string $agent, string $environment): string - { - return self::getPathTemplate('environment')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - deployment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment} - * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\DeploymentsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new DeploymentsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Retrieves the specified - * [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. - * - * The async variant is {@see DeploymentsClient::getDeploymentAsync()} . - * - * @example samples/V3/DeploymentsClient/get_deployment.php - * - * @param GetDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Deployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDeployment(GetDeploymentRequest $request, array $callOptions = []): Deployment - { - return $this->startApiCall('GetDeployment', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all deployments in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * The async variant is {@see DeploymentsClient::listDeploymentsAsync()} . - * - * @example samples/V3/DeploymentsClient/list_deployments.php - * - * @param ListDeploymentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDeployments(ListDeploymentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDeployments', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DeploymentsClient::getLocationAsync()} . - * - * @example samples/V3/DeploymentsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see DeploymentsClient::listLocationsAsync()} . - * - * @example samples/V3/DeploymentsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EntityTypesClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EntityTypesClient.php deleted file mode 100644 index 8bed1f22958e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EntityTypesClient.php +++ /dev/null @@ -1,570 +0,0 @@ - createEntityTypeAsync(CreateEntityTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEntityTypeAsync(DeleteEntityTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportEntityTypesAsync(ExportEntityTypesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEntityTypeAsync(GetEntityTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface importEntityTypesAsync(ImportEntityTypesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEntityTypesAsync(ListEntityTypesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateEntityTypeAsync(UpdateEntityTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class EntityTypesClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.EntityTypes'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 $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', - ], - ], - ]; - } - - /** - * 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 = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entity_type - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $entityType - * - * @return string The formatted entity_type resource. - */ - public static function entityTypeName(string $project, string $location, string $agent, string $entityType): string - { - return self::getPathTemplate('entityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - '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}/locations/{location}/agents/{agent} - * - entityType: projects/{project}/locations/{location}/agents/{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(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\EntityTypesClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new EntityTypesClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an entity type in the specified agent. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see EntityTypesClient::createEntityTypeAsync()} . - * - * @example samples/V3/EntityTypesClient/create_entity_type.php - * - * @param CreateEntityTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EntityType - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEntityType(CreateEntityTypeRequest $request, array $callOptions = []): EntityType - { - return $this->startApiCall('CreateEntityType', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified entity type. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see EntityTypesClient::deleteEntityTypeAsync()} . - * - * @example samples/V3/EntityTypesClient/delete_entity_type.php - * - * @param DeleteEntityTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEntityType(DeleteEntityTypeRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteEntityType', $request, $callOptions)->wait(); - } - - /** - * Exports the selected entity types. - * - * The async variant is {@see EntityTypesClient::exportEntityTypesAsync()} . - * - * @example samples/V3/EntityTypesClient/export_entity_types.php - * - * @param ExportEntityTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportEntityTypes(ExportEntityTypesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportEntityTypes', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified entity type. - * - * The async variant is {@see EntityTypesClient::getEntityTypeAsync()} . - * - * @example samples/V3/EntityTypesClient/get_entity_type.php - * - * @param GetEntityTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EntityType - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEntityType(GetEntityTypeRequest $request, array $callOptions = []): EntityType - { - return $this->startApiCall('GetEntityType', $request, $callOptions)->wait(); - } - - /** - * Imports the specified entitytypes into the agent. - * - * The async variant is {@see EntityTypesClient::importEntityTypesAsync()} . - * - * @example samples/V3/EntityTypesClient/import_entity_types.php - * - * @param ImportEntityTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importEntityTypes(ImportEntityTypesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportEntityTypes', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all entity types in the specified agent. - * - * The async variant is {@see EntityTypesClient::listEntityTypesAsync()} . - * - * @example samples/V3/EntityTypesClient/list_entity_types.php - * - * @param ListEntityTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEntityTypes(ListEntityTypesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEntityTypes', $request, $callOptions); - } - - /** - * Updates the specified entity type. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see EntityTypesClient::updateEntityTypeAsync()} . - * - * @example samples/V3/EntityTypesClient/update_entity_type.php - * - * @param UpdateEntityTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EntityType - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEntityType(UpdateEntityTypeRequest $request, array $callOptions = []): EntityType - { - return $this->startApiCall('UpdateEntityType', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see EntityTypesClient::getLocationAsync()} . - * - * @example samples/V3/EntityTypesClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see EntityTypesClient::listLocationsAsync()} . - * - * @example samples/V3/EntityTypesClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EnvironmentsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EnvironmentsClient.php deleted file mode 100644 index 3cc3463f11af..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/EnvironmentsClient.php +++ /dev/null @@ -1,772 +0,0 @@ - createEnvironmentAsync(CreateEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEnvironmentAsync(DeleteEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deployFlowAsync(DeployFlowRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEnvironmentAsync(GetEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listContinuousTestResultsAsync(ListContinuousTestResultsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEnvironmentsAsync(ListEnvironmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface lookupEnvironmentHistoryAsync(LookupEnvironmentHistoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface runContinuousTestAsync(RunContinuousTestRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateEnvironmentAsync(UpdateEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class EnvironmentsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Environments'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 $operationsClient; - - 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', - ], - ], - ]; - } - - /** - * 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 = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName(string $project, string $location, string $agent, string $environment): string - { - return self::getPathTemplate('environment')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * secret_version resource. - * - * @param string $project - * @param string $secret - * @param string $version - * - * @return string The formatted secret_version resource. - */ - public static function secretVersionName(string $project, string $secret, string $version): string - { - return self::getPathTemplate('secretVersion')->render([ - 'project' => $project, - 'secret' => $secret, - 'version' => $version, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $namespace - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $namespace, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'namespace' => $namespace, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a test_case - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $testCase - * - * @return string The formatted test_case resource. - */ - public static function testCaseName(string $project, string $location, string $agent, string $testCase): string - { - return self::getPathTemplate('testCase')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'test_case' => $testCase, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a version - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $version - * - * @return string The formatted version resource. - */ - public static function versionName(string $project, string $location, string $agent, string $flow, string $version): string - { - return self::getPathTemplate('version')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'version' => $version, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a webhook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $webhook - * - * @return string The formatted webhook resource. - */ - public static function webhookName(string $project, string $location, string $agent, string $webhook): string - { - return self::getPathTemplate('webhook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'webhook' => $webhook, - ]); - } - - /** - * 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}/locations/{location}/agents/{agent} - * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} - * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} - * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} - * - testCase: projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case} - * - version: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version} - * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\EnvironmentsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new EnvironmentsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the - * specified [Agent][google.cloud.dialogflow.cx.v3.Agent]. - * - * 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`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: [Environment][google.cloud.dialogflow.cx.v3.Environment] - * - * The async variant is {@see EnvironmentsClient::createEnvironmentAsync()} . - * - * @example samples/V3/EnvironmentsClient/create_environment.php - * - * @param CreateEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEnvironment(CreateEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEnvironment', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * The async variant is {@see EnvironmentsClient::deleteEnvironmentAsync()} . - * - * @example samples/V3/EnvironmentsClient/delete_environment.php - * - * @param DeleteEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEnvironment(DeleteEnvironmentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteEnvironment', $request, $callOptions)->wait(); - } - - /** - * Deploys a flow to the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * 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`: - * [DeployFlowMetadata][google.cloud.dialogflow.cx.v3.DeployFlowMetadata] - * - `response`: - * [DeployFlowResponse][google.cloud.dialogflow.cx.v3.DeployFlowResponse] - * - * The async variant is {@see EnvironmentsClient::deployFlowAsync()} . - * - * @example samples/V3/EnvironmentsClient/deploy_flow.php - * - * @param DeployFlowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deployFlow(DeployFlowRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeployFlow', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * The async variant is {@see EnvironmentsClient::getEnvironmentAsync()} . - * - * @example samples/V3/EnvironmentsClient/get_environment.php - * - * @param GetEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Environment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEnvironment(GetEnvironmentRequest $request, array $callOptions = []): Environment - { - return $this->startApiCall('GetEnvironment', $request, $callOptions)->wait(); - } - - /** - * Fetches a list of continuous test results for a given environment. - * - * The async variant is {@see EnvironmentsClient::listContinuousTestResultsAsync()} - * . - * - * @example samples/V3/EnvironmentsClient/list_continuous_test_results.php - * - * @param ListContinuousTestResultsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listContinuousTestResults(ListContinuousTestResultsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListContinuousTestResults', $request, $callOptions); - } - - /** - * Returns the list of all environments in the specified - * [Agent][google.cloud.dialogflow.cx.v3.Agent]. - * - * The async variant is {@see EnvironmentsClient::listEnvironmentsAsync()} . - * - * @example samples/V3/EnvironmentsClient/list_environments.php - * - * @param ListEnvironmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEnvironments(ListEnvironmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEnvironments', $request, $callOptions); - } - - /** - * Looks up the history of the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * The async variant is {@see EnvironmentsClient::lookupEnvironmentHistoryAsync()} - * . - * - * @example samples/V3/EnvironmentsClient/lookup_environment_history.php - * - * @param LookupEnvironmentHistoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function lookupEnvironmentHistory(LookupEnvironmentHistoryRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('LookupEnvironmentHistory', $request, $callOptions); - } - - /** - * Kicks off a continuous test under the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * 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`: - * [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata] - * - `response`: - * [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse] - * - * The async variant is {@see EnvironmentsClient::runContinuousTestAsync()} . - * - * @example samples/V3/EnvironmentsClient/run_continuous_test.php - * - * @param RunContinuousTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function runContinuousTest(RunContinuousTestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RunContinuousTest', $request, $callOptions)->wait(); - } - - /** - * Updates the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * 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`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: [Environment][google.cloud.dialogflow.cx.v3.Environment] - * - * The async variant is {@see EnvironmentsClient::updateEnvironmentAsync()} . - * - * @example samples/V3/EnvironmentsClient/update_environment.php - * - * @param UpdateEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEnvironment(UpdateEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateEnvironment', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see EnvironmentsClient::getLocationAsync()} . - * - * @example samples/V3/EnvironmentsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see EnvironmentsClient::listLocationsAsync()} . - * - * @example samples/V3/EnvironmentsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExperimentsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExperimentsClient.php deleted file mode 100644 index 455b611da8e1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/ExperimentsClient.php +++ /dev/null @@ -1,538 +0,0 @@ - createExperimentAsync(CreateExperimentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteExperimentAsync(DeleteExperimentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getExperimentAsync(GetExperimentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExperimentsAsync(ListExperimentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface startExperimentAsync(StartExperimentRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopExperimentAsync(StopExperimentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateExperimentAsync(UpdateExperimentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class ExperimentsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Experiments'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/experiments_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/experiments_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/experiments_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/experiments_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName(string $project, string $location, string $agent, string $environment): string - { - return self::getPathTemplate('environment')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a experiment - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * @param string $experiment - * - * @return string The formatted experiment resource. - */ - public static function experimentName(string $project, string $location, string $agent, string $environment, string $experiment): string - { - return self::getPathTemplate('experiment')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - 'experiment' => $experiment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a version - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $version - * - * @return string The formatted version resource. - */ - public static function versionName(string $project, string $location, string $agent, string $flow, string $version): string - { - return self::getPathTemplate('version')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - '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 - * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} - * - experiment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment} - * - version: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/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(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\ExperimentsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new ExperimentsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the - * specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * The async variant is {@see ExperimentsClient::createExperimentAsync()} . - * - * @example samples/V3/ExperimentsClient/create_experiment.php - * - * @param CreateExperimentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Experiment - * - * @throws ApiException Thrown if the API call fails. - */ - public function createExperiment(CreateExperimentRequest $request, array $callOptions = []): Experiment - { - return $this->startApiCall('CreateExperiment', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified - * [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * The async variant is {@see ExperimentsClient::deleteExperimentAsync()} . - * - * @example samples/V3/ExperimentsClient/delete_experiment.php - * - * @param DeleteExperimentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteExperiment(DeleteExperimentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteExperiment', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified - * [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * The async variant is {@see ExperimentsClient::getExperimentAsync()} . - * - * @example samples/V3/ExperimentsClient/get_experiment.php - * - * @param GetExperimentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Experiment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getExperiment(GetExperimentRequest $request, array $callOptions = []): Experiment - { - return $this->startApiCall('GetExperiment', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all experiments in the specified - * [Environment][google.cloud.dialogflow.cx.v3.Environment]. - * - * The async variant is {@see ExperimentsClient::listExperimentsAsync()} . - * - * @example samples/V3/ExperimentsClient/list_experiments.php - * - * @param ListExperimentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listExperiments(ListExperimentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListExperiments', $request, $callOptions); - } - - /** - * Starts the specified - * [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only - * changes the state of experiment from PENDING to RUNNING. - * - * The async variant is {@see ExperimentsClient::startExperimentAsync()} . - * - * @example samples/V3/ExperimentsClient/start_experiment.php - * - * @param StartExperimentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Experiment - * - * @throws ApiException Thrown if the API call fails. - */ - public function startExperiment(StartExperimentRequest $request, array $callOptions = []): Experiment - { - return $this->startApiCall('StartExperiment', $request, $callOptions)->wait(); - } - - /** - * Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * This rpc only changes the state of experiment from RUNNING to DONE. - * - * The async variant is {@see ExperimentsClient::stopExperimentAsync()} . - * - * @example samples/V3/ExperimentsClient/stop_experiment.php - * - * @param StopExperimentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Experiment - * - * @throws ApiException Thrown if the API call fails. - */ - public function stopExperiment(StopExperimentRequest $request, array $callOptions = []): Experiment - { - return $this->startApiCall('StopExperiment', $request, $callOptions)->wait(); - } - - /** - * Updates the specified - * [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. - * - * The async variant is {@see ExperimentsClient::updateExperimentAsync()} . - * - * @example samples/V3/ExperimentsClient/update_experiment.php - * - * @param UpdateExperimentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Experiment - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateExperiment(UpdateExperimentRequest $request, array $callOptions = []): Experiment - { - return $this->startApiCall('UpdateExperiment', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ExperimentsClient::getLocationAsync()} . - * - * @example samples/V3/ExperimentsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ExperimentsClient::listLocationsAsync()} . - * - * @example samples/V3/ExperimentsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/FlowsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/FlowsClient.php deleted file mode 100644 index 2a330ed2d8f5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/FlowsClient.php +++ /dev/null @@ -1,920 +0,0 @@ - createFlowAsync(CreateFlowRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteFlowAsync(DeleteFlowRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportFlowAsync(ExportFlowRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFlowAsync(GetFlowRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFlowValidationResultAsync(GetFlowValidationResultRequest $request, array $optionalArgs = []) - * @method PromiseInterface importFlowAsync(ImportFlowRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFlowsAsync(ListFlowsRequest $request, array $optionalArgs = []) - * @method PromiseInterface trainFlowAsync(TrainFlowRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateFlowAsync(UpdateFlowRequest $request, array $optionalArgs = []) - * @method PromiseInterface validateFlowAsync(ValidateFlowRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class FlowsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Flows'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/flows_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/flows_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/flows_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/flows_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a flow - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * - * @return string The formatted flow resource. - */ - public static function flowName(string $project, string $location, string $agent, string $flow): string - { - return self::getPathTemplate('flow')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * flow_validation_result resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * - * @return string The formatted flow_validation_result resource. - */ - public static function flowValidationResultName(string $project, string $location, string $agent, string $flow): string - { - return self::getPathTemplate('flowValidationResult')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a generator - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $generator - * - * @return string The formatted generator resource. - */ - public static function generatorName(string $project, string $location, string $agent, string $generator): string - { - return self::getPathTemplate('generator')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'generator' => $generator, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a intent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $intent - * - * @return string The formatted intent resource. - */ - public static function intentName(string $project, string $location, string $agent, string $intent): string - { - return self::getPathTemplate('intent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'intent' => $intent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a page - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $page - * - * @return string The formatted page resource. - */ - public static function pageName(string $project, string $location, string $agent, string $flow, string $page): string - { - return self::getPathTemplate('page')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'page' => $page, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a playbook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $playbook - * - * @return string The formatted playbook resource. - */ - public static function playbookName(string $project, string $location, string $agent, string $playbook): string - { - return self::getPathTemplate('playbook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'playbook' => $playbook, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_flow_transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $transitionRouteGroup - * - * @return string The formatted project_location_agent_flow_transition_route_group resource. - */ - public static function projectLocationAgentFlowTransitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string - { - return self::getPathTemplate('projectLocationAgentFlowTransitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $transitionRouteGroup - * - * @return string The formatted project_location_agent_transition_route_group resource. - */ - public static function projectLocationAgentTransitionRouteGroupName(string $project, string $location, string $agent, string $transitionRouteGroup): string - { - return self::getPathTemplate('projectLocationAgentTransitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tool - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $tool - * - * @return string The formatted tool resource. - */ - public static function toolName(string $project, string $location, string $agent, string $tool): string - { - return self::getPathTemplate('tool')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'tool' => $tool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $transitionRouteGroup - * - * @return string The formatted transition_route_group resource. - */ - public static function transitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string - { - return self::getPathTemplate('transitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a webhook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $webhook - * - * @return string The formatted webhook resource. - */ - public static function webhookName(string $project, string $location, string $agent, string $webhook): string - { - return self::getPathTemplate('webhook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'webhook' => $webhook, - ]); - } - - /** - * 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}/locations/{location}/agents/{agent} - * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} - * - flowValidationResult: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult - * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} - * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} - * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} - * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} - * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} - * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} - * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} - * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} - * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\FlowsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new FlowsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a flow in the specified agent. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see FlowsClient::createFlowAsync()} . - * - * @example samples/V3/FlowsClient/create_flow.php - * - * @param CreateFlowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Flow - * - * @throws ApiException Thrown if the API call fails. - */ - public function createFlow(CreateFlowRequest $request, array $callOptions = []): Flow - { - return $this->startApiCall('CreateFlow', $request, $callOptions)->wait(); - } - - /** - * Deletes a specified flow. - * - * The async variant is {@see FlowsClient::deleteFlowAsync()} . - * - * @example samples/V3/FlowsClient/delete_flow.php - * - * @param DeleteFlowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteFlow(DeleteFlowRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteFlow', $request, $callOptions)->wait(); - } - - /** - * Exports the specified flow to a binary file. - * - * 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`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: - * [ExportFlowResponse][google.cloud.dialogflow.cx.v3.ExportFlowResponse] - * - * Note that resources (e.g. intents, entities, webhooks) that the flow - * references will also be exported. - * - * The async variant is {@see FlowsClient::exportFlowAsync()} . - * - * @example samples/V3/FlowsClient/export_flow.php - * - * @param ExportFlowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportFlow(ExportFlowRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportFlow', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified flow. - * - * The async variant is {@see FlowsClient::getFlowAsync()} . - * - * @example samples/V3/FlowsClient/get_flow.php - * - * @param GetFlowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Flow - * - * @throws ApiException Thrown if the API call fails. - */ - public function getFlow(GetFlowRequest $request, array $callOptions = []): Flow - { - return $this->startApiCall('GetFlow', $request, $callOptions)->wait(); - } - - /** - * Gets the latest flow validation result. Flow validation is performed - * when ValidateFlow is called. - * - * The async variant is {@see FlowsClient::getFlowValidationResultAsync()} . - * - * @example samples/V3/FlowsClient/get_flow_validation_result.php - * - * @param GetFlowValidationResultRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FlowValidationResult - * - * @throws ApiException Thrown if the API call fails. - */ - public function getFlowValidationResult(GetFlowValidationResultRequest $request, array $callOptions = []): FlowValidationResult - { - return $this->startApiCall('GetFlowValidationResult', $request, $callOptions)->wait(); - } - - /** - * Imports the specified flow to the specified agent from a binary file. - * - * 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`: An empty [Struct - * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) - * - `response`: - * [ImportFlowResponse][google.cloud.dialogflow.cx.v3.ImportFlowResponse] - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see FlowsClient::importFlowAsync()} . - * - * @example samples/V3/FlowsClient/import_flow.php - * - * @param ImportFlowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importFlow(ImportFlowRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportFlow', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all flows in the specified agent. - * - * The async variant is {@see FlowsClient::listFlowsAsync()} . - * - * @example samples/V3/FlowsClient/list_flows.php - * - * @param ListFlowsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listFlows(ListFlowsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFlows', $request, $callOptions); - } - - /** - * Trains the specified flow. Note that only the flow in 'draft' environment - * is trained. - * - * 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`: 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 a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see FlowsClient::trainFlowAsync()} . - * - * @example samples/V3/FlowsClient/train_flow.php - * - * @param TrainFlowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function trainFlow(TrainFlowRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('TrainFlow', $request, $callOptions)->wait(); - } - - /** - * Updates the specified flow. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see FlowsClient::updateFlowAsync()} . - * - * @example samples/V3/FlowsClient/update_flow.php - * - * @param UpdateFlowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Flow - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateFlow(UpdateFlowRequest $request, array $callOptions = []): Flow - { - return $this->startApiCall('UpdateFlow', $request, $callOptions)->wait(); - } - - /** - * Validates the specified flow and creates or updates validation results. - * Please call this API after the training is completed to get the complete - * validation results. - * - * The async variant is {@see FlowsClient::validateFlowAsync()} . - * - * @example samples/V3/FlowsClient/validate_flow.php - * - * @param ValidateFlowRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FlowValidationResult - * - * @throws ApiException Thrown if the API call fails. - */ - public function validateFlow(ValidateFlowRequest $request, array $callOptions = []): FlowValidationResult - { - return $this->startApiCall('ValidateFlow', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see FlowsClient::getLocationAsync()} . - * - * @example samples/V3/FlowsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see FlowsClient::listLocationsAsync()} . - * - * @example samples/V3/FlowsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/GeneratorsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/GeneratorsClient.php deleted file mode 100644 index f833a67188dd..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/GeneratorsClient.php +++ /dev/null @@ -1,446 +0,0 @@ - createGeneratorAsync(CreateGeneratorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGeneratorAsync(DeleteGeneratorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGeneratorAsync(GetGeneratorRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGeneratorsAsync(ListGeneratorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGeneratorAsync(UpdateGeneratorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class GeneratorsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Generators'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/generators_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/generators_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/generators_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/generators_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a generator - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $generator - * - * @return string The formatted generator resource. - */ - public static function generatorName(string $project, string $location, string $agent, string $generator): string - { - return self::getPathTemplate('generator')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'generator' => $generator, - ]); - } - - /** - * 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}/locations/{location}/agents/{agent} - * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\GeneratorsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new GeneratorsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a generator in the specified agent. - * - * The async variant is {@see GeneratorsClient::createGeneratorAsync()} . - * - * @example samples/V3/GeneratorsClient/create_generator.php - * - * @param CreateGeneratorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Generator - * - * @throws ApiException Thrown if the API call fails. - */ - public function createGenerator(CreateGeneratorRequest $request, array $callOptions = []): Generator - { - return $this->startApiCall('CreateGenerator', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified generators. - * - * The async variant is {@see GeneratorsClient::deleteGeneratorAsync()} . - * - * @example samples/V3/GeneratorsClient/delete_generator.php - * - * @param DeleteGeneratorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteGenerator(DeleteGeneratorRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteGenerator', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified generator. - * - * The async variant is {@see GeneratorsClient::getGeneratorAsync()} . - * - * @example samples/V3/GeneratorsClient/get_generator.php - * - * @param GetGeneratorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Generator - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGenerator(GetGeneratorRequest $request, array $callOptions = []): Generator - { - return $this->startApiCall('GetGenerator', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all generators in the specified agent. - * - * The async variant is {@see GeneratorsClient::listGeneratorsAsync()} . - * - * @example samples/V3/GeneratorsClient/list_generators.php - * - * @param ListGeneratorsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listGenerators(ListGeneratorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGenerators', $request, $callOptions); - } - - /** - * Update the specified generator. - * - * The async variant is {@see GeneratorsClient::updateGeneratorAsync()} . - * - * @example samples/V3/GeneratorsClient/update_generator.php - * - * @param UpdateGeneratorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Generator - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGenerator(UpdateGeneratorRequest $request, array $callOptions = []): Generator - { - return $this->startApiCall('UpdateGenerator', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see GeneratorsClient::getLocationAsync()} . - * - * @example samples/V3/GeneratorsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see GeneratorsClient::listLocationsAsync()} . - * - * @example samples/V3/GeneratorsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/IntentsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/IntentsClient.php deleted file mode 100644 index f56cce28a966..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/IntentsClient.php +++ /dev/null @@ -1,612 +0,0 @@ - createIntentAsync(CreateIntentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteIntentAsync(DeleteIntentRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportIntentsAsync(ExportIntentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIntentAsync(GetIntentRequest $request, array $optionalArgs = []) - * @method PromiseInterface importIntentsAsync(ImportIntentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIntentsAsync(ListIntentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateIntentAsync(UpdateIntentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class IntentsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Intents'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 $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', - ], - ], - ]; - } - - /** - * 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 = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entity_type - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $entityType - * - * @return string The formatted entity_type resource. - */ - public static function entityTypeName(string $project, string $location, string $agent, string $entityType): string - { - return self::getPathTemplate('entityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a intent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $intent - * - * @return string The formatted intent resource. - */ - public static function intentName(string $project, string $location, string $agent, string $intent): string - { - return self::getPathTemplate('intent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - '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}/locations/{location}/agents/{agent} - * - entityType: projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type} - * - intent: projects/{project}/locations/{location}/agents/{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(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\IntentsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new IntentsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an intent in the specified agent. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see IntentsClient::createIntentAsync()} . - * - * @example samples/V3/IntentsClient/create_intent.php - * - * @param CreateIntentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Intent - * - * @throws ApiException Thrown if the API call fails. - */ - public function createIntent(CreateIntentRequest $request, array $callOptions = []): Intent - { - return $this->startApiCall('CreateIntent', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified intent. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see IntentsClient::deleteIntentAsync()} . - * - * @example samples/V3/IntentsClient/delete_intent.php - * - * @param DeleteIntentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteIntent(DeleteIntentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteIntent', $request, $callOptions)->wait(); - } - - /** - * Exports the selected intents. - * - * 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`: - * [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3.ExportIntentsMetadata] - * - `response`: - * [ExportIntentsResponse][google.cloud.dialogflow.cx.v3.ExportIntentsResponse] - * - * The async variant is {@see IntentsClient::exportIntentsAsync()} . - * - * @example samples/V3/IntentsClient/export_intents.php - * - * @param ExportIntentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportIntents(ExportIntentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportIntents', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified intent. - * - * The async variant is {@see IntentsClient::getIntentAsync()} . - * - * @example samples/V3/IntentsClient/get_intent.php - * - * @param GetIntentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Intent - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIntent(GetIntentRequest $request, array $callOptions = []): Intent - { - return $this->startApiCall('GetIntent', $request, $callOptions)->wait(); - } - - /** - * Imports the specified intents into the agent. - * - * 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`: - * [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3.ImportIntentsMetadata] - * - `response`: - * [ImportIntentsResponse][google.cloud.dialogflow.cx.v3.ImportIntentsResponse] - * - * The async variant is {@see IntentsClient::importIntentsAsync()} . - * - * @example samples/V3/IntentsClient/import_intents.php - * - * @param ImportIntentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importIntents(ImportIntentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportIntents', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all intents in the specified agent. - * - * The async variant is {@see IntentsClient::listIntentsAsync()} . - * - * @example samples/V3/IntentsClient/list_intents.php - * - * @param ListIntentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listIntents(ListIntentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIntents', $request, $callOptions); - } - - /** - * Updates the specified intent. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see IntentsClient::updateIntentAsync()} . - * - * @example samples/V3/IntentsClient/update_intent.php - * - * @param UpdateIntentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Intent - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateIntent(UpdateIntentRequest $request, array $callOptions = []): Intent - { - return $this->startApiCall('UpdateIntent', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see IntentsClient::getLocationAsync()} . - * - * @example samples/V3/IntentsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see IntentsClient::listLocationsAsync()} . - * - * @example samples/V3/IntentsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PagesClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PagesClient.php deleted file mode 100644 index 0296fab824e2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/PagesClient.php +++ /dev/null @@ -1,664 +0,0 @@ - createPageAsync(CreatePageRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePageAsync(DeletePageRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPageAsync(GetPageRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPagesAsync(ListPagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePageAsync(UpdatePageRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class PagesClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Pages'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/pages_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/pages_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/pages_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/pages_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a entity_type - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $entityType - * - * @return string The formatted entity_type resource. - */ - public static function entityTypeName(string $project, string $location, string $agent, string $entityType): string - { - return self::getPathTemplate('entityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a flow - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * - * @return string The formatted flow resource. - */ - public static function flowName(string $project, string $location, string $agent, string $flow): string - { - return self::getPathTemplate('flow')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a generator - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $generator - * - * @return string The formatted generator resource. - */ - public static function generatorName(string $project, string $location, string $agent, string $generator): string - { - return self::getPathTemplate('generator')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'generator' => $generator, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a intent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $intent - * - * @return string The formatted intent resource. - */ - public static function intentName(string $project, string $location, string $agent, string $intent): string - { - return self::getPathTemplate('intent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'intent' => $intent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a page - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $page - * - * @return string The formatted page resource. - */ - public static function pageName(string $project, string $location, string $agent, string $flow, string $page): string - { - return self::getPathTemplate('page')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'page' => $page, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a playbook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $playbook - * - * @return string The formatted playbook resource. - */ - public static function playbookName(string $project, string $location, string $agent, string $playbook): string - { - return self::getPathTemplate('playbook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'playbook' => $playbook, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_flow_transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $transitionRouteGroup - * - * @return string The formatted project_location_agent_flow_transition_route_group resource. - */ - public static function projectLocationAgentFlowTransitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string - { - return self::getPathTemplate('projectLocationAgentFlowTransitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $transitionRouteGroup - * - * @return string The formatted project_location_agent_transition_route_group resource. - */ - public static function projectLocationAgentTransitionRouteGroupName(string $project, string $location, string $agent, string $transitionRouteGroup): string - { - return self::getPathTemplate('projectLocationAgentTransitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tool - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $tool - * - * @return string The formatted tool resource. - */ - public static function toolName(string $project, string $location, string $agent, string $tool): string - { - return self::getPathTemplate('tool')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'tool' => $tool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $transitionRouteGroup - * - * @return string The formatted transition_route_group resource. - */ - public static function transitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string - { - return self::getPathTemplate('transitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a webhook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $webhook - * - * @return string The formatted webhook resource. - */ - public static function webhookName(string $project, string $location, string $agent, string $webhook): string - { - return self::getPathTemplate('webhook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'webhook' => $webhook, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - entityType: projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type} - * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} - * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} - * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} - * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} - * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} - * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} - * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} - * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} - * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} - * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\PagesClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new PagesClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a page in the specified flow. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see PagesClient::createPageAsync()} . - * - * @example samples/V3/PagesClient/create_page.php - * - * @param CreatePageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Page - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPage(CreatePageRequest $request, array $callOptions = []): Page - { - return $this->startApiCall('CreatePage', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified page. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see PagesClient::deletePageAsync()} . - * - * @example samples/V3/PagesClient/delete_page.php - * - * @param DeletePageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePage(DeletePageRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeletePage', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified page. - * - * The async variant is {@see PagesClient::getPageAsync()} . - * - * @example samples/V3/PagesClient/get_page.php - * - * @param GetPageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Page - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPage(GetPageRequest $request, array $callOptions = []): Page - { - return $this->startApiCall('GetPage', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all pages in the specified flow. - * - * The async variant is {@see PagesClient::listPagesAsync()} . - * - * @example samples/V3/PagesClient/list_pages.php - * - * @param ListPagesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPages(ListPagesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPages', $request, $callOptions); - } - - /** - * Updates the specified page. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is {@see PagesClient::updatePageAsync()} . - * - * @example samples/V3/PagesClient/update_page.php - * - * @param UpdatePageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Page - * - * @throws ApiException Thrown if the API call fails. - */ - public function updatePage(UpdatePageRequest $request, array $callOptions = []): Page - { - return $this->startApiCall('UpdatePage', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see PagesClient::getLocationAsync()} . - * - * @example samples/V3/PagesClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see PagesClient::listLocationsAsync()} . - * - * @example samples/V3/PagesClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SecuritySettingsServiceClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SecuritySettingsServiceClient.php deleted file mode 100644 index 4af557707106..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SecuritySettingsServiceClient.php +++ /dev/null @@ -1,572 +0,0 @@ - createSecuritySettingsAsync(CreateSecuritySettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSecuritySettingsAsync(DeleteSecuritySettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSecuritySettingsAsync(GetSecuritySettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSecuritySettingsAsync(ListSecuritySettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSecuritySettingsAsync(UpdateSecuritySettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class SecuritySettingsServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.SecuritySettingsService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/security_settings_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/security_settings_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/security_settings_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/security_settings_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * deidentify_template resource. - * - * @param string $organization - * @param string $location - * @param string $deidentifyTemplate - * - * @return string The formatted deidentify_template resource. - */ - public static function deidentifyTemplateName(string $organization, string $location, string $deidentifyTemplate): string - { - return self::getPathTemplate('deidentifyTemplate')->render([ - 'organization' => $organization, - 'location' => $location, - 'deidentify_template' => $deidentifyTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * inspect_template resource. - * - * @param string $organization - * @param string $location - * @param string $inspectTemplate - * - * @return string The formatted inspect_template resource. - */ - public static function inspectTemplateName(string $organization, string $location, string $inspectTemplate): string - { - return self::getPathTemplate('inspectTemplate')->render([ - 'organization' => $organization, - 'location' => $location, - 'inspect_template' => $inspectTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_deidentify_template resource. - * - * @param string $organization - * @param string $location - * @param string $deidentifyTemplate - * - * @return string The formatted organization_location_deidentify_template resource. - */ - public static function organizationLocationDeidentifyTemplateName(string $organization, string $location, string $deidentifyTemplate): string - { - return self::getPathTemplate('organizationLocationDeidentifyTemplate')->render([ - 'organization' => $organization, - 'location' => $location, - 'deidentify_template' => $deidentifyTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_inspect_template resource. - * - * @param string $organization - * @param string $location - * @param string $inspectTemplate - * - * @return string The formatted organization_location_inspect_template resource. - */ - public static function organizationLocationInspectTemplateName(string $organization, string $location, string $inspectTemplate): string - { - return self::getPathTemplate('organizationLocationInspectTemplate')->render([ - 'organization' => $organization, - 'location' => $location, - 'inspect_template' => $inspectTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_deidentify_template resource. - * - * @param string $project - * @param string $location - * @param string $deidentifyTemplate - * - * @return string The formatted project_location_deidentify_template resource. - */ - public static function projectLocationDeidentifyTemplateName(string $project, string $location, string $deidentifyTemplate): string - { - return self::getPathTemplate('projectLocationDeidentifyTemplate')->render([ - 'project' => $project, - 'location' => $location, - 'deidentify_template' => $deidentifyTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_inspect_template resource. - * - * @param string $project - * @param string $location - * @param string $inspectTemplate - * - * @return string The formatted project_location_inspect_template resource. - */ - public static function projectLocationInspectTemplateName(string $project, string $location, string $inspectTemplate): string - { - return self::getPathTemplate('projectLocationInspectTemplate')->render([ - 'project' => $project, - 'location' => $location, - 'inspect_template' => $inspectTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * security_settings resource. - * - * @param string $project - * @param string $location - * @param string $securitySettings - * - * @return string The formatted security_settings resource. - */ - public static function securitySettingsName(string $project, string $location, string $securitySettings): string - { - return self::getPathTemplate('securitySettings')->render([ - 'project' => $project, - 'location' => $location, - 'security_settings' => $securitySettings, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - deidentifyTemplate: organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template} - * - inspectTemplate: organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template} - * - location: projects/{project}/locations/{location} - * - organizationLocationDeidentifyTemplate: organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template} - * - organizationLocationInspectTemplate: organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template} - * - projectLocationDeidentifyTemplate: projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template} - * - projectLocationInspectTemplate: projects/{project}/locations/{location}/inspectTemplates/{inspect_template} - * - securitySettings: projects/{project}/locations/{location}/securitySettings/{security_settings} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\SecuritySettingsServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new SecuritySettingsServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Create security settings in the specified location. - * - * The async variant is - * {@see SecuritySettingsServiceClient::createSecuritySettingsAsync()} . - * - * @example samples/V3/SecuritySettingsServiceClient/create_security_settings.php - * - * @param CreateSecuritySettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SecuritySettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSecuritySettings(CreateSecuritySettingsRequest $request, array $callOptions = []): SecuritySettings - { - return $this->startApiCall('CreateSecuritySettings', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. - * - * The async variant is - * {@see SecuritySettingsServiceClient::deleteSecuritySettingsAsync()} . - * - * @example samples/V3/SecuritySettingsServiceClient/delete_security_settings.php - * - * @param DeleteSecuritySettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSecuritySettings(DeleteSecuritySettingsRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSecuritySettings', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. The - * returned settings may be stale by up to 1 minute. - * - * The async variant is - * {@see SecuritySettingsServiceClient::getSecuritySettingsAsync()} . - * - * @example samples/V3/SecuritySettingsServiceClient/get_security_settings.php - * - * @param GetSecuritySettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SecuritySettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSecuritySettings(GetSecuritySettingsRequest $request, array $callOptions = []): SecuritySettings - { - return $this->startApiCall('GetSecuritySettings', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all security settings in the specified location. - * - * The async variant is - * {@see SecuritySettingsServiceClient::listSecuritySettingsAsync()} . - * - * @example samples/V3/SecuritySettingsServiceClient/list_security_settings.php - * - * @param ListSecuritySettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSecuritySettings(ListSecuritySettingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSecuritySettings', $request, $callOptions); - } - - /** - * Updates the specified - * [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. - * - * The async variant is - * {@see SecuritySettingsServiceClient::updateSecuritySettingsAsync()} . - * - * @example samples/V3/SecuritySettingsServiceClient/update_security_settings.php - * - * @param UpdateSecuritySettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SecuritySettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSecuritySettings(UpdateSecuritySettingsRequest $request, array $callOptions = []): SecuritySettings - { - return $this->startApiCall('UpdateSecuritySettings', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see SecuritySettingsServiceClient::getLocationAsync()} . - * - * @example samples/V3/SecuritySettingsServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see SecuritySettingsServiceClient::listLocationsAsync()} - * . - * - * @example samples/V3/SecuritySettingsServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionEntityTypesClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionEntityTypesClient.php deleted file mode 100644 index 096686c892f3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionEntityTypesClient.php +++ /dev/null @@ -1,552 +0,0 @@ - createSessionEntityTypeAsync(CreateSessionEntityTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSessionEntityTypeAsync(DeleteSessionEntityTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSessionEntityTypeAsync(GetSessionEntityTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSessionEntityTypesAsync(ListSessionEntityTypesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSessionEntityTypeAsync(UpdateSessionEntityTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class SessionEntityTypesClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.SessionEntityTypes'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 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', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_environment_session resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * @param string $session - * - * @return string The formatted project_location_agent_environment_session resource. - */ - public static function projectLocationAgentEnvironmentSessionName(string $project, string $location, string $agent, string $environment, string $session): string - { - return self::getPathTemplate('projectLocationAgentEnvironmentSession')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_environment_session_entity_type resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * @param string $session - * @param string $entityType - * - * @return string The formatted project_location_agent_environment_session_entity_type resource. - */ - public static function projectLocationAgentEnvironmentSessionEntityTypeName(string $project, string $location, string $agent, string $environment, string $session, string $entityType): string - { - return self::getPathTemplate('projectLocationAgentEnvironmentSessionEntityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - 'session' => $session, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_session resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $session - * - * @return string The formatted project_location_agent_session resource. - */ - public static function projectLocationAgentSessionName(string $project, string $location, string $agent, string $session): string - { - return self::getPathTemplate('projectLocationAgentSession')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_session_entity_type resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $session - * @param string $entityType - * - * @return string The formatted project_location_agent_session_entity_type resource. - */ - public static function projectLocationAgentSessionEntityTypeName(string $project, string $location, string $agent, string $session, string $entityType): string - { - return self::getPathTemplate('projectLocationAgentSessionEntityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'session' => $session, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a session - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $session - * - * @return string The formatted session resource. - */ - public static function sessionName(string $project, string $location, string $agent, string $session): string - { - return self::getPathTemplate('session')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * session_entity_type resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $session - * @param string $entityType - * - * @return string The formatted session_entity_type resource. - */ - public static function sessionEntityTypeName(string $project, string $location, string $agent, string $session, string $entityType): string - { - return self::getPathTemplate('sessionEntityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - '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 - * - projectLocationAgentEnvironmentSession: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session} - * - projectLocationAgentEnvironmentSessionEntityType: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type} - * - projectLocationAgentSession: projects/{project}/locations/{location}/agents/{agent}/sessions/{session} - * - projectLocationAgentSessionEntityType: projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type} - * - session: projects/{project}/locations/{location}/agents/{agent}/sessions/{session} - * - sessionEntityType: projects/{project}/locations/{location}/agents/{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(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\SessionEntityTypesClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new SessionEntityTypesClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a session entity type. - * - * The async variant is - * {@see SessionEntityTypesClient::createSessionEntityTypeAsync()} . - * - * @example samples/V3/SessionEntityTypesClient/create_session_entity_type.php - * - * @param CreateSessionEntityTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SessionEntityType - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSessionEntityType(CreateSessionEntityTypeRequest $request, array $callOptions = []): SessionEntityType - { - return $this->startApiCall('CreateSessionEntityType', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified session entity type. - * - * The async variant is - * {@see SessionEntityTypesClient::deleteSessionEntityTypeAsync()} . - * - * @example samples/V3/SessionEntityTypesClient/delete_session_entity_type.php - * - * @param DeleteSessionEntityTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSessionEntityType(DeleteSessionEntityTypeRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSessionEntityType', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified session entity type. - * - * The async variant is - * {@see SessionEntityTypesClient::getSessionEntityTypeAsync()} . - * - * @example samples/V3/SessionEntityTypesClient/get_session_entity_type.php - * - * @param GetSessionEntityTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SessionEntityType - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSessionEntityType(GetSessionEntityTypeRequest $request, array $callOptions = []): SessionEntityType - { - return $this->startApiCall('GetSessionEntityType', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all session entity types in the specified session. - * - * The async variant is - * {@see SessionEntityTypesClient::listSessionEntityTypesAsync()} . - * - * @example samples/V3/SessionEntityTypesClient/list_session_entity_types.php - * - * @param ListSessionEntityTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSessionEntityTypes(ListSessionEntityTypesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSessionEntityTypes', $request, $callOptions); - } - - /** - * Updates the specified session entity type. - * - * The async variant is - * {@see SessionEntityTypesClient::updateSessionEntityTypeAsync()} . - * - * @example samples/V3/SessionEntityTypesClient/update_session_entity_type.php - * - * @param UpdateSessionEntityTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SessionEntityType - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSessionEntityType(UpdateSessionEntityTypeRequest $request, array $callOptions = []): SessionEntityType - { - return $this->startApiCall('UpdateSessionEntityType', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see SessionEntityTypesClient::getLocationAsync()} . - * - * @example samples/V3/SessionEntityTypesClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see SessionEntityTypesClient::listLocationsAsync()} . - * - * @example samples/V3/SessionEntityTypesClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionsClient.php deleted file mode 100644 index 7becb36bc0f9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/SessionsClient.php +++ /dev/null @@ -1,814 +0,0 @@ - detectIntentAsync(DetectIntentRequest $request, array $optionalArgs = []) - * @method PromiseInterface fulfillIntentAsync(FulfillIntentRequest $request, array $optionalArgs = []) - * @method PromiseInterface matchIntentAsync(MatchIntentRequest $request, array $optionalArgs = []) - * @method PromiseInterface submitAnswerFeedbackAsync(SubmitAnswerFeedbackRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class SessionsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Sessions'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 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', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a data_store - * resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted data_store resource. - */ - public static function dataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('dataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entity_type - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $entityType - * - * @return string The formatted entity_type resource. - */ - public static function entityTypeName(string $project, string $location, string $agent, string $entityType): string - { - return self::getPathTemplate('entityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a intent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $intent - * - * @return string The formatted intent resource. - */ - public static function intentName(string $project, string $location, string $agent, string $intent): string - { - return self::getPathTemplate('intent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'intent' => $intent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a page - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $page - * - * @return string The formatted page resource. - */ - public static function pageName(string $project, string $location, string $agent, string $flow, string $page): string - { - return self::getPathTemplate('page')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'page' => $page, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a playbook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $playbook - * - * @return string The formatted playbook resource. - */ - public static function playbookName(string $project, string $location, string $agent, string $playbook): string - { - return self::getPathTemplate('playbook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'playbook' => $playbook, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_environment_session resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * @param string $session - * - * @return string The formatted project_location_agent_environment_session resource. - */ - public static function projectLocationAgentEnvironmentSessionName(string $project, string $location, string $agent, string $environment, string $session): string - { - return self::getPathTemplate('projectLocationAgentEnvironmentSession')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_environment_session_entity_type resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * @param string $session - * @param string $entityType - * - * @return string The formatted project_location_agent_environment_session_entity_type resource. - */ - public static function projectLocationAgentEnvironmentSessionEntityTypeName(string $project, string $location, string $agent, string $environment, string $session, string $entityType): string - { - return self::getPathTemplate('projectLocationAgentEnvironmentSessionEntityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - 'session' => $session, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_session resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $session - * - * @return string The formatted project_location_agent_session resource. - */ - public static function projectLocationAgentSessionName(string $project, string $location, string $agent, string $session): string - { - return self::getPathTemplate('projectLocationAgentSession')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_session_entity_type resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $session - * @param string $entityType - * - * @return string The formatted project_location_agent_session_entity_type resource. - */ - public static function projectLocationAgentSessionEntityTypeName(string $project, string $location, string $agent, string $session, string $entityType): string - { - return self::getPathTemplate('projectLocationAgentSessionEntityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'session' => $session, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_collection_data_store resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataStore - * - * @return string The formatted project_location_collection_data_store resource. - */ - public static function projectLocationCollectionDataStoreName(string $project, string $location, string $collection, string $dataStore): string - { - return self::getPathTemplate('projectLocationCollectionDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_data_store resource. - * - * @param string $project - * @param string $location - * @param string $dataStore - * - * @return string The formatted project_location_data_store resource. - */ - public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string - { - return self::getPathTemplate('projectLocationDataStore')->render([ - 'project' => $project, - 'location' => $location, - 'data_store' => $dataStore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a session - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $session - * - * @return string The formatted session resource. - */ - public static function sessionName(string $project, string $location, string $agent, string $session): string - { - return self::getPathTemplate('session')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * session_entity_type resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $session - * @param string $entityType - * - * @return string The formatted session_entity_type resource. - */ - public static function sessionEntityTypeName(string $project, string $location, string $agent, string $session, string $entityType): string - { - return self::getPathTemplate('sessionEntityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'session' => $session, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tool - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $tool - * - * @return string The formatted tool resource. - */ - public static function toolName(string $project, string $location, string $agent, string $tool): string - { - return self::getPathTemplate('tool')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'tool' => $tool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a version - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $version - * - * @return string The formatted version resource. - */ - public static function versionName(string $project, string $location, string $agent, string $flow, string $version): string - { - return self::getPathTemplate('version')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - '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}/locations/{location}/agents/{agent} - * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - entityType: projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type} - * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} - * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} - * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} - * - projectLocationAgentEnvironmentSession: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session} - * - projectLocationAgentEnvironmentSessionEntityType: projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type} - * - projectLocationAgentSession: projects/{project}/locations/{location}/agents/{agent}/sessions/{session} - * - projectLocationAgentSessionEntityType: projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type} - * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} - * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} - * - session: projects/{project}/locations/{location}/agents/{agent}/sessions/{session} - * - sessionEntityType: projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type} - * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} - * - version: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/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(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\SessionsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new SessionsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Processes a natural language query and returns structured, actionable data - * as a result. This method is not idempotent, because it may cause session - * entity types to be updated, which in turn might affect results of future - * queries. - * - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). - * - * The async variant is {@see SessionsClient::detectIntentAsync()} . - * - * @example samples/V3/SessionsClient/detect_intent.php - * - * @param DetectIntentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DetectIntentResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function detectIntent(DetectIntentRequest $request, array $callOptions = []): DetectIntentResponse - { - return $this->startApiCall('DetectIntent', $request, $callOptions)->wait(); - } - - /** - * Fulfills a matched intent returned by - * [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent]. Must be - * called after - * [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent], with - * input from - * [MatchIntentResponse][google.cloud.dialogflow.cx.v3.MatchIntentResponse]. - * Otherwise, the behavior is undefined. - * - * The async variant is {@see SessionsClient::fulfillIntentAsync()} . - * - * @example samples/V3/SessionsClient/fulfill_intent.php - * - * @param FulfillIntentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FulfillIntentResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function fulfillIntent(FulfillIntentRequest $request, array $callOptions = []): FulfillIntentResponse - { - return $this->startApiCall('FulfillIntent', $request, $callOptions)->wait(); - } - - /** - * Returns preliminary intent match results, doesn't change the session - * status. - * - * The async variant is {@see SessionsClient::matchIntentAsync()} . - * - * @example samples/V3/SessionsClient/match_intent.php - * - * @param MatchIntentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MatchIntentResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function matchIntent(MatchIntentRequest $request, array $callOptions = []): MatchIntentResponse - { - return $this->startApiCall('MatchIntent', $request, $callOptions)->wait(); - } - - /** - * Processes a natural language query and returns structured, actionable data - * as a result through server-side streaming. Server-side streaming allows - * Dialogflow to send [partial - * responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) - * earlier in a single request. - * - * @example samples/V3/SessionsClient/server_streaming_detect_intent.php - * - * @param DetectIntentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function serverStreamingDetectIntent(DetectIntentRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('ServerStreamingDetectIntent', $request, $callOptions); - } - - /** - * 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). - * - * Note: Always use agent versions for production traffic. - * See [Versions and - * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). - * - * @example samples/V3/SessionsClient/streaming_detect_intent.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function streamingDetectIntent(array $callOptions = []): BidiStream - { - return $this->startApiCall('StreamingDetectIntent', null, $callOptions); - } - - /** - * Updates the feedback received from the user for a single turn of the bot - * response. - * - * The async variant is {@see SessionsClient::submitAnswerFeedbackAsync()} . - * - * @example samples/V3/SessionsClient/submit_answer_feedback.php - * - * @param SubmitAnswerFeedbackRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AnswerFeedback - * - * @throws ApiException Thrown if the API call fails. - */ - public function submitAnswerFeedback(SubmitAnswerFeedbackRequest $request, array $callOptions = []): AnswerFeedback - { - return $this->startApiCall('SubmitAnswerFeedback', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see SessionsClient::getLocationAsync()} . - * - * @example samples/V3/SessionsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see SessionsClient::listLocationsAsync()} . - * - * @example samples/V3/SessionsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TestCasesClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TestCasesClient.php deleted file mode 100644 index 04a7add718aa..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TestCasesClient.php +++ /dev/null @@ -1,1041 +0,0 @@ - batchDeleteTestCasesAsync(BatchDeleteTestCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchRunTestCasesAsync(BatchRunTestCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface calculateCoverageAsync(CalculateCoverageRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTestCaseAsync(CreateTestCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportTestCasesAsync(ExportTestCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTestCaseAsync(GetTestCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTestCaseResultAsync(GetTestCaseResultRequest $request, array $optionalArgs = []) - * @method PromiseInterface importTestCasesAsync(ImportTestCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTestCaseResultsAsync(ListTestCaseResultsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTestCasesAsync(ListTestCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface runTestCaseAsync(RunTestCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTestCaseAsync(UpdateTestCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class TestCasesClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.TestCases'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/test_cases_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/test_cases_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/test_cases_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/test_cases_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entity_type - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $entityType - * - * @return string The formatted entity_type resource. - */ - public static function entityTypeName(string $project, string $location, string $agent, string $entityType): string - { - return self::getPathTemplate('entityType')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'entity_type' => $entityType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName(string $project, string $location, string $agent, string $environment): string - { - return self::getPathTemplate('environment')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a flow - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * - * @return string The formatted flow resource. - */ - public static function flowName(string $project, string $location, string $agent, string $flow): string - { - return self::getPathTemplate('flow')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a generator - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $generator - * - * @return string The formatted generator resource. - */ - public static function generatorName(string $project, string $location, string $agent, string $generator): string - { - return self::getPathTemplate('generator')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'generator' => $generator, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a intent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $intent - * - * @return string The formatted intent resource. - */ - public static function intentName(string $project, string $location, string $agent, string $intent): string - { - return self::getPathTemplate('intent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'intent' => $intent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a page - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $page - * - * @return string The formatted page resource. - */ - public static function pageName(string $project, string $location, string $agent, string $flow, string $page): string - { - return self::getPathTemplate('page')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'page' => $page, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a playbook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $playbook - * - * @return string The formatted playbook resource. - */ - public static function playbookName(string $project, string $location, string $agent, string $playbook): string - { - return self::getPathTemplate('playbook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'playbook' => $playbook, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_flow_transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $transitionRouteGroup - * - * @return string The formatted project_location_agent_flow_transition_route_group resource. - */ - public static function projectLocationAgentFlowTransitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string - { - return self::getPathTemplate('projectLocationAgentFlowTransitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $transitionRouteGroup - * - * @return string The formatted project_location_agent_transition_route_group resource. - */ - public static function projectLocationAgentTransitionRouteGroupName(string $project, string $location, string $agent, string $transitionRouteGroup): string - { - return self::getPathTemplate('projectLocationAgentTransitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a test_case - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $testCase - * - * @return string The formatted test_case resource. - */ - public static function testCaseName(string $project, string $location, string $agent, string $testCase): string - { - return self::getPathTemplate('testCase')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'test_case' => $testCase, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * test_case_result resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $testCase - * @param string $result - * - * @return string The formatted test_case_result resource. - */ - public static function testCaseResultName(string $project, string $location, string $agent, string $testCase, string $result): string - { - return self::getPathTemplate('testCaseResult')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'test_case' => $testCase, - 'result' => $result, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tool - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $tool - * - * @return string The formatted tool resource. - */ - public static function toolName(string $project, string $location, string $agent, string $tool): string - { - return self::getPathTemplate('tool')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'tool' => $tool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $transitionRouteGroup - * - * @return string The formatted transition_route_group resource. - */ - public static function transitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string - { - return self::getPathTemplate('transitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a webhook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $webhook - * - * @return string The formatted webhook resource. - */ - public static function webhookName(string $project, string $location, string $agent, string $webhook): string - { - return self::getPathTemplate('webhook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'webhook' => $webhook, - ]); - } - - /** - * 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}/locations/{location}/agents/{agent} - * - entityType: projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type} - * - environment: projects/{project}/locations/{location}/agents/{agent}/environments/{environment} - * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} - * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} - * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} - * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} - * - playbook: projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook} - * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} - * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} - * - testCase: projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case} - * - testCaseResult: projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result} - * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} - * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} - * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\TestCasesClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new TestCasesClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Batch deletes test cases. - * - * The async variant is {@see TestCasesClient::batchDeleteTestCasesAsync()} . - * - * @example samples/V3/TestCasesClient/batch_delete_test_cases.php - * - * @param BatchDeleteTestCasesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchDeleteTestCases(BatchDeleteTestCasesRequest $request, array $callOptions = []): void - { - $this->startApiCall('BatchDeleteTestCases', $request, $callOptions)->wait(); - } - - /** - * Kicks off a batch run of test cases. - * - * 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`: - * [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata] - * - `response`: - * [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse] - * - * The async variant is {@see TestCasesClient::batchRunTestCasesAsync()} . - * - * @example samples/V3/TestCasesClient/batch_run_test_cases.php - * - * @param BatchRunTestCasesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchRunTestCases(BatchRunTestCasesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchRunTestCases', $request, $callOptions)->wait(); - } - - /** - * Calculates the test coverage for an agent. - * - * The async variant is {@see TestCasesClient::calculateCoverageAsync()} . - * - * @example samples/V3/TestCasesClient/calculate_coverage.php - * - * @param CalculateCoverageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CalculateCoverageResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function calculateCoverage(CalculateCoverageRequest $request, array $callOptions = []): CalculateCoverageResponse - { - return $this->startApiCall('CalculateCoverage', $request, $callOptions)->wait(); - } - - /** - * Creates a test case for the given agent. - * - * The async variant is {@see TestCasesClient::createTestCaseAsync()} . - * - * @example samples/V3/TestCasesClient/create_test_case.php - * - * @param CreateTestCaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTestCase(CreateTestCaseRequest $request, array $callOptions = []): TestCase - { - return $this->startApiCall('CreateTestCase', $request, $callOptions)->wait(); - } - - /** - * Exports the test cases under the agent to a Cloud Storage bucket or a local - * file. Filter can be applied to export a subset of test cases. - * - * 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`: - * [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata] - * - `response`: - * [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse] - * - * The async variant is {@see TestCasesClient::exportTestCasesAsync()} . - * - * @example samples/V3/TestCasesClient/export_test_cases.php - * - * @param ExportTestCasesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportTestCases(ExportTestCasesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportTestCases', $request, $callOptions)->wait(); - } - - /** - * Gets a test case. - * - * The async variant is {@see TestCasesClient::getTestCaseAsync()} . - * - * @example samples/V3/TestCasesClient/get_test_case.php - * - * @param GetTestCaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTestCase(GetTestCaseRequest $request, array $callOptions = []): TestCase - { - return $this->startApiCall('GetTestCase', $request, $callOptions)->wait(); - } - - /** - * Gets a test case result. - * - * The async variant is {@see TestCasesClient::getTestCaseResultAsync()} . - * - * @example samples/V3/TestCasesClient/get_test_case_result.php - * - * @param GetTestCaseResultRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestCaseResult - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTestCaseResult(GetTestCaseResultRequest $request, array $callOptions = []): TestCaseResult - { - return $this->startApiCall('GetTestCaseResult', $request, $callOptions)->wait(); - } - - /** - * Imports the test cases from a Cloud Storage bucket or a local file. It - * always creates new test cases and won't overwrite any existing ones. The - * provided ID in the imported test case is neglected. - * - * 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`: - * [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata] - * - `response`: - * [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse] - * - * The async variant is {@see TestCasesClient::importTestCasesAsync()} . - * - * @example samples/V3/TestCasesClient/import_test_cases.php - * - * @param ImportTestCasesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importTestCases(ImportTestCasesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportTestCases', $request, $callOptions)->wait(); - } - - /** - * Fetches the list of run results for the given test case. A maximum of 100 - * results are kept for each test case. - * - * The async variant is {@see TestCasesClient::listTestCaseResultsAsync()} . - * - * @example samples/V3/TestCasesClient/list_test_case_results.php - * - * @param ListTestCaseResultsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTestCaseResults(ListTestCaseResultsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTestCaseResults', $request, $callOptions); - } - - /** - * Fetches a list of test cases for a given agent. - * - * The async variant is {@see TestCasesClient::listTestCasesAsync()} . - * - * @example samples/V3/TestCasesClient/list_test_cases.php - * - * @param ListTestCasesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTestCases(ListTestCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTestCases', $request, $callOptions); - } - - /** - * Kicks off a test case run. - * - * 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`: - * [RunTestCaseMetadata][google.cloud.dialogflow.cx.v3.RunTestCaseMetadata] - * - `response`: - * [RunTestCaseResponse][google.cloud.dialogflow.cx.v3.RunTestCaseResponse] - * - * The async variant is {@see TestCasesClient::runTestCaseAsync()} . - * - * @example samples/V3/TestCasesClient/run_test_case.php - * - * @param RunTestCaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function runTestCase(RunTestCaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RunTestCase', $request, $callOptions)->wait(); - } - - /** - * Updates the specified test case. - * - * The async variant is {@see TestCasesClient::updateTestCaseAsync()} . - * - * @example samples/V3/TestCasesClient/update_test_case.php - * - * @param UpdateTestCaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTestCase(UpdateTestCaseRequest $request, array $callOptions = []): TestCase - { - return $this->startApiCall('UpdateTestCase', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see TestCasesClient::getLocationAsync()} . - * - * @example samples/V3/TestCasesClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see TestCasesClient::listLocationsAsync()} . - * - * @example samples/V3/TestCasesClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TransitionRouteGroupsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TransitionRouteGroupsClient.php deleted file mode 100644 index cabb0527c30b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/TransitionRouteGroupsClient.php +++ /dev/null @@ -1,651 +0,0 @@ - createTransitionRouteGroupAsync(CreateTransitionRouteGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTransitionRouteGroupAsync(DeleteTransitionRouteGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTransitionRouteGroupAsync(GetTransitionRouteGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTransitionRouteGroupsAsync(ListTransitionRouteGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTransitionRouteGroupAsync(UpdateTransitionRouteGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class TransitionRouteGroupsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.TransitionRouteGroups'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/transition_route_groups_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/transition_route_groups_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/transition_route_groups_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/transition_route_groups_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a flow - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * - * @return string The formatted flow resource. - */ - public static function flowName(string $project, string $location, string $agent, string $flow): string - { - return self::getPathTemplate('flow')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a generator - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $generator - * - * @return string The formatted generator resource. - */ - public static function generatorName(string $project, string $location, string $agent, string $generator): string - { - return self::getPathTemplate('generator')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'generator' => $generator, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a intent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $intent - * - * @return string The formatted intent resource. - */ - public static function intentName(string $project, string $location, string $agent, string $intent): string - { - return self::getPathTemplate('intent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'intent' => $intent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a page - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $page - * - * @return string The formatted page resource. - */ - public static function pageName(string $project, string $location, string $agent, string $flow, string $page): string - { - return self::getPathTemplate('page')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'page' => $page, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_flow_transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $transitionRouteGroup - * - * @return string The formatted project_location_agent_flow_transition_route_group resource. - */ - public static function projectLocationAgentFlowTransitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string - { - return self::getPathTemplate('projectLocationAgentFlowTransitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_agent_transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $transitionRouteGroup - * - * @return string The formatted project_location_agent_transition_route_group resource. - */ - public static function projectLocationAgentTransitionRouteGroupName(string $project, string $location, string $agent, string $transitionRouteGroup): string - { - return self::getPathTemplate('projectLocationAgentTransitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tool - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $tool - * - * @return string The formatted tool resource. - */ - public static function toolName(string $project, string $location, string $agent, string $tool): string - { - return self::getPathTemplate('tool')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'tool' => $tool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * transition_route_group resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $transitionRouteGroup - * - * @return string The formatted transition_route_group resource. - */ - public static function transitionRouteGroupName(string $project, string $location, string $agent, string $flow, string $transitionRouteGroup): string - { - return self::getPathTemplate('transitionRouteGroup')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - 'transition_route_group' => $transitionRouteGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a webhook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $webhook - * - * @return string The formatted webhook resource. - */ - public static function webhookName(string $project, string $location, string $agent, string $webhook): string - { - return self::getPathTemplate('webhook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'webhook' => $webhook, - ]); - } - - /** - * 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}/locations/{location}/agents/{agent} - * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} - * - generator: projects/{project}/locations/{location}/agents/{agent}/generators/{generator} - * - intent: projects/{project}/locations/{location}/agents/{agent}/intents/{intent} - * - page: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page} - * - projectLocationAgentFlowTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} - * - projectLocationAgentTransitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group} - * - tool: projects/{project}/locations/{location}/agents/{agent}/tools/{tool} - * - transitionRouteGroup: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group} - * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroupsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new TransitionRouteGroupsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] - * in the specified flow. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is - * {@see TransitionRouteGroupsClient::createTransitionRouteGroupAsync()} . - * - * @example samples/V3/TransitionRouteGroupsClient/create_transition_route_group.php - * - * @param CreateTransitionRouteGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TransitionRouteGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTransitionRouteGroup(CreateTransitionRouteGroupRequest $request, array $callOptions = []): TransitionRouteGroup - { - return $this->startApiCall('CreateTransitionRouteGroup', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is - * {@see TransitionRouteGroupsClient::deleteTransitionRouteGroupAsync()} . - * - * @example samples/V3/TransitionRouteGroupsClient/delete_transition_route_group.php - * - * @param DeleteTransitionRouteGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTransitionRouteGroup(DeleteTransitionRouteGroupRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTransitionRouteGroup', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * - * The async variant is - * {@see TransitionRouteGroupsClient::getTransitionRouteGroupAsync()} . - * - * @example samples/V3/TransitionRouteGroupsClient/get_transition_route_group.php - * - * @param GetTransitionRouteGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TransitionRouteGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTransitionRouteGroup(GetTransitionRouteGroupRequest $request, array $callOptions = []): TransitionRouteGroup - { - return $this->startApiCall('GetTransitionRouteGroup', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all transition route groups in the specified flow. - * - * The async variant is - * {@see TransitionRouteGroupsClient::listTransitionRouteGroupsAsync()} . - * - * @example samples/V3/TransitionRouteGroupsClient/list_transition_route_groups.php - * - * @param ListTransitionRouteGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTransitionRouteGroups(ListTransitionRouteGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTransitionRouteGroups', $request, $callOptions); - } - - /** - * Updates the specified - * [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. - * - * Note: You should always train a flow prior to sending it queries. See the - * [training - * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). - * - * The async variant is - * {@see TransitionRouteGroupsClient::updateTransitionRouteGroupAsync()} . - * - * @example samples/V3/TransitionRouteGroupsClient/update_transition_route_group.php - * - * @param UpdateTransitionRouteGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TransitionRouteGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTransitionRouteGroup(UpdateTransitionRouteGroupRequest $request, array $callOptions = []): TransitionRouteGroup - { - return $this->startApiCall('UpdateTransitionRouteGroup', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see TransitionRouteGroupsClient::getLocationAsync()} . - * - * @example samples/V3/TransitionRouteGroupsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see TransitionRouteGroupsClient::listLocationsAsync()} . - * - * @example samples/V3/TransitionRouteGroupsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/VersionsClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/VersionsClient.php deleted file mode 100644 index 3116ae9414ba..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/VersionsClient.php +++ /dev/null @@ -1,582 +0,0 @@ - compareVersionsAsync(CompareVersionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createVersionAsync(CreateVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteVersionAsync(DeleteVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVersionAsync(GetVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVersionsAsync(ListVersionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface loadVersionAsync(LoadVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateVersionAsync(UpdateVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class VersionsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Versions'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 $operationsClient; - - 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', - ], - ], - ]; - } - - /** - * 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 = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a flow - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * - * @return string The formatted flow resource. - */ - public static function flowName(string $project, string $location, string $agent, string $flow): string - { - return self::getPathTemplate('flow')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a version - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $flow - * @param string $version - * - * @return string The formatted version resource. - */ - public static function versionName(string $project, string $location, string $agent, string $flow, string $version): string - { - return self::getPathTemplate('version')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'flow' => $flow, - '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 - * - flow: projects/{project}/locations/{location}/agents/{agent}/flows/{flow} - * - version: projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/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(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\VersionsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new VersionsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Compares the specified base version with target version. - * - * The async variant is {@see VersionsClient::compareVersionsAsync()} . - * - * @example samples/V3/VersionsClient/compare_versions.php - * - * @param CompareVersionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CompareVersionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function compareVersions(CompareVersionsRequest $request, array $callOptions = []): CompareVersionsResponse - { - return $this->startApiCall('CompareVersions', $request, $callOptions)->wait(); - } - - /** - * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified - * [Flow][google.cloud.dialogflow.cx.v3.Flow]. - * - * 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`: - * [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata] - * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version] - * - * The async variant is {@see VersionsClient::createVersionAsync()} . - * - * @example samples/V3/VersionsClient/create_version.php - * - * @param CreateVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createVersion(CreateVersionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateVersion', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified [Version][google.cloud.dialogflow.cx.v3.Version]. - * - * The async variant is {@see VersionsClient::deleteVersionAsync()} . - * - * @example samples/V3/VersionsClient/delete_version.php - * - * @param DeleteVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteVersion(DeleteVersionRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteVersion', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified [Version][google.cloud.dialogflow.cx.v3.Version]. - * - * The async variant is {@see VersionsClient::getVersionAsync()} . - * - * @example samples/V3/VersionsClient/get_version.php - * - * @param GetVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Version - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVersion(GetVersionRequest $request, array $callOptions = []): Version - { - return $this->startApiCall('GetVersion', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all versions in the specified - * [Flow][google.cloud.dialogflow.cx.v3.Flow]. - * - * The async variant is {@see VersionsClient::listVersionsAsync()} . - * - * @example samples/V3/VersionsClient/list_versions.php - * - * @param ListVersionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listVersions(ListVersionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVersions', $request, $callOptions); - } - - /** - * Loads resources in the specified version to the draft flow. - * - * 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`: 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 async variant is {@see VersionsClient::loadVersionAsync()} . - * - * @example samples/V3/VersionsClient/load_version.php - * - * @param LoadVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function loadVersion(LoadVersionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('LoadVersion', $request, $callOptions)->wait(); - } - - /** - * Updates the specified [Version][google.cloud.dialogflow.cx.v3.Version]. - * - * The async variant is {@see VersionsClient::updateVersionAsync()} . - * - * @example samples/V3/VersionsClient/update_version.php - * - * @param UpdateVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Version - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateVersion(UpdateVersionRequest $request, array $callOptions = []): Version - { - return $this->startApiCall('UpdateVersion', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see VersionsClient::getLocationAsync()} . - * - * @example samples/V3/VersionsClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see VersionsClient::listLocationsAsync()} . - * - * @example samples/V3/VersionsClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/WebhooksClient.php b/owl-bot-staging/DialogflowCx/v3/src/V3/Client/WebhooksClient.php deleted file mode 100644 index f60e858b1ca3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/Client/WebhooksClient.php +++ /dev/null @@ -1,488 +0,0 @@ - createWebhookAsync(CreateWebhookRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteWebhookAsync(DeleteWebhookRequest $request, array $optionalArgs = []) - * @method PromiseInterface getWebhookAsync(GetWebhookRequest $request, array $optionalArgs = []) - * @method PromiseInterface listWebhooksAsync(ListWebhooksRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateWebhookAsync(UpdateWebhookRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class WebhooksClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.dialogflow.cx.v3.Webhooks'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'dialogflow.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dialogflow.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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 function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/webhooks_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/webhooks_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/webhooks_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/webhooks_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a agent - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * - * @return string The formatted agent resource. - */ - public static function agentName(string $project, string $location, string $agent): string - { - return self::getPathTemplate('agent')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * secret_version resource. - * - * @param string $project - * @param string $secret - * @param string $version - * - * @return string The formatted secret_version resource. - */ - public static function secretVersionName(string $project, string $secret, string $version): string - { - return self::getPathTemplate('secretVersion')->render([ - 'project' => $project, - 'secret' => $secret, - 'version' => $version, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $namespace - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $namespace, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'namespace' => $namespace, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a webhook - * resource. - * - * @param string $project - * @param string $location - * @param string $agent - * @param string $webhook - * - * @return string The formatted webhook resource. - */ - public static function webhookName(string $project, string $location, string $agent, string $webhook): string - { - return self::getPathTemplate('webhook')->render([ - 'project' => $project, - 'location' => $location, - 'agent' => $agent, - 'webhook' => $webhook, - ]); - } - - /** - * 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}/locations/{location}/agents/{agent} - * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} - * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} - * - webhook: projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Dialogflow\Cx\V3\WebhooksClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new WebhooksClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a webhook in the specified agent. - * - * The async variant is {@see WebhooksClient::createWebhookAsync()} . - * - * @example samples/V3/WebhooksClient/create_webhook.php - * - * @param CreateWebhookRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Webhook - * - * @throws ApiException Thrown if the API call fails. - */ - public function createWebhook(CreateWebhookRequest $request, array $callOptions = []): Webhook - { - return $this->startApiCall('CreateWebhook', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified webhook. - * - * The async variant is {@see WebhooksClient::deleteWebhookAsync()} . - * - * @example samples/V3/WebhooksClient/delete_webhook.php - * - * @param DeleteWebhookRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteWebhook(DeleteWebhookRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteWebhook', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified webhook. - * - * The async variant is {@see WebhooksClient::getWebhookAsync()} . - * - * @example samples/V3/WebhooksClient/get_webhook.php - * - * @param GetWebhookRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Webhook - * - * @throws ApiException Thrown if the API call fails. - */ - public function getWebhook(GetWebhookRequest $request, array $callOptions = []): Webhook - { - return $this->startApiCall('GetWebhook', $request, $callOptions)->wait(); - } - - /** - * Returns the list of all webhooks in the specified agent. - * - * The async variant is {@see WebhooksClient::listWebhooksAsync()} . - * - * @example samples/V3/WebhooksClient/list_webhooks.php - * - * @param ListWebhooksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listWebhooks(ListWebhooksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListWebhooks', $request, $callOptions); - } - - /** - * Updates the specified webhook. - * - * The async variant is {@see WebhooksClient::updateWebhookAsync()} . - * - * @example samples/V3/WebhooksClient/update_webhook.php - * - * @param UpdateWebhookRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Webhook - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateWebhook(UpdateWebhookRequest $request, array $callOptions = []): Webhook - { - return $this->startApiCall('UpdateWebhook', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see WebhooksClient::getLocationAsync()} . - * - * @example samples/V3/WebhooksClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see WebhooksClient::listLocationsAsync()} . - * - * @example samples/V3/WebhooksClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/gapic_metadata.json b/owl-bot-staging/DialogflowCx/v3/src/V3/gapic_metadata.json deleted file mode 100644 index dcab1052a7c5..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/gapic_metadata.json +++ /dev/null @@ -1,1074 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.dialogflow.cx.v3", - "libraryPackage": "Google\\Cloud\\Dialogflow\\Cx\\V3", - "services": { - "Pages": { - "clients": { - "grpc": { - "libraryClient": "PagesGapicClient", - "rpcs": { - "CreatePage": { - "methods": [ - "createPage" - ] - }, - "DeletePage": { - "methods": [ - "deletePage" - ] - }, - "GetPage": { - "methods": [ - "getPage" - ] - }, - "ListPages": { - "methods": [ - "listPages" - ] - }, - "UpdatePage": { - "methods": [ - "updatePage" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Flows": { - "clients": { - "grpc": { - "libraryClient": "FlowsGapicClient", - "rpcs": { - "CreateFlow": { - "methods": [ - "createFlow" - ] - }, - "DeleteFlow": { - "methods": [ - "deleteFlow" - ] - }, - "ExportFlow": { - "methods": [ - "exportFlow" - ] - }, - "GetFlow": { - "methods": [ - "getFlow" - ] - }, - "GetFlowValidationResult": { - "methods": [ - "getFlowValidationResult" - ] - }, - "ImportFlow": { - "methods": [ - "importFlow" - ] - }, - "ListFlows": { - "methods": [ - "listFlows" - ] - }, - "TrainFlow": { - "methods": [ - "trainFlow" - ] - }, - "UpdateFlow": { - "methods": [ - "updateFlow" - ] - }, - "ValidateFlow": { - "methods": [ - "validateFlow" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Agents": { - "clients": { - "grpc": { - "libraryClient": "AgentsGapicClient", - "rpcs": { - "CreateAgent": { - "methods": [ - "createAgent" - ] - }, - "DeleteAgent": { - "methods": [ - "deleteAgent" - ] - }, - "ExportAgent": { - "methods": [ - "exportAgent" - ] - }, - "GetAgent": { - "methods": [ - "getAgent" - ] - }, - "GetAgentValidationResult": { - "methods": [ - "getAgentValidationResult" - ] - }, - "GetGenerativeSettings": { - "methods": [ - "getGenerativeSettings" - ] - }, - "ListAgents": { - "methods": [ - "listAgents" - ] - }, - "RestoreAgent": { - "methods": [ - "restoreAgent" - ] - }, - "UpdateAgent": { - "methods": [ - "updateAgent" - ] - }, - "UpdateGenerativeSettings": { - "methods": [ - "updateGenerativeSettings" - ] - }, - "ValidateAgent": { - "methods": [ - "validateAgent" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Changelogs": { - "clients": { - "grpc": { - "libraryClient": "ChangelogsGapicClient", - "rpcs": { - "GetChangelog": { - "methods": [ - "getChangelog" - ] - }, - "ListChangelogs": { - "methods": [ - "listChangelogs" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Deployments": { - "clients": { - "grpc": { - "libraryClient": "DeploymentsGapicClient", - "rpcs": { - "GetDeployment": { - "methods": [ - "getDeployment" - ] - }, - "ListDeployments": { - "methods": [ - "listDeployments" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "EntityTypes": { - "clients": { - "grpc": { - "libraryClient": "EntityTypesGapicClient", - "rpcs": { - "CreateEntityType": { - "methods": [ - "createEntityType" - ] - }, - "DeleteEntityType": { - "methods": [ - "deleteEntityType" - ] - }, - "ExportEntityTypes": { - "methods": [ - "exportEntityTypes" - ] - }, - "GetEntityType": { - "methods": [ - "getEntityType" - ] - }, - "ImportEntityTypes": { - "methods": [ - "importEntityTypes" - ] - }, - "ListEntityTypes": { - "methods": [ - "listEntityTypes" - ] - }, - "UpdateEntityType": { - "methods": [ - "updateEntityType" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Intents": { - "clients": { - "grpc": { - "libraryClient": "IntentsGapicClient", - "rpcs": { - "CreateIntent": { - "methods": [ - "createIntent" - ] - }, - "DeleteIntent": { - "methods": [ - "deleteIntent" - ] - }, - "ExportIntents": { - "methods": [ - "exportIntents" - ] - }, - "GetIntent": { - "methods": [ - "getIntent" - ] - }, - "ImportIntents": { - "methods": [ - "importIntents" - ] - }, - "ListIntents": { - "methods": [ - "listIntents" - ] - }, - "UpdateIntent": { - "methods": [ - "updateIntent" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "SessionEntityTypes": { - "clients": { - "grpc": { - "libraryClient": "SessionEntityTypesGapicClient", - "rpcs": { - "CreateSessionEntityType": { - "methods": [ - "createSessionEntityType" - ] - }, - "DeleteSessionEntityType": { - "methods": [ - "deleteSessionEntityType" - ] - }, - "GetSessionEntityType": { - "methods": [ - "getSessionEntityType" - ] - }, - "ListSessionEntityTypes": { - "methods": [ - "listSessionEntityTypes" - ] - }, - "UpdateSessionEntityType": { - "methods": [ - "updateSessionEntityType" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Sessions": { - "clients": { - "grpc": { - "libraryClient": "SessionsGapicClient", - "rpcs": { - "DetectIntent": { - "methods": [ - "detectIntent" - ] - }, - "FulfillIntent": { - "methods": [ - "fulfillIntent" - ] - }, - "MatchIntent": { - "methods": [ - "matchIntent" - ] - }, - "ServerStreamingDetectIntent": { - "methods": [ - "serverStreamingDetectIntent" - ] - }, - "StreamingDetectIntent": { - "methods": [ - "streamingDetectIntent" - ] - }, - "SubmitAnswerFeedback": { - "methods": [ - "submitAnswerFeedback" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "TransitionRouteGroups": { - "clients": { - "grpc": { - "libraryClient": "TransitionRouteGroupsGapicClient", - "rpcs": { - "CreateTransitionRouteGroup": { - "methods": [ - "createTransitionRouteGroup" - ] - }, - "DeleteTransitionRouteGroup": { - "methods": [ - "deleteTransitionRouteGroup" - ] - }, - "GetTransitionRouteGroup": { - "methods": [ - "getTransitionRouteGroup" - ] - }, - "ListTransitionRouteGroups": { - "methods": [ - "listTransitionRouteGroups" - ] - }, - "UpdateTransitionRouteGroup": { - "methods": [ - "updateTransitionRouteGroup" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "TestCases": { - "clients": { - "grpc": { - "libraryClient": "TestCasesGapicClient", - "rpcs": { - "BatchDeleteTestCases": { - "methods": [ - "batchDeleteTestCases" - ] - }, - "BatchRunTestCases": { - "methods": [ - "batchRunTestCases" - ] - }, - "CalculateCoverage": { - "methods": [ - "calculateCoverage" - ] - }, - "CreateTestCase": { - "methods": [ - "createTestCase" - ] - }, - "ExportTestCases": { - "methods": [ - "exportTestCases" - ] - }, - "GetTestCase": { - "methods": [ - "getTestCase" - ] - }, - "GetTestCaseResult": { - "methods": [ - "getTestCaseResult" - ] - }, - "ImportTestCases": { - "methods": [ - "importTestCases" - ] - }, - "ListTestCaseResults": { - "methods": [ - "listTestCaseResults" - ] - }, - "ListTestCases": { - "methods": [ - "listTestCases" - ] - }, - "RunTestCase": { - "methods": [ - "runTestCase" - ] - }, - "UpdateTestCase": { - "methods": [ - "updateTestCase" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Webhooks": { - "clients": { - "grpc": { - "libraryClient": "WebhooksGapicClient", - "rpcs": { - "CreateWebhook": { - "methods": [ - "createWebhook" - ] - }, - "DeleteWebhook": { - "methods": [ - "deleteWebhook" - ] - }, - "GetWebhook": { - "methods": [ - "getWebhook" - ] - }, - "ListWebhooks": { - "methods": [ - "listWebhooks" - ] - }, - "UpdateWebhook": { - "methods": [ - "updateWebhook" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Environments": { - "clients": { - "grpc": { - "libraryClient": "EnvironmentsGapicClient", - "rpcs": { - "CreateEnvironment": { - "methods": [ - "createEnvironment" - ] - }, - "DeleteEnvironment": { - "methods": [ - "deleteEnvironment" - ] - }, - "DeployFlow": { - "methods": [ - "deployFlow" - ] - }, - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "ListContinuousTestResults": { - "methods": [ - "listContinuousTestResults" - ] - }, - "ListEnvironments": { - "methods": [ - "listEnvironments" - ] - }, - "LookupEnvironmentHistory": { - "methods": [ - "lookupEnvironmentHistory" - ] - }, - "RunContinuousTest": { - "methods": [ - "runContinuousTest" - ] - }, - "UpdateEnvironment": { - "methods": [ - "updateEnvironment" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Examples": { - "clients": { - "grpc": { - "libraryClient": "ExamplesGapicClient", - "rpcs": { - "CreateExample": { - "methods": [ - "createExample" - ] - }, - "DeleteExample": { - "methods": [ - "deleteExample" - ] - }, - "GetExample": { - "methods": [ - "getExample" - ] - }, - "ListExamples": { - "methods": [ - "listExamples" - ] - }, - "UpdateExample": { - "methods": [ - "updateExample" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Experiments": { - "clients": { - "grpc": { - "libraryClient": "ExperimentsGapicClient", - "rpcs": { - "CreateExperiment": { - "methods": [ - "createExperiment" - ] - }, - "DeleteExperiment": { - "methods": [ - "deleteExperiment" - ] - }, - "GetExperiment": { - "methods": [ - "getExperiment" - ] - }, - "ListExperiments": { - "methods": [ - "listExperiments" - ] - }, - "StartExperiment": { - "methods": [ - "startExperiment" - ] - }, - "StopExperiment": { - "methods": [ - "stopExperiment" - ] - }, - "UpdateExperiment": { - "methods": [ - "updateExperiment" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Generators": { - "clients": { - "grpc": { - "libraryClient": "GeneratorsGapicClient", - "rpcs": { - "CreateGenerator": { - "methods": [ - "createGenerator" - ] - }, - "DeleteGenerator": { - "methods": [ - "deleteGenerator" - ] - }, - "GetGenerator": { - "methods": [ - "getGenerator" - ] - }, - "ListGenerators": { - "methods": [ - "listGenerators" - ] - }, - "UpdateGenerator": { - "methods": [ - "updateGenerator" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Playbooks": { - "clients": { - "grpc": { - "libraryClient": "PlaybooksGapicClient", - "rpcs": { - "CreatePlaybook": { - "methods": [ - "createPlaybook" - ] - }, - "CreatePlaybookVersion": { - "methods": [ - "createPlaybookVersion" - ] - }, - "DeletePlaybook": { - "methods": [ - "deletePlaybook" - ] - }, - "DeletePlaybookVersion": { - "methods": [ - "deletePlaybookVersion" - ] - }, - "ExportPlaybook": { - "methods": [ - "exportPlaybook" - ] - }, - "GetPlaybook": { - "methods": [ - "getPlaybook" - ] - }, - "GetPlaybookVersion": { - "methods": [ - "getPlaybookVersion" - ] - }, - "ImportPlaybook": { - "methods": [ - "importPlaybook" - ] - }, - "ListPlaybookVersions": { - "methods": [ - "listPlaybookVersions" - ] - }, - "ListPlaybooks": { - "methods": [ - "listPlaybooks" - ] - }, - "RestorePlaybookVersion": { - "methods": [ - "restorePlaybookVersion" - ] - }, - "UpdatePlaybook": { - "methods": [ - "updatePlaybook" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "SecuritySettingsService": { - "clients": { - "grpc": { - "libraryClient": "SecuritySettingsServiceGapicClient", - "rpcs": { - "CreateSecuritySettings": { - "methods": [ - "createSecuritySettings" - ] - }, - "DeleteSecuritySettings": { - "methods": [ - "deleteSecuritySettings" - ] - }, - "GetSecuritySettings": { - "methods": [ - "getSecuritySettings" - ] - }, - "ListSecuritySettings": { - "methods": [ - "listSecuritySettings" - ] - }, - "UpdateSecuritySettings": { - "methods": [ - "updateSecuritySettings" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Tools": { - "clients": { - "grpc": { - "libraryClient": "ToolsGapicClient", - "rpcs": { - "CreateTool": { - "methods": [ - "createTool" - ] - }, - "CreateToolVersion": { - "methods": [ - "createToolVersion" - ] - }, - "DeleteTool": { - "methods": [ - "deleteTool" - ] - }, - "DeleteToolVersion": { - "methods": [ - "deleteToolVersion" - ] - }, - "GetTool": { - "methods": [ - "getTool" - ] - }, - "GetToolVersion": { - "methods": [ - "getToolVersion" - ] - }, - "ListToolVersions": { - "methods": [ - "listToolVersions" - ] - }, - "ListTools": { - "methods": [ - "listTools" - ] - }, - "RestoreToolVersion": { - "methods": [ - "restoreToolVersion" - ] - }, - "UpdateTool": { - "methods": [ - "updateTool" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Versions": { - "clients": { - "grpc": { - "libraryClient": "VersionsGapicClient", - "rpcs": { - "CompareVersions": { - "methods": [ - "compareVersions" - ] - }, - "CreateVersion": { - "methods": [ - "createVersion" - ] - }, - "DeleteVersion": { - "methods": [ - "deleteVersion" - ] - }, - "GetVersion": { - "methods": [ - "getVersion" - ] - }, - "ListVersions": { - "methods": [ - "listVersions" - ] - }, - "LoadVersion": { - "methods": [ - "loadVersion" - ] - }, - "UpdateVersion": { - "methods": [ - "updateVersion" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_client_config.json deleted file mode 100644 index 6e6a2706469a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_client_config.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.Agents": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_2_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 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 180000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 180000, - "total_timeout_millis": 180000 - } - }, - "methods": { - "CreateAgent": { - "timeout_millis": 180000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "DeleteAgent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ExportAgent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAgent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAgentValidationResult": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetGenerativeSettings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAgents": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RestoreAgent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAgent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateGenerativeSettings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ValidateAgent": { - "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/DialogflowCx/v3/src/V3/resources/agents_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_descriptor_config.php deleted file mode 100644 index f9a2a58b4427..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_descriptor_config.php +++ /dev/null @@ -1,229 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Agents' => [ - 'ExportAgent' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportAgentResponse', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RestoreAgent' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateAgent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Agent', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAgent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAgent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Agent', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAgentValidationResult' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\AgentValidationResult', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGenerativeSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAgents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAgents', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListAgentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAgent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Agent', - 'headerParams' => [ - [ - 'keyName' => 'agent.name', - 'fieldAccessors' => [ - 'getAgent', - 'getName', - ], - ], - ], - ], - 'UpdateGenerativeSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\GenerativeSettings', - 'headerParams' => [ - [ - 'keyName' => 'generative_settings.name', - 'fieldAccessors' => [ - 'getGenerativeSettings', - 'getName', - ], - ], - ], - ], - 'ValidateAgent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\AgentValidationResult', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'agentGenerativeSettings' => 'projects/{project}/locations/{location}/agents/{agent}/generativeSettings', - 'agentValidationResult' => 'projects/{project}/locations/{location}/agents/{agent}/validationResult', - 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', - 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', - 'location' => 'projects/{project}/locations/{location}', - 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', - 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', - 'securitySettings' => 'projects/{project}/locations/{location}/securitySettings/{security_settings}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_rest_client_config.php deleted file mode 100644 index 4a43a9e8dccf..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/agents_rest_client_config.php +++ /dev/null @@ -1,238 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Agents' => [ - 'CreateAgent' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/agents', - 'body' => 'agent', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAgent' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportAgent' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*}:export', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAgent' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAgentValidationResult' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/validationResult}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGenerativeSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/generativeSettings}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'language_code', - ], - ], - 'ListAgents' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/agents', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RestoreAgent' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*}:restore', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAgent' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{agent.name=projects/*/locations/*/agents/*}', - 'body' => 'agent', - 'placeholders' => [ - 'agent.name' => [ - 'getters' => [ - 'getAgent', - 'getName', - ], - ], - ], - ], - 'UpdateGenerativeSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{generative_settings.name=projects/*/locations/*/agents/*/generativeSettings}', - 'body' => 'generative_settings', - 'placeholders' => [ - 'generative_settings.name' => [ - 'getters' => [ - 'getGenerativeSettings', - 'getName', - ], - ], - ], - ], - 'ValidateAgent' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*}:validate', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_client_config.json deleted file mode 100644 index 461d673ac3fb..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_client_config.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.Changelogs": { - "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": { - "GetChangelog": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListChangelogs": { - "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/DialogflowCx/v3/src/V3/resources/changelogs_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_descriptor_config.php deleted file mode 100644 index a76e1a3f3888..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_descriptor_config.php +++ /dev/null @@ -1,98 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Changelogs' => [ - 'GetChangelog' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Changelog', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListChangelogs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getChangelogs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListChangelogsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'changelog' => 'projects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_rest_client_config.php deleted file mode 100644 index 713e19c44001..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/changelogs_rest_client_config.php +++ /dev/null @@ -1,128 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Changelogs' => [ - 'GetChangelog' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/changelogs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListChangelogs' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/changelogs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_client_config.json deleted file mode 100644 index 26672cbce877..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_client_config.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.Deployments": { - "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": { - "GetDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDeployments": { - "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/DialogflowCx/v3/src/V3/resources/deployments_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_descriptor_config.php deleted file mode 100644 index a6a3e82b62a1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_descriptor_config.php +++ /dev/null @@ -1,98 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Deployments' => [ - 'GetDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Deployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDeployments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDeployments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListDeploymentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'deployment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment}', - 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_rest_client_config.php deleted file mode 100644 index 2eb404c8038e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/deployments_rest_client_config.php +++ /dev/null @@ -1,128 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Deployments' => [ - 'GetDeployment' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/deployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDeployments' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*}/deployments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_client_config.json deleted file mode 100644 index 711216d4ef7a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_client_config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.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": { - "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" - }, - "ExportEntityTypes": { - "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" - }, - "ImportEntityTypes": { - "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/DialogflowCx/v3/src/V3/resources/entity_types_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_descriptor_config.php deleted file mode 100644 index 70f052906d18..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_descriptor_config.php +++ /dev/null @@ -1,173 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.EntityTypes' => [ - 'ExportEntityTypes' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportEntityTypesResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportEntityTypesMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ImportEntityTypes' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportEntityTypesMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateEntityType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\EntityType', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEntityType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEntityType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\EntityType', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEntityTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntityTypes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListEntityTypesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEntityType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\EntityType', - 'headerParams' => [ - [ - 'keyName' => 'entity_type.name', - 'fieldAccessors' => [ - 'getEntityType', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_rest_client_config.php deleted file mode 100644 index df623476b216..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/entity_types_rest_client_config.php +++ /dev/null @@ -1,188 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.EntityTypes' => [ - 'CreateEntityType' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/entityTypes', - 'body' => 'entity_type', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEntityType' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/entityTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportEntityTypes' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/entityTypes:export', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetEntityType' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/entityTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportEntityTypes' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/entityTypes:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntityTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/entityTypes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEntityType' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{entity_type.name=projects/*/locations/*/agents/*/entityTypes/*}', - 'body' => 'entity_type', - 'placeholders' => [ - 'entity_type.name' => [ - 'getters' => [ - 'getEntityType', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_client_config.json deleted file mode 100644 index 796e276121f4..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_client_config.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.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" - }, - "DeployFlow": { - "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" - }, - "ListContinuousTestResults": { - "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" - }, - "LookupEnvironmentHistory": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RunContinuousTest": { - "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/DialogflowCx/v3/src/V3/resources/environments_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_descriptor_config.php deleted file mode 100644 index 730f7fadca1e..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_descriptor_config.php +++ /dev/null @@ -1,232 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Environments' => [ - 'CreateEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\Environment', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeployFlow' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\DeployFlowResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\DeployFlowMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'environment', - 'fieldAccessors' => [ - 'getEnvironment', - ], - ], - ], - ], - 'RunContinuousTest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\RunContinuousTestResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\RunContinuousTestMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'environment', - 'fieldAccessors' => [ - 'getEnvironment', - ], - ], - ], - ], - 'UpdateEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\Environment', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'environment.name', - 'fieldAccessors' => [ - 'getEnvironment', - 'getName', - ], - ], - ], - ], - 'DeleteEnvironment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Environment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListContinuousTestResults' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getContinuousTestResults', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListContinuousTestResultsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEnvironments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListEnvironmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'LookupEnvironmentHistory' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEnvironments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\LookupEnvironmentHistoryResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', - 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', - 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', - 'testCase' => 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}', - 'version' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}', - 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_rest_client_config.php deleted file mode 100644 index 65241b2cfc5f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/environments_rest_client_config.php +++ /dev/null @@ -1,213 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Environments' => [ - 'CreateEnvironment' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/environments', - 'body' => 'environment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEnvironment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeployFlow' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{environment=projects/*/locations/*/agents/*/environments/*}:deployFlow', - 'body' => '*', - 'placeholders' => [ - 'environment' => [ - 'getters' => [ - 'getEnvironment', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListContinuousTestResults' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*}/continuousTestResults', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/environments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'LookupEnvironmentHistory' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*}:lookupEnvironmentHistory', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RunContinuousTest' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{environment=projects/*/locations/*/agents/*/environments/*}:runContinuousTest', - 'body' => '*', - 'placeholders' => [ - 'environment' => [ - 'getters' => [ - 'getEnvironment', - ], - ], - ], - ], - 'UpdateEnvironment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{environment.name=projects/*/locations/*/agents/*/environments/*}', - 'body' => 'environment', - 'placeholders' => [ - 'environment.name' => [ - 'getters' => [ - 'getEnvironment', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_client_config.json deleted file mode 100644 index 56432396eb7d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_client_config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.Experiments": { - "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": { - "CreateExperiment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteExperiment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetExperiment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListExperiments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "StartExperiment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "StopExperiment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateExperiment": { - "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/DialogflowCx/v3/src/V3/resources/experiments_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_descriptor_config.php deleted file mode 100644 index 94efc825aae1..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_descriptor_config.php +++ /dev/null @@ -1,160 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Experiments' => [ - 'CreateExperiment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Experiment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteExperiment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetExperiment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Experiment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListExperiments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getExperiments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListExperimentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'StartExperiment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Experiment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StopExperiment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Experiment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateExperiment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Experiment', - 'headerParams' => [ - [ - 'keyName' => 'experiment.name', - 'fieldAccessors' => [ - 'getExperiment', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', - 'experiment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}', - 'version' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_rest_client_config.php deleted file mode 100644 index 37ac7502949a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/experiments_rest_client_config.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Experiments' => [ - 'CreateExperiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments', - 'body' => 'experiment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteExperiment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetExperiment' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListExperiments' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'StartExperiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopExperiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateExperiment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}', - 'body' => 'experiment', - 'placeholders' => [ - 'experiment.name' => [ - 'getters' => [ - 'getExperiment', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_client_config.json deleted file mode 100644 index 34414d0ba155..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.Flows": { - "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": { - "CreateFlow": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteFlow": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ExportFlow": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetFlow": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetFlowValidationResult": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportFlow": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListFlows": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TrainFlow": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateFlow": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ValidateFlow": { - "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/DialogflowCx/v3/src/V3/resources/flows_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_descriptor_config.php deleted file mode 100644 index c9b4589806f8..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_descriptor_config.php +++ /dev/null @@ -1,226 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Flows' => [ - 'ExportFlow' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportFlowResponse', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportFlow' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportFlowResponse', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'TrainFlow' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateFlow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Flow', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteFlow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetFlow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Flow', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetFlowValidationResult' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\FlowValidationResult', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListFlows' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFlows', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListFlowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateFlow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Flow', - 'headerParams' => [ - [ - 'keyName' => 'flow.name', - 'fieldAccessors' => [ - 'getFlow', - 'getName', - ], - ], - ], - ], - 'ValidateFlow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\FlowValidationResult', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', - 'flowValidationResult' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult', - 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', - 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', - 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', - 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', - 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', - 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', - 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', - 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', - 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_rest_client_config.php deleted file mode 100644 index 5953d8fa7125..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/flows_rest_client_config.php +++ /dev/null @@ -1,223 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Flows' => [ - 'CreateFlow' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/flows', - 'body' => 'flow', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteFlow' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportFlow' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*}:export', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetFlow' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetFlowValidationResult' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/validationResult}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportFlow' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/flows:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListFlows' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/flows', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'TrainFlow' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*}:train', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateFlow' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{flow.name=projects/*/locations/*/agents/*/flows/*}', - 'body' => 'flow', - 'placeholders' => [ - 'flow.name' => [ - 'getters' => [ - 'getFlow', - 'getName', - ], - ], - ], - ], - 'ValidateFlow' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*}:validate', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_client_config.json deleted file mode 100644 index 905579ccb0b3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.Generators": { - "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": { - "CreateGenerator": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteGenerator": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetGenerator": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGenerators": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateGenerator": { - "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/DialogflowCx/v3/src/V3/resources/generators_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_descriptor_config.php deleted file mode 100644 index accf414bf235..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_descriptor_config.php +++ /dev/null @@ -1,135 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Generators' => [ - 'CreateGenerator' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Generator', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteGenerator' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGenerator' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Generator', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListGenerators' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGenerators', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListGeneratorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateGenerator' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Generator', - 'headerParams' => [ - [ - 'keyName' => 'generator.name', - 'fieldAccessors' => [ - 'getGenerator', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_rest_client_config.php deleted file mode 100644 index 2b401a303f35..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/generators_rest_client_config.php +++ /dev/null @@ -1,164 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Generators' => [ - 'CreateGenerator' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/generators', - 'body' => 'generator', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteGenerator' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/generators/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGenerator' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/generators/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListGenerators' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/generators', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateGenerator' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{generator.name=projects/*/locations/*/agents/*/generators/*}', - 'body' => 'generator', - 'placeholders' => [ - 'generator.name' => [ - 'getters' => [ - 'getGenerator', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_client_config.json deleted file mode 100644 index f13061abec95..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_client_config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.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": { - "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" - }, - "ExportIntents": { - "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" - }, - "ImportIntents": { - "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/DialogflowCx/v3/src/V3/resources/intents_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_descriptor_config.php deleted file mode 100644 index e411e5240835..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_descriptor_config.php +++ /dev/null @@ -1,174 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Intents' => [ - 'ExportIntents' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportIntentsResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportIntentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ImportIntents' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportIntentsResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportIntentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIntent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Intent', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteIntent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIntent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Intent', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListIntents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIntents', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListIntentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateIntent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Intent', - 'headerParams' => [ - [ - 'keyName' => 'intent.name', - 'fieldAccessors' => [ - 'getIntent', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', - 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_rest_client_config.php deleted file mode 100644 index a930c4204d51..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/intents_rest_client_config.php +++ /dev/null @@ -1,188 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Intents' => [ - 'CreateIntent' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/intents', - 'body' => 'intent', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteIntent' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/intents/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportIntents' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/intents:export', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetIntent' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/intents/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportIntents' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/intents:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIntents' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/intents', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateIntent' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{intent.name=projects/*/locations/*/agents/*/intents/*}', - 'body' => 'intent', - 'placeholders' => [ - 'intent.name' => [ - 'getters' => [ - 'getIntent', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_client_config.json deleted file mode 100644 index 101abc3bad3d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.Pages": { - "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": { - "CreatePage": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeletePage": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPage": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPages": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdatePage": { - "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/DialogflowCx/v3/src/V3/resources/pages_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_descriptor_config.php deleted file mode 100644 index cf6f2bb8781b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_descriptor_config.php +++ /dev/null @@ -1,144 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Pages' => [ - 'CreatePage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Page', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Page', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListPages' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPages', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListPagesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdatePage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Page', - 'headerParams' => [ - [ - 'keyName' => 'page.name', - 'fieldAccessors' => [ - 'getPage', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', - 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', - 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', - 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', - 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', - 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', - 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', - 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', - 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', - 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', - 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_rest_client_config.php deleted file mode 100644 index 89d37f9728c2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/pages_rest_client_config.php +++ /dev/null @@ -1,164 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Pages' => [ - 'CreatePage' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/pages', - 'body' => 'page', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePage' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/pages/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPage' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/pages/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListPages' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/pages', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdatePage' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{page.name=projects/*/locations/*/agents/*/flows/*/pages/*}', - 'body' => 'page', - 'placeholders' => [ - 'page.name' => [ - 'getters' => [ - 'getPage', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_client_config.json deleted file mode 100644 index d7a9b0cad5fa..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.SecuritySettingsService": { - "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": { - "CreateSecuritySettings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteSecuritySettings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSecuritySettings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSecuritySettings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateSecuritySettings": { - "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/DialogflowCx/v3/src/V3/resources/security_settings_service_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_descriptor_config.php deleted file mode 100644 index a318f3dc00b7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_descriptor_config.php +++ /dev/null @@ -1,141 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.SecuritySettingsService' => [ - 'CreateSecuritySettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SecuritySettings', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSecuritySettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSecuritySettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SecuritySettings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSecuritySettings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSecuritySettings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListSecuritySettingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSecuritySettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SecuritySettings', - 'headerParams' => [ - [ - 'keyName' => 'security_settings.name', - 'fieldAccessors' => [ - 'getSecuritySettings', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'deidentifyTemplate' => 'organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}', - 'inspectTemplate' => 'organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}', - 'location' => 'projects/{project}/locations/{location}', - 'organizationLocationDeidentifyTemplate' => 'organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}', - 'organizationLocationInspectTemplate' => 'organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}', - 'projectLocationDeidentifyTemplate' => 'projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}', - 'projectLocationInspectTemplate' => 'projects/{project}/locations/{location}/inspectTemplates/{inspect_template}', - 'securitySettings' => 'projects/{project}/locations/{location}/securitySettings/{security_settings}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_rest_client_config.php deleted file mode 100644 index 76ff1c530191..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/security_settings_service_rest_client_config.php +++ /dev/null @@ -1,167 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.SecuritySettingsService' => [ - 'CreateSecuritySettings' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/securitySettings', - 'body' => 'security_settings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSecuritySettings' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/securitySettings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSecuritySettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/securitySettings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSecuritySettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/securitySettings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSecuritySettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}', - 'body' => 'security_settings', - 'placeholders' => [ - 'security_settings.name' => [ - 'getters' => [ - 'getSecuritySettings', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_client_config.json deleted file mode 100644 index b113f5c237cb..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.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/DialogflowCx/v3/src/V3/resources/session_entity_types_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_descriptor_config.php deleted file mode 100644 index a3c5818d2005..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_descriptor_config.php +++ /dev/null @@ -1,139 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.SessionEntityTypes' => [ - 'CreateSessionEntityType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SessionEntityType', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSessionEntityType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSessionEntityType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SessionEntityType', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSessionEntityTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSessionEntityTypes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListSessionEntityTypesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSessionEntityType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\SessionEntityType', - 'headerParams' => [ - [ - 'keyName' => 'session_entity_type.name', - 'fieldAccessors' => [ - 'getSessionEntityType', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'projectLocationAgentEnvironmentSession' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}', - 'projectLocationAgentEnvironmentSessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}', - 'projectLocationAgentSession' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}', - 'projectLocationAgentSessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}', - 'session' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}', - 'sessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_rest_client_config.php deleted file mode 100644 index ff4d1a89b087..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/session_entity_types_rest_client_config.php +++ /dev/null @@ -1,196 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.SessionEntityTypes' => [ - 'CreateSessionEntityType' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/sessions/*}/entityTypes', - 'body' => 'session_entity_type', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*/sessions/*}/entityTypes', - 'body' => 'session_entity_type', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSessionEntityType' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSessionEntityType' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSessionEntityTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/sessions/*}/entityTypes', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/environments/*/sessions/*}/entityTypes', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSessionEntityType' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{session_entity_type.name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}', - 'body' => 'session_entity_type', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{session_entity_type.name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}', - 'body' => 'session_entity_type', - ], - ], - 'placeholders' => [ - 'session_entity_type.name' => [ - 'getters' => [ - 'getSessionEntityType', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_client_config.json deleted file mode 100644 index 367966f3b8d0..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_client_config.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.Sessions": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_3_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_3_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_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "FulfillIntent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "MatchIntent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ServerStreamingDetectIntent": { - "timeout_millis": 220000 - }, - "StreamingDetectIntent": { - "timeout_millis": 220000 - }, - "SubmitAnswerFeedback": { - "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/DialogflowCx/v3/src/V3/resources/sessions_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_descriptor_config.php deleted file mode 100644 index b97fa6bde0f7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_descriptor_config.php +++ /dev/null @@ -1,151 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Sessions' => [ - 'DetectIntent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse', - 'headerParams' => [ - [ - 'keyName' => 'session', - 'fieldAccessors' => [ - 'getSession', - ], - ], - ], - ], - 'FulfillIntent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\FulfillIntentResponse', - 'headerParams' => [ - [ - 'keyName' => 'match_intent_request.session', - 'fieldAccessors' => [ - 'getMatchIntentRequest', - 'getSession', - ], - ], - ], - ], - 'MatchIntent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\MatchIntentResponse', - 'headerParams' => [ - [ - 'keyName' => 'session', - 'fieldAccessors' => [ - 'getSession', - ], - ], - ], - ], - 'ServerStreamingDetectIntent' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\DetectIntentResponse', - 'headerParams' => [ - [ - 'keyName' => 'session', - 'fieldAccessors' => [ - 'getSession', - ], - ], - ], - ], - 'StreamingDetectIntent' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\StreamingDetectIntentResponse', - ], - 'SubmitAnswerFeedback' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\AnswerFeedback', - 'headerParams' => [ - [ - 'keyName' => 'session', - 'fieldAccessors' => [ - 'getSession', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', - 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', - 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', - 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', - 'projectLocationAgentEnvironmentSession' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}', - 'projectLocationAgentEnvironmentSessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}', - 'projectLocationAgentSession' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}', - 'projectLocationAgentSessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}', - 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', - 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', - 'session' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}', - 'sessionEntityType' => 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}', - 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', - 'version' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_rest_client_config.php deleted file mode 100644 index cc3c24d84c97..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/sessions_rest_client_config.php +++ /dev/null @@ -1,195 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Sessions' => [ - 'DetectIntent' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/sessions/*}:detectIntent', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:detectIntent', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'session' => [ - 'getters' => [ - 'getSession', - ], - ], - ], - ], - 'FulfillIntent' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{match_intent_request.session=projects/*/locations/*/agents/*/sessions/*}:fulfillIntent', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{match_intent_request.session=projects/*/locations/*/agents/*/environments/*/sessions/*}:fulfillIntent', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'match_intent_request.session' => [ - 'getters' => [ - 'getMatchIntentRequest', - 'getSession', - ], - ], - ], - ], - 'MatchIntent' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/sessions/*}:matchIntent', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:matchIntent', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'session' => [ - 'getters' => [ - 'getSession', - ], - ], - ], - ], - 'ServerStreamingDetectIntent' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/sessions/*}:serverStreamingDetectIntent', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:serverStreamingDetectIntent', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'session' => [ - 'getters' => [ - 'getSession', - ], - ], - ], - ], - 'SubmitAnswerFeedback' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback', - 'body' => '*', - 'placeholders' => [ - 'session' => [ - 'getters' => [ - 'getSession', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_client_config.json deleted file mode 100644 index e5c31da1bcad..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_client_config.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.TestCases": { - "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": { - "BatchDeleteTestCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "BatchRunTestCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CalculateCoverage": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateTestCase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ExportTestCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTestCase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTestCaseResult": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportTestCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTestCaseResults": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTestCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RunTestCase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateTestCase": { - "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/DialogflowCx/v3/src/V3/resources/test_cases_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_descriptor_config.php deleted file mode 100644 index 189ae7e8f342..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_descriptor_config.php +++ /dev/null @@ -1,268 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.TestCases' => [ - 'BatchRunTestCases' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\BatchRunTestCasesResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\BatchRunTestCasesMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ExportTestCases' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportTestCasesResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ExportTestCasesMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ImportTestCases' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportTestCasesResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\ImportTestCasesMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RunTestCase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\RunTestCaseResponse', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\RunTestCaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'BatchDeleteTestCases' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CalculateCoverage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\CalculateCoverageResponse', - 'headerParams' => [ - [ - 'keyName' => 'agent', - 'fieldAccessors' => [ - 'getAgent', - ], - ], - ], - ], - 'CreateTestCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TestCase', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetTestCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TestCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTestCaseResult' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TestCaseResult', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListTestCaseResults' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTestCaseResults', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListTestCaseResultsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTestCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTestCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListTestCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateTestCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TestCase', - 'headerParams' => [ - [ - 'keyName' => 'test_case.name', - 'fieldAccessors' => [ - 'getTestCase', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'entityType' => 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}', - 'environment' => 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}', - 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', - 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', - 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', - 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', - 'playbook' => 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}', - 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', - 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', - 'testCase' => 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}', - 'testCaseResult' => 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}', - 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', - 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', - 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_rest_client_config.php deleted file mode 100644 index 7a4f34f76c2a..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/test_cases_rest_client_config.php +++ /dev/null @@ -1,249 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.TestCases' => [ - 'BatchDeleteTestCases' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases:batchDelete', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchRunTestCases' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases:batchRun', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CalculateCoverage' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{agent=projects/*/locations/*/agents/*}/testCases:calculateCoverage', - 'placeholders' => [ - 'agent' => [ - 'getters' => [ - 'getAgent', - ], - ], - ], - ], - 'CreateTestCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases', - 'body' => 'test_case', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ExportTestCases' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases:export', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetTestCase' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/testCases/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTestCaseResult' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/testCases/*/results/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportTestCases' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTestCaseResults' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/testCases/*}/results', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTestCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/testCases', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunTestCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/testCases/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateTestCase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{test_case.name=projects/*/locations/*/agents/*/testCases/*}', - 'body' => 'test_case', - 'placeholders' => [ - 'test_case.name' => [ - 'getters' => [ - 'getTestCase', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_client_config.json deleted file mode 100644 index 0ab81ba30d4b..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.TransitionRouteGroups": { - "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": { - "CreateTransitionRouteGroup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteTransitionRouteGroup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTransitionRouteGroup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTransitionRouteGroups": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateTransitionRouteGroup": { - "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/DialogflowCx/v3/src/V3/resources/transition_route_groups_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_descriptor_config.php deleted file mode 100644 index 73d079826a35..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_descriptor_config.php +++ /dev/null @@ -1,143 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.TransitionRouteGroups' => [ - 'CreateTransitionRouteGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteTransitionRouteGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTransitionRouteGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListTransitionRouteGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTransitionRouteGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListTransitionRouteGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateTransitionRouteGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\TransitionRouteGroup', - 'headerParams' => [ - [ - 'keyName' => 'transition_route_group.name', - 'fieldAccessors' => [ - 'getTransitionRouteGroup', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', - 'generator' => 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}', - 'intent' => 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}', - 'page' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}', - 'projectLocationAgentFlowTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', - 'projectLocationAgentTransitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}', - 'tool' => 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}', - 'transitionRouteGroup' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}', - 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_rest_client_config.php deleted file mode 100644 index bbce0d4a92be..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/transition_route_groups_rest_client_config.php +++ /dev/null @@ -1,196 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.TransitionRouteGroups' => [ - 'CreateTransitionRouteGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups', - 'body' => 'transition_route_group', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups', - 'body' => 'transition_route_group', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteTransitionRouteGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTransitionRouteGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListTransitionRouteGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateTransitionRouteGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}', - 'body' => 'transition_route_group', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{transition_route_group.name=projects/*/locations/*/agents/*/transitionRouteGroups/*}', - 'body' => 'transition_route_group', - ], - ], - 'placeholders' => [ - 'transition_route_group.name' => [ - 'getters' => [ - 'getTransitionRouteGroup', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_client_config.json deleted file mode 100644 index aed8eb675d82..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_client_config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.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": { - "CompareVersions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "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" - }, - "LoadVersion": { - "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/DialogflowCx/v3/src/V3/resources/versions_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_descriptor_config.php deleted file mode 100644 index 33c16defe13c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_descriptor_config.php +++ /dev/null @@ -1,173 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Versions' => [ - 'CreateVersion' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\Version', - 'metadataReturnType' => '\Google\Cloud\Dialogflow\Cx\V3\CreateVersionOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'LoadVersion' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Struct', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CompareVersions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\CompareVersionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'base_version', - 'fieldAccessors' => [ - 'getBaseVersion', - ], - ], - ], - ], - 'DeleteVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Version', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVersions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListVersionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Version', - 'headerParams' => [ - [ - 'keyName' => 'version.name', - 'fieldAccessors' => [ - 'getVersion', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'flow' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}', - 'version' => 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_rest_client_config.php deleted file mode 100644 index ccae7b77ac8d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/versions_rest_client_config.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Versions' => [ - 'CompareVersions' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{base_version=projects/*/locations/*/agents/*/flows/*/versions/*}:compareVersions', - 'body' => '*', - 'placeholders' => [ - 'base_version' => [ - 'getters' => [ - 'getBaseVersion', - ], - ], - ], - ], - 'CreateVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/versions', - 'body' => 'version', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteVersion' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/versions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVersion' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/versions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*/flows/*}/versions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'LoadVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/flows/*/versions/*}:load', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateVersion' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{version.name=projects/*/locations/*/agents/*/flows/*/versions/*}', - 'body' => 'version', - 'placeholders' => [ - 'version.name' => [ - 'getters' => [ - 'getVersion', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_client_config.json b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_client_config.json deleted file mode 100644 index b554ad10e699..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.dialogflow.cx.v3.Webhooks": { - "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": { - "CreateWebhook": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteWebhook": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetWebhook": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListWebhooks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateWebhook": { - "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/DialogflowCx/v3/src/V3/resources/webhooks_descriptor_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_descriptor_config.php deleted file mode 100644 index 4e70c97d82bf..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_descriptor_config.php +++ /dev/null @@ -1,137 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Webhooks' => [ - 'CreateWebhook' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Webhook', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteWebhook' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetWebhook' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Webhook', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListWebhooks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getWebhooks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\ListWebhooksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateWebhook' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dialogflow\Cx\V3\Webhook', - 'headerParams' => [ - [ - 'keyName' => 'webhook.name', - 'fieldAccessors' => [ - 'getWebhook', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'agent' => 'projects/{project}/locations/{location}/agents/{agent}', - 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', - 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', - 'webhook' => 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_rest_client_config.php b/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_rest_client_config.php deleted file mode 100644 index 4d1644f51c5f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/src/V3/resources/webhooks_rest_client_config.php +++ /dev/null @@ -1,164 +0,0 @@ - [ - 'google.cloud.dialogflow.cx.v3.Webhooks' => [ - 'CreateWebhook' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/webhooks', - 'body' => 'webhook', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteWebhook' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/webhooks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetWebhook' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/agents/*/webhooks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListWebhooks' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/agents/*}/webhooks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateWebhook' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{webhook.name=projects/*/locations/*/agents/*/webhooks/*}', - 'body' => 'webhook', - 'placeholders' => [ - 'webhook.name' => [ - 'getters' => [ - 'getWebhook', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/AgentsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/AgentsClientTest.php deleted file mode 100644 index bb69f10b3569..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/AgentsClientTest.php +++ /dev/null @@ -1,1217 +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 createAgentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $defaultLanguageCode = 'defaultLanguageCode856575222'; - $timeZone = 'timeZone36848094'; - $description = 'description-1724546052'; - $avatarUri = 'avatarUri-402824826'; - $startFlow = 'startFlow-1573559573'; - $securitySettings = 'securitySettings-595091902'; - $enableStackdriverLogging = true; - $enableSpellCorrection = false; - $enableMultiLanguageTraining = false; - $locked = true; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Agent(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setDescription($description); - $expectedResponse->setAvatarUri($avatarUri); - $expectedResponse->setStartFlow($startFlow); - $expectedResponse->setSecuritySettings($securitySettings); - $expectedResponse->setEnableStackdriverLogging($enableStackdriverLogging); - $expectedResponse->setEnableSpellCorrection($enableSpellCorrection); - $expectedResponse->setEnableMultiLanguageTraining($enableMultiLanguageTraining); - $expectedResponse->setLocked($locked); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $agent = new Agent(); - $agentDisplayName = 'agentDisplayName2121176616'; - $agent->setDisplayName($agentDisplayName); - $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; - $agent->setDefaultLanguageCode($agentDefaultLanguageCode); - $agentTimeZone = 'agentTimeZone-453669314'; - $agent->setTimeZone($agentTimeZone); - $request = (new CreateAgentRequest()) - ->setParent($formattedParent) - ->setAgent($agent); - $response = $gapicClient->createAgent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/CreateAgent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAgent(); - $this->assertProtobufEquals($agent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAgentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $agent = new Agent(); - $agentDisplayName = 'agentDisplayName2121176616'; - $agent->setDisplayName($agentDisplayName); - $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; - $agent->setDefaultLanguageCode($agentDefaultLanguageCode); - $agentTimeZone = 'agentTimeZone-453669314'; - $agent->setTimeZone($agentTimeZone); - $request = (new CreateAgentRequest()) - ->setParent($formattedParent) - ->setAgent($agent); - try { - $gapicClient->createAgent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAgentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new DeleteAgentRequest()) - ->setName($formattedName); - $gapicClient->deleteAgent($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/DeleteAgent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $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 - $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new DeleteAgentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAgent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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 - $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ExportAgentRequest()) - ->setName($formattedName); - $response = $gapicClient->exportAgent($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/ExportAgent', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $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 - $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ExportAgentRequest()) - ->setName($formattedName); - $response = $gapicClient->exportAgent($request); - $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 - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $defaultLanguageCode = 'defaultLanguageCode856575222'; - $timeZone = 'timeZone36848094'; - $description = 'description-1724546052'; - $avatarUri = 'avatarUri-402824826'; - $startFlow = 'startFlow-1573559573'; - $securitySettings = 'securitySettings-595091902'; - $enableStackdriverLogging = true; - $enableSpellCorrection = false; - $enableMultiLanguageTraining = false; - $locked = true; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Agent(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setDescription($description); - $expectedResponse->setAvatarUri($avatarUri); - $expectedResponse->setStartFlow($startFlow); - $expectedResponse->setSecuritySettings($securitySettings); - $expectedResponse->setEnableStackdriverLogging($enableStackdriverLogging); - $expectedResponse->setEnableSpellCorrection($enableSpellCorrection); - $expectedResponse->setEnableMultiLanguageTraining($enableMultiLanguageTraining); - $expectedResponse->setLocked($locked); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new GetAgentRequest()) - ->setName($formattedName); - $response = $gapicClient->getAgent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/GetAgent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $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 - $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new GetAgentRequest()) - ->setName($formattedName); - try { - $gapicClient->getAgent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAgentValidationResultTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AgentValidationResult(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->agentValidationResultName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new GetAgentValidationResultRequest()) - ->setName($formattedName); - $response = $gapicClient->getAgentValidationResult($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/GetAgentValidationResult', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAgentValidationResultExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->agentValidationResultName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new GetAgentValidationResultRequest()) - ->setName($formattedName); - try { - $gapicClient->getAgentValidationResult($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGenerativeSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $languageCode2 = 'languageCode2-1564186329'; - $expectedResponse = new GenerativeSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setLanguageCode($languageCode2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->agentGenerativeSettingsName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $languageCode = 'languageCode-412800396'; - $request = (new GetGenerativeSettingsRequest()) - ->setName($formattedName) - ->setLanguageCode($languageCode); - $response = $gapicClient->getGenerativeSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/GetGenerativeSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getLanguageCode(); - $this->assertProtobufEquals($languageCode, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGenerativeSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->agentGenerativeSettingsName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $languageCode = 'languageCode-412800396'; - $request = (new GetGenerativeSettingsRequest()) - ->setName($formattedName) - ->setLanguageCode($languageCode); - try { - $gapicClient->getGenerativeSettings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAgentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $agentsElement = new Agent(); - $agents = [ - $agentsElement, - ]; - $expectedResponse = new ListAgentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAgents($agents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAgentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAgents($request); - $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.cx.v3.Agents/ListAgents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAgentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAgentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAgents($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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 - $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new RestoreAgentRequest()) - ->setName($formattedName); - $response = $gapicClient->restoreAgent($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/RestoreAgent', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $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 - $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new RestoreAgentRequest()) - ->setName($formattedName); - $response = $gapicClient->restoreAgent($request); - $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 updateAgentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $defaultLanguageCode = 'defaultLanguageCode856575222'; - $timeZone = 'timeZone36848094'; - $description = 'description-1724546052'; - $avatarUri = 'avatarUri-402824826'; - $startFlow = 'startFlow-1573559573'; - $securitySettings = 'securitySettings-595091902'; - $enableStackdriverLogging = true; - $enableSpellCorrection = false; - $enableMultiLanguageTraining = false; - $locked = true; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Agent(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setDescription($description); - $expectedResponse->setAvatarUri($avatarUri); - $expectedResponse->setStartFlow($startFlow); - $expectedResponse->setSecuritySettings($securitySettings); - $expectedResponse->setEnableStackdriverLogging($enableStackdriverLogging); - $expectedResponse->setEnableSpellCorrection($enableSpellCorrection); - $expectedResponse->setEnableMultiLanguageTraining($enableMultiLanguageTraining); - $expectedResponse->setLocked($locked); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $agent = new Agent(); - $agentDisplayName = 'agentDisplayName2121176616'; - $agent->setDisplayName($agentDisplayName); - $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; - $agent->setDefaultLanguageCode($agentDefaultLanguageCode); - $agentTimeZone = 'agentTimeZone-453669314'; - $agent->setTimeZone($agentTimeZone); - $request = (new UpdateAgentRequest()) - ->setAgent($agent); - $response = $gapicClient->updateAgent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/UpdateAgent', $actualFuncCall); - $actualValue = $actualRequestObject->getAgent(); - $this->assertProtobufEquals($agent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAgentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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(); - $agentDisplayName = 'agentDisplayName2121176616'; - $agent->setDisplayName($agentDisplayName); - $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; - $agent->setDefaultLanguageCode($agentDefaultLanguageCode); - $agentTimeZone = 'agentTimeZone-453669314'; - $agent->setTimeZone($agentTimeZone); - $request = (new UpdateAgentRequest()) - ->setAgent($agent); - try { - $gapicClient->updateAgent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGenerativeSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new GenerativeSettings(); - $expectedResponse->setName($name); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $generativeSettings = new GenerativeSettings(); - $request = (new UpdateGenerativeSettingsRequest()) - ->setGenerativeSettings($generativeSettings); - $response = $gapicClient->updateGenerativeSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/UpdateGenerativeSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getGenerativeSettings(); - $this->assertProtobufEquals($generativeSettings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGenerativeSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $generativeSettings = new GenerativeSettings(); - $request = (new UpdateGenerativeSettingsRequest()) - ->setGenerativeSettings($generativeSettings); - try { - $gapicClient->updateGenerativeSettings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function validateAgentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AgentValidationResult(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ValidateAgentRequest()) - ->setName($formattedName); - $response = $gapicClient->validateAgent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Agents/ValidateAgent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function validateAgentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ValidateAgentRequest()) - ->setName($formattedName); - try { - $gapicClient->validateAgent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAgentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $defaultLanguageCode = 'defaultLanguageCode856575222'; - $timeZone = 'timeZone36848094'; - $description = 'description-1724546052'; - $avatarUri = 'avatarUri-402824826'; - $startFlow = 'startFlow-1573559573'; - $securitySettings = 'securitySettings-595091902'; - $enableStackdriverLogging = true; - $enableSpellCorrection = false; - $enableMultiLanguageTraining = false; - $locked = true; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Agent(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDefaultLanguageCode($defaultLanguageCode); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setDescription($description); - $expectedResponse->setAvatarUri($avatarUri); - $expectedResponse->setStartFlow($startFlow); - $expectedResponse->setSecuritySettings($securitySettings); - $expectedResponse->setEnableStackdriverLogging($enableStackdriverLogging); - $expectedResponse->setEnableSpellCorrection($enableSpellCorrection); - $expectedResponse->setEnableMultiLanguageTraining($enableMultiLanguageTraining); - $expectedResponse->setLocked($locked); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $agent = new Agent(); - $agentDisplayName = 'agentDisplayName2121176616'; - $agent->setDisplayName($agentDisplayName); - $agentDefaultLanguageCode = 'agentDefaultLanguageCode-1905463551'; - $agent->setDefaultLanguageCode($agentDefaultLanguageCode); - $agentTimeZone = 'agentTimeZone-453669314'; - $agent->setTimeZone($agentTimeZone); - $request = (new CreateAgentRequest()) - ->setParent($formattedParent) - ->setAgent($agent); - $response = $gapicClient->createAgentAsync($request)->wait(); - $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.cx.v3.Agents/CreateAgent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAgent(); - $this->assertProtobufEquals($agent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ChangelogsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ChangelogsClientTest.php deleted file mode 100644 index 909b7d1bf7db..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ChangelogsClientTest.php +++ /dev/null @@ -1,381 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ChangelogsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ChangelogsClient($options); - } - - /** @test */ - public function getChangelogTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $userEmail = 'userEmail1921668648'; - $displayName = 'displayName1615086568'; - $action = 'action-1422950858'; - $type = 'type3575610'; - $resource = 'resource-341064690'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new Changelog(); - $expectedResponse->setName($name2); - $expectedResponse->setUserEmail($userEmail); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAction($action); - $expectedResponse->setType($type); - $expectedResponse->setResource($resource); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->changelogName('[PROJECT]', '[LOCATION]', '[AGENT]', '[CHANGELOG]'); - $request = (new GetChangelogRequest()) - ->setName($formattedName); - $response = $gapicClient->getChangelog($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Changelogs/GetChangelog', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getChangelogExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->changelogName('[PROJECT]', '[LOCATION]', '[AGENT]', '[CHANGELOG]'); - $request = (new GetChangelogRequest()) - ->setName($formattedName); - try { - $gapicClient->getChangelog($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChangelogsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $changelogsElement = new Changelog(); - $changelogs = [ - $changelogsElement, - ]; - $expectedResponse = new ListChangelogsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChangelogs($changelogs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ListChangelogsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listChangelogs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChangelogs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Changelogs/ListChangelogs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChangelogsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); - $request = (new ListChangelogsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listChangelogs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getChangelogAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $userEmail = 'userEmail1921668648'; - $displayName = 'displayName1615086568'; - $action = 'action-1422950858'; - $type = 'type3575610'; - $resource = 'resource-341064690'; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new Changelog(); - $expectedResponse->setName($name2); - $expectedResponse->setUserEmail($userEmail); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAction($action); - $expectedResponse->setType($type); - $expectedResponse->setResource($resource); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->changelogName('[PROJECT]', '[LOCATION]', '[AGENT]', '[CHANGELOG]'); - $request = (new GetChangelogRequest()) - ->setName($formattedName); - $response = $gapicClient->getChangelogAsync($request)->wait(); - $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.cx.v3.Changelogs/GetChangelog', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/DeploymentsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/DeploymentsClientTest.php deleted file mode 100644 index 68016b04bff6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/DeploymentsClientTest.php +++ /dev/null @@ -1,361 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DeploymentsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DeploymentsClient($options); - } - - /** @test */ - public function getDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $flowVersion = 'flowVersion1517270727'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setFlowVersion($flowVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[DEPLOYMENT]'); - $request = (new GetDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->getDeployment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Deployments/GetDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[DEPLOYMENT]'); - $request = (new GetDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->getDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeploymentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $deploymentsElement = new Deployment(); - $deployments = [ - $deploymentsElement, - ]; - $expectedResponse = new ListDeploymentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDeployments($deployments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new ListDeploymentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDeployments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Deployments/ListDeployments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeploymentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new ListDeploymentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDeployments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDeploymentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $flowVersion = 'flowVersion1517270727'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setFlowVersion($flowVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[DEPLOYMENT]'); - $request = (new GetDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->getDeploymentAsync($request)->wait(); - $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.cx.v3.Deployments/GetDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EntityTypesClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EntityTypesClientTest.php deleted file mode 100644 index 817a1512def9..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EntityTypesClientTest.php +++ /dev/null @@ -1,870 +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 createEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $enableFuzzyExtraction = true; - $redact = false; - $expectedResponse = new EntityType(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); - $expectedResponse->setRedact($redact); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $entityType = new EntityType(); - $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; - $entityType->setDisplayName($entityTypeDisplayName); - $entityTypeKind = Kind::KIND_UNSPECIFIED; - $entityType->setKind($entityTypeKind); - $request = (new CreateEntityTypeRequest()) - ->setParent($formattedParent) - ->setEntityType($entityType); - $response = $gapicClient->createEntityType($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]'); - $entityType = new EntityType(); - $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; - $entityType->setDisplayName($entityTypeDisplayName); - $entityTypeKind = Kind::KIND_UNSPECIFIED; - $entityType->setKind($entityTypeKind); - $request = (new CreateEntityTypeRequest()) - ->setParent($formattedParent) - ->setEntityType($entityType); - try { - $gapicClient->createEntityType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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]', '[LOCATION]', '[AGENT]', '[ENTITY_TYPE]'); - $request = (new DeleteEntityTypeRequest()) - ->setName($formattedName); - $gapicClient->deleteEntityType($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[ENTITY_TYPE]'); - $request = (new DeleteEntityTypeRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteEntityType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportEntityTypesTest() - { - $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/exportEntityTypesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $entityTypesUri2 = 'entityTypesUri21800038525'; - $expectedResponse = new ExportEntityTypesResponse(); - $expectedResponse->setEntityTypesUri($entityTypesUri2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportEntityTypesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $entityTypes = []; - $request = (new ExportEntityTypesRequest()) - ->setParent($formattedParent) - ->setEntityTypes($entityTypes); - $response = $gapicClient->exportEntityTypes($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.EntityTypes/ExportEntityTypes', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEntityTypes(); - $this->assertProtobufEquals($entityTypes, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportEntityTypesTest'); - $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 exportEntityTypesExceptionTest() - { - $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/exportEntityTypesTest'); - $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]', '[LOCATION]', '[AGENT]'); - $entityTypes = []; - $request = (new ExportEntityTypesRequest()) - ->setParent($formattedParent) - ->setEntityTypes($entityTypes); - $response = $gapicClient->exportEntityTypes($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportEntityTypesTest'); - 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 getEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $enableFuzzyExtraction = true; - $redact = false; - $expectedResponse = new EntityType(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); - $expectedResponse->setRedact($redact); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityTypeName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENTITY_TYPE]'); - $request = (new GetEntityTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->getEntityType($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[ENTITY_TYPE]'); - $request = (new GetEntityTypeRequest()) - ->setName($formattedName); - try { - $gapicClient->getEntityType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importEntityTypesTest() - { - $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/importEntityTypesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportEntityTypesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importEntityTypesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $mergeOption = MergeOption::MERGE_OPTION_UNSPECIFIED; - $request = (new ImportEntityTypesRequest()) - ->setParent($formattedParent) - ->setMergeOption($mergeOption); - $response = $gapicClient->importEntityTypes($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.EntityTypes/ImportEntityTypes', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getMergeOption(); - $this->assertProtobufEquals($mergeOption, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importEntityTypesTest'); - $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 importEntityTypesExceptionTest() - { - $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/importEntityTypesTest'); - $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]', '[LOCATION]', '[AGENT]'); - $mergeOption = MergeOption::MERGE_OPTION_UNSPECIFIED; - $request = (new ImportEntityTypesRequest()) - ->setParent($formattedParent) - ->setMergeOption($mergeOption); - $response = $gapicClient->importEntityTypes($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importEntityTypesTest'); - 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 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]', '[LOCATION]', '[AGENT]'); - $request = (new ListEntityTypesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEntityTypes($request); - $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.cx.v3.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]', '[LOCATION]', '[AGENT]'); - $request = (new ListEntityTypesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEntityTypes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntityTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $enableFuzzyExtraction = true; - $redact = false; - $expectedResponse = new EntityType(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); - $expectedResponse->setRedact($redact); - $transport->addResponse($expectedResponse); - // Mock request - $entityType = new EntityType(); - $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; - $entityType->setDisplayName($entityTypeDisplayName); - $entityTypeKind = Kind::KIND_UNSPECIFIED; - $entityType->setKind($entityTypeKind); - $request = (new UpdateEntityTypeRequest()) - ->setEntityType($entityType); - $response = $gapicClient->updateEntityType($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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); - $request = (new UpdateEntityTypeRequest()) - ->setEntityType($entityType); - try { - $gapicClient->updateEntityType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntityTypeAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $enableFuzzyExtraction = true; - $redact = false; - $expectedResponse = new EntityType(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnableFuzzyExtraction($enableFuzzyExtraction); - $expectedResponse->setRedact($redact); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $entityType = new EntityType(); - $entityTypeDisplayName = 'entityTypeDisplayName-441894800'; - $entityType->setDisplayName($entityTypeDisplayName); - $entityTypeKind = Kind::KIND_UNSPECIFIED; - $entityType->setKind($entityTypeKind); - $request = (new CreateEntityTypeRequest()) - ->setParent($formattedParent) - ->setEntityType($entityType); - $response = $gapicClient->createEntityTypeAsync($request)->wait(); - $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.cx.v3.EntityTypes/CreateEntityType', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntityType(); - $this->assertProtobufEquals($entityType, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EnvironmentsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EnvironmentsClientTest.php deleted file mode 100644 index 53a57dbd2825..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/EnvironmentsClientTest.php +++ /dev/null @@ -1,1155 +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() - { - $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/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $environment = new Environment(); - $environmentDisplayName = 'environmentDisplayName747655770'; - $environment->setDisplayName($environmentDisplayName); - $request = (new CreateEnvironmentRequest()) - ->setParent($formattedParent) - ->setEnvironment($environment); - $response = $gapicClient->createEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/CreateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - $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 createEnvironmentExceptionTest() - { - $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/createEnvironmentTest'); - $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]', '[LOCATION]', '[AGENT]'); - $environment = new Environment(); - $environmentDisplayName = 'environmentDisplayName747655770'; - $environment->setDisplayName($environmentDisplayName); - $request = (new CreateEnvironmentRequest()) - ->setParent($formattedParent) - ->setEnvironment($environment); - $response = $gapicClient->createEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - 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 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new DeleteEnvironmentRequest()) - ->setName($formattedName); - $gapicClient->deleteEnvironment($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new DeleteEnvironmentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteEnvironment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deployFlowTest() - { - $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/deployFlowTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $deployment = 'deployment1939520197'; - $expectedResponse = new DeployFlowResponse(); - $expectedResponse->setDeployment($deployment); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deployFlowTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $formattedFlowVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new DeployFlowRequest()) - ->setEnvironment($formattedEnvironment) - ->setFlowVersion($formattedFlowVersion); - $response = $gapicClient->deployFlow($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/DeployFlow', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($formattedEnvironment, $actualValue); - $actualValue = $actualApiRequestObject->getFlowVersion(); - $this->assertProtobufEquals($formattedFlowVersion, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployFlowTest'); - $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 deployFlowExceptionTest() - { - $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/deployFlowTest'); - $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 - $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $formattedFlowVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new DeployFlowRequest()) - ->setEnvironment($formattedEnvironment) - ->setFlowVersion($formattedFlowVersion); - $response = $gapicClient->deployFlow($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployFlowTest'); - 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 getEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new GetEnvironmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getEnvironment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new GetEnvironmentRequest()) - ->setName($formattedName); - try { - $gapicClient->getEnvironment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContinuousTestResultsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $continuousTestResultsElement = new ContinuousTestResult(); - $continuousTestResults = [ - $continuousTestResultsElement, - ]; - $expectedResponse = new ListContinuousTestResultsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setContinuousTestResults($continuousTestResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new ListContinuousTestResultsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listContinuousTestResults($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getContinuousTestResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/ListContinuousTestResults', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContinuousTestResultsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new ListContinuousTestResultsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listContinuousTestResults($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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]', '[LOCATION]', '[AGENT]'); - $request = (new ListEnvironmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEnvironments($request); - $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.cx.v3.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]', '[LOCATION]', '[AGENT]'); - $request = (new ListEnvironmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEnvironments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupEnvironmentHistoryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $environmentsElement = new Environment(); - $environments = [ - $environmentsElement, - ]; - $expectedResponse = new LookupEnvironmentHistoryResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEnvironments($environments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new LookupEnvironmentHistoryRequest()) - ->setName($formattedName); - $response = $gapicClient->lookupEnvironmentHistory($request); - $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.cx.v3.Environments/LookupEnvironmentHistory', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupEnvironmentHistoryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new LookupEnvironmentHistoryRequest()) - ->setName($formattedName); - try { - $gapicClient->lookupEnvironmentHistory($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runContinuousTestTest() - { - $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/runContinuousTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RunContinuousTestResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runContinuousTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new RunContinuousTestRequest()) - ->setEnvironment($formattedEnvironment); - $response = $gapicClient->runContinuousTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/RunContinuousTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($formattedEnvironment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runContinuousTestTest'); - $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 runContinuousTestExceptionTest() - { - $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/runContinuousTestTest'); - $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 - $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new RunContinuousTestRequest()) - ->setEnvironment($formattedEnvironment); - $response = $gapicClient->runContinuousTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runContinuousTestTest'); - 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 updateEnvironmentTest() - { - $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/updateEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $environment = new Environment(); - $environmentDisplayName = 'environmentDisplayName747655770'; - $environment->setDisplayName($environmentDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateEnvironmentRequest()) - ->setEnvironment($environment) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/UpdateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - $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 updateEnvironmentExceptionTest() - { - $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/updateEnvironmentTest'); - $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 - $environment = new Environment(); - $environmentDisplayName = 'environmentDisplayName747655770'; - $environment->setDisplayName($environmentDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateEnvironmentRequest()) - ->setEnvironment($environment) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEnvironmentAsyncTest() - { - $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/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $environment = new Environment(); - $environmentDisplayName = 'environmentDisplayName747655770'; - $environment->setDisplayName($environmentDisplayName); - $request = (new CreateEnvironmentRequest()) - ->setParent($formattedParent) - ->setEnvironment($environment); - $response = $gapicClient->createEnvironmentAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Environments/CreateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExperimentsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExperimentsClientTest.php deleted file mode 100644 index fce87db7fbd6..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/ExperimentsClientTest.php +++ /dev/null @@ -1,743 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ExperimentsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ExperimentsClient($options); - } - - /** @test */ - public function createExperimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $rolloutFailureReason = 'rolloutFailureReason-379444505'; - $expectedResponse = new Experiment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setRolloutFailureReason($rolloutFailureReason); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $experiment = new Experiment(); - $experimentDisplayName = 'experimentDisplayName-1508560336'; - $experiment->setDisplayName($experimentDisplayName); - $request = (new CreateExperimentRequest()) - ->setParent($formattedParent) - ->setExperiment($experiment); - $response = $gapicClient->createExperiment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/CreateExperiment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getExperiment(); - $this->assertProtobufEquals($experiment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createExperimentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $experiment = new Experiment(); - $experimentDisplayName = 'experimentDisplayName-1508560336'; - $experiment->setDisplayName($experimentDisplayName); - $request = (new CreateExperimentRequest()) - ->setParent($formattedParent) - ->setExperiment($experiment); - try { - $gapicClient->createExperiment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExperimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); - $request = (new DeleteExperimentRequest()) - ->setName($formattedName); - $gapicClient->deleteExperiment($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/DeleteExperiment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExperimentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); - $request = (new DeleteExperimentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteExperiment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExperimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $rolloutFailureReason = 'rolloutFailureReason-379444505'; - $expectedResponse = new Experiment(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setRolloutFailureReason($rolloutFailureReason); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); - $request = (new GetExperimentRequest()) - ->setName($formattedName); - $response = $gapicClient->getExperiment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/GetExperiment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExperimentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); - $request = (new GetExperimentRequest()) - ->setName($formattedName); - try { - $gapicClient->getExperiment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExperimentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $experimentsElement = new Experiment(); - $experiments = [ - $experimentsElement, - ]; - $expectedResponse = new ListExperimentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExperiments($experiments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new ListExperimentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listExperiments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExperiments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/ListExperiments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExperimentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $request = (new ListExperimentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listExperiments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startExperimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $rolloutFailureReason = 'rolloutFailureReason-379444505'; - $expectedResponse = new Experiment(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setRolloutFailureReason($rolloutFailureReason); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); - $request = (new StartExperimentRequest()) - ->setName($formattedName); - $response = $gapicClient->startExperiment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/StartExperiment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startExperimentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); - $request = (new StartExperimentRequest()) - ->setName($formattedName); - try { - $gapicClient->startExperiment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function stopExperimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $rolloutFailureReason = 'rolloutFailureReason-379444505'; - $expectedResponse = new Experiment(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setRolloutFailureReason($rolloutFailureReason); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); - $request = (new StopExperimentRequest()) - ->setName($formattedName); - $response = $gapicClient->stopExperiment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/StopExperiment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function stopExperimentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->experimentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]', '[EXPERIMENT]'); - $request = (new StopExperimentRequest()) - ->setName($formattedName); - try { - $gapicClient->stopExperiment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExperimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $rolloutFailureReason = 'rolloutFailureReason-379444505'; - $expectedResponse = new Experiment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setRolloutFailureReason($rolloutFailureReason); - $transport->addResponse($expectedResponse); - // Mock request - $experiment = new Experiment(); - $experimentDisplayName = 'experimentDisplayName-1508560336'; - $experiment->setDisplayName($experimentDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateExperimentRequest()) - ->setExperiment($experiment) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateExperiment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Experiments/UpdateExperiment', $actualFuncCall); - $actualValue = $actualRequestObject->getExperiment(); - $this->assertProtobufEquals($experiment, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExperimentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $experiment = new Experiment(); - $experimentDisplayName = 'experimentDisplayName-1508560336'; - $experiment->setDisplayName($experimentDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateExperimentRequest()) - ->setExperiment($experiment) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateExperiment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createExperimentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $rolloutFailureReason = 'rolloutFailureReason-379444505'; - $expectedResponse = new Experiment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setRolloutFailureReason($rolloutFailureReason); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[ENVIRONMENT]'); - $experiment = new Experiment(); - $experimentDisplayName = 'experimentDisplayName-1508560336'; - $experiment->setDisplayName($experimentDisplayName); - $request = (new CreateExperimentRequest()) - ->setParent($formattedParent) - ->setExperiment($experiment); - $response = $gapicClient->createExperimentAsync($request)->wait(); - $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.cx.v3.Experiments/CreateExperiment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getExperiment(); - $this->assertProtobufEquals($experiment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/FlowsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/FlowsClientTest.php deleted file mode 100644 index 42aae3008c7f..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/FlowsClientTest.php +++ /dev/null @@ -1,1101 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FlowsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FlowsClient($options); - } - - /** @test */ - public function createFlowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $locked = true; - $expectedResponse = new Flow(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setLocked($locked); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $flow = new Flow(); - $flowDisplayName = 'flowDisplayName-554265505'; - $flow->setDisplayName($flowDisplayName); - $request = (new CreateFlowRequest()) - ->setParent($formattedParent) - ->setFlow($flow); - $response = $gapicClient->createFlow($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/CreateFlow', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFlow(); - $this->assertProtobufEquals($flow, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFlowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); - $flow = new Flow(); - $flowDisplayName = 'flowDisplayName-554265505'; - $flow->setDisplayName($flowDisplayName); - $request = (new CreateFlowRequest()) - ->setParent($formattedParent) - ->setFlow($flow); - try { - $gapicClient->createFlow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFlowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new DeleteFlowRequest()) - ->setName($formattedName); - $gapicClient->deleteFlow($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/DeleteFlow', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFlowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new DeleteFlowRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteFlow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportFlowTest() - { - $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/exportFlowTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $flowUri2 = 'flowUri2747401166'; - $expectedResponse = new ExportFlowResponse(); - $expectedResponse->setFlowUri($flowUri2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportFlowTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new ExportFlowRequest()) - ->setName($formattedName); - $response = $gapicClient->exportFlow($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/ExportFlow', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportFlowTest'); - $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 exportFlowExceptionTest() - { - $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/exportFlowTest'); - $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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new ExportFlowRequest()) - ->setName($formattedName); - $response = $gapicClient->exportFlow($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportFlowTest'); - 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 getFlowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $locked = true; - $expectedResponse = new Flow(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setLocked($locked); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new GetFlowRequest()) - ->setName($formattedName); - $response = $gapicClient->getFlow($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/GetFlow', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFlowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new GetFlowRequest()) - ->setName($formattedName); - try { - $gapicClient->getFlow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFlowValidationResultTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new FlowValidationResult(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->flowValidationResultName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new GetFlowValidationResultRequest()) - ->setName($formattedName); - $response = $gapicClient->getFlowValidationResult($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/GetFlowValidationResult', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFlowValidationResultExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->flowValidationResultName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new GetFlowValidationResultRequest()) - ->setName($formattedName); - try { - $gapicClient->getFlowValidationResult($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importFlowTest() - { - $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/importFlowTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $flow = 'flow3146030'; - $expectedResponse = new ImportFlowResponse(); - $expectedResponse->setFlow($flow); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importFlowTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ImportFlowRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importFlow($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/ImportFlow', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importFlowTest'); - $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 importFlowExceptionTest() - { - $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/importFlowTest'); - $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]', '[LOCATION]', '[AGENT]'); - $request = (new ImportFlowRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importFlow($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importFlowTest'); - 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 listFlowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $flowsElement = new Flow(); - $flows = [ - $flowsElement, - ]; - $expectedResponse = new ListFlowsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFlows($flows); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ListFlowsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listFlows($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFlows()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/ListFlows', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFlowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); - $request = (new ListFlowsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listFlows($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function trainFlowTest() - { - $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/trainFlowTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/trainFlowTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new TrainFlowRequest()) - ->setName($formattedName); - $response = $gapicClient->trainFlow($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/TrainFlow', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/trainFlowTest'); - $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 trainFlowExceptionTest() - { - $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/trainFlowTest'); - $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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new TrainFlowRequest()) - ->setName($formattedName); - $response = $gapicClient->trainFlow($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/trainFlowTest'); - 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 updateFlowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $locked = true; - $expectedResponse = new Flow(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setLocked($locked); - $transport->addResponse($expectedResponse); - // Mock request - $flow = new Flow(); - $flowDisplayName = 'flowDisplayName-554265505'; - $flow->setDisplayName($flowDisplayName); - $request = (new UpdateFlowRequest()) - ->setFlow($flow); - $response = $gapicClient->updateFlow($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/UpdateFlow', $actualFuncCall); - $actualValue = $actualRequestObject->getFlow(); - $this->assertProtobufEquals($flow, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateFlowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $flow = new Flow(); - $flowDisplayName = 'flowDisplayName-554265505'; - $flow->setDisplayName($flowDisplayName); - $request = (new UpdateFlowRequest()) - ->setFlow($flow); - try { - $gapicClient->updateFlow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function validateFlowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new FlowValidationResult(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new ValidateFlowRequest()) - ->setName($formattedName); - $response = $gapicClient->validateFlow($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Flows/ValidateFlow', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function validateFlowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new ValidateFlowRequest()) - ->setName($formattedName); - try { - $gapicClient->validateFlow($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFlowAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $locked = true; - $expectedResponse = new Flow(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setLocked($locked); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $flow = new Flow(); - $flowDisplayName = 'flowDisplayName-554265505'; - $flow->setDisplayName($flowDisplayName); - $request = (new CreateFlowRequest()) - ->setParent($formattedParent) - ->setFlow($flow); - $response = $gapicClient->createFlowAsync($request)->wait(); - $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.cx.v3.Flows/CreateFlow', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFlow(); - $this->assertProtobufEquals($flow, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/GeneratorsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/GeneratorsClientTest.php deleted file mode 100644 index 73d0e5ddb8a2..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/GeneratorsClientTest.php +++ /dev/null @@ -1,599 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GeneratorsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GeneratorsClient($options); - } - - /** @test */ - public function createGeneratorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Generator(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $generator = new Generator(); - $generatorDisplayName = 'generatorDisplayName421654938'; - $generator->setDisplayName($generatorDisplayName); - $generatorPromptText = new Phrase(); - $promptTextText = 'promptTextText-1712080514'; - $generatorPromptText->setText($promptTextText); - $generator->setPromptText($generatorPromptText); - $request = (new CreateGeneratorRequest()) - ->setParent($formattedParent) - ->setGenerator($generator); - $response = $gapicClient->createGenerator($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Generators/CreateGenerator', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGenerator(); - $this->assertProtobufEquals($generator, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGeneratorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); - $generator = new Generator(); - $generatorDisplayName = 'generatorDisplayName421654938'; - $generator->setDisplayName($generatorDisplayName); - $generatorPromptText = new Phrase(); - $promptTextText = 'promptTextText-1712080514'; - $generatorPromptText->setText($promptTextText); - $generator->setPromptText($generatorPromptText); - $request = (new CreateGeneratorRequest()) - ->setParent($formattedParent) - ->setGenerator($generator); - try { - $gapicClient->createGenerator($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGeneratorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->generatorName('[PROJECT]', '[LOCATION]', '[AGENT]', '[GENERATOR]'); - $request = (new DeleteGeneratorRequest()) - ->setName($formattedName); - $gapicClient->deleteGenerator($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Generators/DeleteGenerator', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGeneratorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->generatorName('[PROJECT]', '[LOCATION]', '[AGENT]', '[GENERATOR]'); - $request = (new DeleteGeneratorRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteGenerator($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGeneratorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Generator(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->generatorName('[PROJECT]', '[LOCATION]', '[AGENT]', '[GENERATOR]'); - $request = (new GetGeneratorRequest()) - ->setName($formattedName); - $response = $gapicClient->getGenerator($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Generators/GetGenerator', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGeneratorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->generatorName('[PROJECT]', '[LOCATION]', '[AGENT]', '[GENERATOR]'); - $request = (new GetGeneratorRequest()) - ->setName($formattedName); - try { - $gapicClient->getGenerator($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGeneratorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $generatorsElement = new Generator(); - $generators = [ - $generatorsElement, - ]; - $expectedResponse = new ListGeneratorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGenerators($generators); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ListGeneratorsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listGenerators($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGenerators()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Generators/ListGenerators', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGeneratorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); - $request = (new ListGeneratorsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listGenerators($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGeneratorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Generator(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $generator = new Generator(); - $generatorDisplayName = 'generatorDisplayName421654938'; - $generator->setDisplayName($generatorDisplayName); - $generatorPromptText = new Phrase(); - $promptTextText = 'promptTextText-1712080514'; - $generatorPromptText->setText($promptTextText); - $generator->setPromptText($generatorPromptText); - $request = (new UpdateGeneratorRequest()) - ->setGenerator($generator); - $response = $gapicClient->updateGenerator($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Generators/UpdateGenerator', $actualFuncCall); - $actualValue = $actualRequestObject->getGenerator(); - $this->assertProtobufEquals($generator, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGeneratorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $generator = new Generator(); - $generatorDisplayName = 'generatorDisplayName421654938'; - $generator->setDisplayName($generatorDisplayName); - $generatorPromptText = new Phrase(); - $promptTextText = 'promptTextText-1712080514'; - $generatorPromptText->setText($promptTextText); - $generator->setPromptText($generatorPromptText); - $request = (new UpdateGeneratorRequest()) - ->setGenerator($generator); - try { - $gapicClient->updateGenerator($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGeneratorAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Generator(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $generator = new Generator(); - $generatorDisplayName = 'generatorDisplayName421654938'; - $generator->setDisplayName($generatorDisplayName); - $generatorPromptText = new Phrase(); - $promptTextText = 'promptTextText-1712080514'; - $generatorPromptText->setText($promptTextText); - $generator->setPromptText($generatorPromptText); - $request = (new CreateGeneratorRequest()) - ->setParent($formattedParent) - ->setGenerator($generator); - $response = $gapicClient->createGeneratorAsync($request)->wait(); - $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.cx.v3.Generators/CreateGenerator', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGenerator(); - $this->assertProtobufEquals($generator, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/IntentsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/IntentsClientTest.php deleted file mode 100644 index 62a0b6fd30a7..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/IntentsClientTest.php +++ /dev/null @@ -1,860 +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 createIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $priority = 1165461084; - $isFallback = false; - $description = 'description-1724546052'; - $expectedResponse = new Intent(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setPriority($priority); - $expectedResponse->setIsFallback($isFallback); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $intent = new Intent(); - $intentDisplayName = 'intentDisplayName-1733865935'; - $intent->setDisplayName($intentDisplayName); - $request = (new CreateIntentRequest()) - ->setParent($formattedParent) - ->setIntent($intent); - $response = $gapicClient->createIntent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]'); - $intent = new Intent(); - $intentDisplayName = 'intentDisplayName-1733865935'; - $intent->setDisplayName($intentDisplayName); - $request = (new CreateIntentRequest()) - ->setParent($formattedParent) - ->setIntent($intent); - try { - $gapicClient->createIntent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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]', '[LOCATION]', '[AGENT]', '[INTENT]'); - $request = (new DeleteIntentRequest()) - ->setName($formattedName); - $gapicClient->deleteIntent($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[INTENT]'); - $request = (new DeleteIntentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteIntent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportIntentsTest() - { - $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/exportIntentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $intentsUri2 = 'intentsUri2776767799'; - $expectedResponse = new ExportIntentsResponse(); - $expectedResponse->setIntentsUri($intentsUri2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportIntentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $intents = []; - $request = (new ExportIntentsRequest()) - ->setParent($formattedParent) - ->setIntents($intents); - $response = $gapicClient->exportIntents($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Intents/ExportIntents', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIntents(); - $this->assertProtobufEquals($intents, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportIntentsTest'); - $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 exportIntentsExceptionTest() - { - $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/exportIntentsTest'); - $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]', '[LOCATION]', '[AGENT]'); - $intents = []; - $request = (new ExportIntentsRequest()) - ->setParent($formattedParent) - ->setIntents($intents); - $response = $gapicClient->exportIntents($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportIntentsTest'); - 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 getIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $priority = 1165461084; - $isFallback = false; - $description = 'description-1724546052'; - $expectedResponse = new Intent(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setPriority($priority); - $expectedResponse->setIsFallback($isFallback); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->intentName('[PROJECT]', '[LOCATION]', '[AGENT]', '[INTENT]'); - $request = (new GetIntentRequest()) - ->setName($formattedName); - $response = $gapicClient->getIntent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[INTENT]'); - $request = (new GetIntentRequest()) - ->setName($formattedName); - try { - $gapicClient->getIntent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importIntentsTest() - { - $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/importIntentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportIntentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importIntentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ImportIntentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importIntents($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Intents/ImportIntents', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importIntentsTest'); - $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 importIntentsExceptionTest() - { - $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/importIntentsTest'); - $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]', '[LOCATION]', '[AGENT]'); - $request = (new ImportIntentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importIntents($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importIntentsTest'); - 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 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]', '[LOCATION]', '[AGENT]'); - $request = (new ListIntentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIntents($request); - $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.cx.v3.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]', '[LOCATION]', '[AGENT]'); - $request = (new ListIntentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIntents($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $priority = 1165461084; - $isFallback = false; - $description = 'description-1724546052'; - $expectedResponse = new Intent(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setPriority($priority); - $expectedResponse->setIsFallback($isFallback); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $intent = new Intent(); - $intentDisplayName = 'intentDisplayName-1733865935'; - $intent->setDisplayName($intentDisplayName); - $request = (new UpdateIntentRequest()) - ->setIntent($intent); - $response = $gapicClient->updateIntent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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); - $request = (new UpdateIntentRequest()) - ->setIntent($intent); - try { - $gapicClient->updateIntent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createIntentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $priority = 1165461084; - $isFallback = false; - $description = 'description-1724546052'; - $expectedResponse = new Intent(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setPriority($priority); - $expectedResponse->setIsFallback($isFallback); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $intent = new Intent(); - $intentDisplayName = 'intentDisplayName-1733865935'; - $intent->setDisplayName($intentDisplayName); - $request = (new CreateIntentRequest()) - ->setParent($formattedParent) - ->setIntent($intent); - $response = $gapicClient->createIntentAsync($request)->wait(); - $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.cx.v3.Intents/CreateIntent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getIntent(); - $this->assertProtobufEquals($intent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PagesClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PagesClientTest.php deleted file mode 100644 index 86fbf47a887c..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/PagesClientTest.php +++ /dev/null @@ -1,586 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return PagesClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new PagesClient($options); - } - - /** @test */ - public function createPageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Page(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $page = new Page(); - $pageDisplayName = 'pageDisplayName-1368703906'; - $page->setDisplayName($pageDisplayName); - $request = (new CreatePageRequest()) - ->setParent($formattedParent) - ->setPage($page); - $response = $gapicClient->createPage($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Pages/CreatePage', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPage(); - $this->assertProtobufEquals($page, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $page = new Page(); - $pageDisplayName = 'pageDisplayName-1368703906'; - $page->setDisplayName($pageDisplayName); - $request = (new CreatePageRequest()) - ->setParent($formattedParent) - ->setPage($page); - try { - $gapicClient->createPage($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); - $request = (new DeletePageRequest()) - ->setName($formattedName); - $gapicClient->deletePage($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Pages/DeletePage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); - $request = (new DeletePageRequest()) - ->setName($formattedName); - try { - $gapicClient->deletePage($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Page(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); - $request = (new GetPageRequest()) - ->setName($formattedName); - $response = $gapicClient->getPage($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Pages/GetPage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->pageName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[PAGE]'); - $request = (new GetPageRequest()) - ->setName($formattedName); - try { - $gapicClient->getPage($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $pagesElement = new Page(); - $pages = [ - $pagesElement, - ]; - $expectedResponse = new ListPagesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPages($pages); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new ListPagesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPages($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPages()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Pages/ListPages', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPagesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new ListPagesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPages($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Page(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $page = new Page(); - $pageDisplayName = 'pageDisplayName-1368703906'; - $page->setDisplayName($pageDisplayName); - $request = (new UpdatePageRequest()) - ->setPage($page); - $response = $gapicClient->updatePage($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Pages/UpdatePage', $actualFuncCall); - $actualValue = $actualRequestObject->getPage(); - $this->assertProtobufEquals($page, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $page = new Page(); - $pageDisplayName = 'pageDisplayName-1368703906'; - $page->setDisplayName($pageDisplayName); - $request = (new UpdatePageRequest()) - ->setPage($page); - try { - $gapicClient->updatePage($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPageAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Page(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $page = new Page(); - $pageDisplayName = 'pageDisplayName-1368703906'; - $page->setDisplayName($pageDisplayName); - $request = (new CreatePageRequest()) - ->setParent($formattedParent) - ->setPage($page); - $response = $gapicClient->createPageAsync($request)->wait(); - $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.cx.v3.Pages/CreatePage', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPage(); - $this->assertProtobufEquals($page, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SecuritySettingsServiceClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SecuritySettingsServiceClientTest.php deleted file mode 100644 index eaa661dda158..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SecuritySettingsServiceClientTest.php +++ /dev/null @@ -1,609 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SecuritySettingsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SecuritySettingsServiceClient($options); - } - - /** @test */ - public function createSecuritySettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $inspectTemplate = 'inspectTemplate-159468987'; - $deidentifyTemplate = 'deidentifyTemplate1397891564'; - $retentionWindowDays = 810238885; - $expectedResponse = new SecuritySettings(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setInspectTemplate($inspectTemplate); - $expectedResponse->setDeidentifyTemplate($deidentifyTemplate); - $expectedResponse->setRetentionWindowDays($retentionWindowDays); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $securitySettings = new SecuritySettings(); - $securitySettingsDisplayName = 'securitySettingsDisplayName1233938154'; - $securitySettings->setDisplayName($securitySettingsDisplayName); - $request = (new CreateSecuritySettingsRequest()) - ->setParent($formattedParent) - ->setSecuritySettings($securitySettings); - $response = $gapicClient->createSecuritySettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.SecuritySettingsService/CreateSecuritySettings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSecuritySettings(); - $this->assertProtobufEquals($securitySettings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSecuritySettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $securitySettings = new SecuritySettings(); - $securitySettingsDisplayName = 'securitySettingsDisplayName1233938154'; - $securitySettings->setDisplayName($securitySettingsDisplayName); - $request = (new CreateSecuritySettingsRequest()) - ->setParent($formattedParent) - ->setSecuritySettings($securitySettings); - try { - $gapicClient->createSecuritySettings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSecuritySettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->securitySettingsName('[PROJECT]', '[LOCATION]', '[SECURITY_SETTINGS]'); - $request = (new DeleteSecuritySettingsRequest()) - ->setName($formattedName); - $gapicClient->deleteSecuritySettings($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.SecuritySettingsService/DeleteSecuritySettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSecuritySettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->securitySettingsName('[PROJECT]', '[LOCATION]', '[SECURITY_SETTINGS]'); - $request = (new DeleteSecuritySettingsRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSecuritySettings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSecuritySettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $inspectTemplate = 'inspectTemplate-159468987'; - $deidentifyTemplate = 'deidentifyTemplate1397891564'; - $retentionWindowDays = 810238885; - $expectedResponse = new SecuritySettings(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setInspectTemplate($inspectTemplate); - $expectedResponse->setDeidentifyTemplate($deidentifyTemplate); - $expectedResponse->setRetentionWindowDays($retentionWindowDays); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->securitySettingsName('[PROJECT]', '[LOCATION]', '[SECURITY_SETTINGS]'); - $request = (new GetSecuritySettingsRequest()) - ->setName($formattedName); - $response = $gapicClient->getSecuritySettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.SecuritySettingsService/GetSecuritySettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSecuritySettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->securitySettingsName('[PROJECT]', '[LOCATION]', '[SECURITY_SETTINGS]'); - $request = (new GetSecuritySettingsRequest()) - ->setName($formattedName); - try { - $gapicClient->getSecuritySettings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSecuritySettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $securitySettingsElement = new SecuritySettings(); - $securitySettings = [ - $securitySettingsElement, - ]; - $expectedResponse = new ListSecuritySettingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSecuritySettings($securitySettings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSecuritySettingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSecuritySettings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSecuritySettings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.SecuritySettingsService/ListSecuritySettings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSecuritySettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSecuritySettingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSecuritySettings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSecuritySettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $inspectTemplate = 'inspectTemplate-159468987'; - $deidentifyTemplate = 'deidentifyTemplate1397891564'; - $retentionWindowDays = 810238885; - $expectedResponse = new SecuritySettings(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setInspectTemplate($inspectTemplate); - $expectedResponse->setDeidentifyTemplate($deidentifyTemplate); - $expectedResponse->setRetentionWindowDays($retentionWindowDays); - $transport->addResponse($expectedResponse); - // Mock request - $securitySettings = new SecuritySettings(); - $securitySettingsDisplayName = 'securitySettingsDisplayName1233938154'; - $securitySettings->setDisplayName($securitySettingsDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateSecuritySettingsRequest()) - ->setSecuritySettings($securitySettings) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateSecuritySettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.SecuritySettingsService/UpdateSecuritySettings', $actualFuncCall); - $actualValue = $actualRequestObject->getSecuritySettings(); - $this->assertProtobufEquals($securitySettings, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSecuritySettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $securitySettings = new SecuritySettings(); - $securitySettingsDisplayName = 'securitySettingsDisplayName1233938154'; - $securitySettings->setDisplayName($securitySettingsDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateSecuritySettingsRequest()) - ->setSecuritySettings($securitySettings) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateSecuritySettings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSecuritySettingsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $inspectTemplate = 'inspectTemplate-159468987'; - $deidentifyTemplate = 'deidentifyTemplate1397891564'; - $retentionWindowDays = 810238885; - $expectedResponse = new SecuritySettings(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setInspectTemplate($inspectTemplate); - $expectedResponse->setDeidentifyTemplate($deidentifyTemplate); - $expectedResponse->setRetentionWindowDays($retentionWindowDays); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $securitySettings = new SecuritySettings(); - $securitySettingsDisplayName = 'securitySettingsDisplayName1233938154'; - $securitySettings->setDisplayName($securitySettingsDisplayName); - $request = (new CreateSecuritySettingsRequest()) - ->setParent($formattedParent) - ->setSecuritySettings($securitySettings); - $response = $gapicClient->createSecuritySettingsAsync($request)->wait(); - $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.cx.v3.SecuritySettingsService/CreateSecuritySettings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSecuritySettings(); - $this->assertProtobufEquals($securitySettings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionEntityTypesClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionEntityTypesClientTest.php deleted file mode 100644 index 480debe475a3..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionEntityTypesClientTest.php +++ /dev/null @@ -1,591 +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]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $sessionEntityType = new SessionEntityType(); - $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; - $sessionEntityType->setName($sessionEntityTypeName); - $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; - $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); - $sessionEntityTypeEntities = []; - $sessionEntityType->setEntities($sessionEntityTypeEntities); - $request = (new CreateSessionEntityTypeRequest()) - ->setParent($formattedParent) - ->setSessionEntityType($sessionEntityType); - $response = $gapicClient->createSessionEntityType($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $sessionEntityType = new SessionEntityType(); - $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; - $sessionEntityType->setName($sessionEntityTypeName); - $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; - $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); - $sessionEntityTypeEntities = []; - $sessionEntityType->setEntities($sessionEntityTypeEntities); - $request = (new CreateSessionEntityTypeRequest()) - ->setParent($formattedParent) - ->setSessionEntityType($sessionEntityType); - try { - $gapicClient->createSessionEntityType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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]', '[LOCATION]', '[AGENT]', '[SESSION]', '[ENTITY_TYPE]'); - $request = (new DeleteSessionEntityTypeRequest()) - ->setName($formattedName); - $gapicClient->deleteSessionEntityType($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[SESSION]', '[ENTITY_TYPE]'); - $request = (new DeleteSessionEntityTypeRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSessionEntityType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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]', '[LOCATION]', '[AGENT]', '[SESSION]', '[ENTITY_TYPE]'); - $request = (new GetSessionEntityTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->getSessionEntityType($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[SESSION]', '[ENTITY_TYPE]'); - $request = (new GetSessionEntityTypeRequest()) - ->setName($formattedName); - try { - $gapicClient->getSessionEntityType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $request = (new ListSessionEntityTypesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSessionEntityTypes($request); - $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.cx.v3.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]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $request = (new ListSessionEntityTypesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSessionEntityTypes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = (new UpdateSessionEntityTypeRequest()) - ->setSessionEntityType($sessionEntityType); - $response = $gapicClient->updateSessionEntityType($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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); - $request = (new UpdateSessionEntityTypeRequest()) - ->setSessionEntityType($sessionEntityType); - try { - $gapicClient->updateSessionEntityType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSessionEntityTypeAsyncTest() - { - $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]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $sessionEntityType = new SessionEntityType(); - $sessionEntityTypeName = 'sessionEntityTypeName-916646370'; - $sessionEntityType->setName($sessionEntityTypeName); - $sessionEntityTypeEntityOverrideMode = EntityOverrideMode::ENTITY_OVERRIDE_MODE_UNSPECIFIED; - $sessionEntityType->setEntityOverrideMode($sessionEntityTypeEntityOverrideMode); - $sessionEntityTypeEntities = []; - $sessionEntityType->setEntities($sessionEntityTypeEntities); - $request = (new CreateSessionEntityTypeRequest()) - ->setParent($formattedParent) - ->setSessionEntityType($sessionEntityType); - $response = $gapicClient->createSessionEntityTypeAsync($request)->wait(); - $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.cx.v3.SessionEntityTypes/CreateSessionEntityType', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSessionEntityType(); - $this->assertProtobufEquals($sessionEntityType, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionsClientTest.php deleted file mode 100644 index 29900ec9cf13..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/SessionsClientTest.php +++ /dev/null @@ -1,728 +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'; - $allowCancellation = false; - $expectedResponse = new DetectIntentResponse(); - $expectedResponse->setResponseId($responseId); - $expectedResponse->setOutputAudio($outputAudio); - $expectedResponse->setAllowCancellation($allowCancellation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $queryInput = new QueryInput(); - $queryInputLanguageCode = 'queryInputLanguageCode478766695'; - $queryInput->setLanguageCode($queryInputLanguageCode); - $request = (new DetectIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - $response = $gapicClient->detectIntent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $queryInput = new QueryInput(); - $queryInputLanguageCode = 'queryInputLanguageCode478766695'; - $queryInput->setLanguageCode($queryInputLanguageCode); - $request = (new DetectIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - try { - $gapicClient->detectIntent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fulfillIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $responseId = 'responseId1847552473'; - $outputAudio = '24'; - $expectedResponse = new FulfillIntentResponse(); - $expectedResponse->setResponseId($responseId); - $expectedResponse->setOutputAudio($outputAudio); - $transport->addResponse($expectedResponse); - $request = new FulfillIntentRequest(); - $response = $gapicClient->fulfillIntent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Sessions/FulfillIntent', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fulfillIntentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new FulfillIntentRequest(); - try { - $gapicClient->fulfillIntent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function matchIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $text = 'text3556653'; - $expectedResponse = new MatchIntentResponse(); - $expectedResponse->setText($text); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $queryInput = new QueryInput(); - $queryInputLanguageCode = 'queryInputLanguageCode478766695'; - $queryInput->setLanguageCode($queryInputLanguageCode); - $request = (new MatchIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - $response = $gapicClient->matchIntent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Sessions/MatchIntent', $actualFuncCall); - $actualValue = $actualRequestObject->getSession(); - $this->assertProtobufEquals($formattedSession, $actualValue); - $actualValue = $actualRequestObject->getQueryInput(); - $this->assertProtobufEquals($queryInput, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function matchIntentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $queryInput = new QueryInput(); - $queryInputLanguageCode = 'queryInputLanguageCode478766695'; - $queryInput->setLanguageCode($queryInputLanguageCode); - $request = (new MatchIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - try { - $gapicClient->matchIntent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function serverStreamingDetectIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $responseId = 'responseId1847552473'; - $outputAudio = '24'; - $allowCancellation = false; - $expectedResponse = new DetectIntentResponse(); - $expectedResponse->setResponseId($responseId); - $expectedResponse->setOutputAudio($outputAudio); - $expectedResponse->setAllowCancellation($allowCancellation); - $transport->addResponse($expectedResponse); - $responseId2 = 'responseId21676436300'; - $outputAudio2 = '-53'; - $allowCancellation2 = true; - $expectedResponse2 = new DetectIntentResponse(); - $expectedResponse2->setResponseId($responseId2); - $expectedResponse2->setOutputAudio($outputAudio2); - $expectedResponse2->setAllowCancellation($allowCancellation2); - $transport->addResponse($expectedResponse2); - $responseId3 = 'responseId31676436301'; - $outputAudio3 = '-52'; - $allowCancellation3 = false; - $expectedResponse3 = new DetectIntentResponse(); - $expectedResponse3->setResponseId($responseId3); - $expectedResponse3->setOutputAudio($outputAudio3); - $expectedResponse3->setAllowCancellation($allowCancellation3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $queryInput = new QueryInput(); - $queryInputLanguageCode = 'queryInputLanguageCode478766695'; - $queryInput->setLanguageCode($queryInputLanguageCode); - $request = (new DetectIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - $serverStream = $gapicClient->serverStreamingDetectIntent($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Sessions/ServerStreamingDetectIntent', $actualFuncCall); - $actualValue = $actualRequestObject->getSession(); - $this->assertProtobufEquals($formattedSession, $actualValue); - $actualValue = $actualRequestObject->getQueryInput(); - $this->assertProtobufEquals($queryInput, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function serverStreamingDetectIntentExceptionTest() - { - $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()); - // Mock request - $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $queryInput = new QueryInput(); - $queryInputLanguageCode = 'queryInputLanguageCode478766695'; - $queryInput->setLanguageCode($queryInputLanguageCode); - $request = (new DetectIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - $serverStream = $gapicClient->serverStreamingDetectIntent($request); - $results = $serverStream->readAll(); - 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 streamingDetectIntentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new StreamingDetectIntentResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new StreamingDetectIntentResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new StreamingDetectIntentResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $queryInput = new QueryInput(); - $queryInputLanguageCode = 'queryInputLanguageCode478766695'; - $queryInput->setLanguageCode($queryInputLanguageCode); - $request = new StreamingDetectIntentRequest(); - $request->setQueryInput($queryInput); - $queryInput2 = new QueryInput(); - $queryInputLanguageCode = 'queryInputLanguageCode478766695'; - $queryInput2->setLanguageCode($queryInputLanguageCode); - $request2 = new StreamingDetectIntentRequest(); - $request2->setQueryInput($queryInput2); - $queryInput3 = new QueryInput(); - $queryInputLanguageCode = 'queryInputLanguageCode478766695'; - $queryInput3->setLanguageCode($queryInputLanguageCode); - $request3 = new StreamingDetectIntentRequest(); - $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.cx.v3.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 submitAnswerFeedbackTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $customRating = 'customRating1123127851'; - $expectedResponse = new AnswerFeedback(); - $expectedResponse->setCustomRating($customRating); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $responseId = 'responseId1847552473'; - $answerFeedback = new AnswerFeedback(); - $request = (new SubmitAnswerFeedbackRequest()) - ->setSession($formattedSession) - ->setResponseId($responseId) - ->setAnswerFeedback($answerFeedback); - $response = $gapicClient->submitAnswerFeedback($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Sessions/SubmitAnswerFeedback', $actualFuncCall); - $actualValue = $actualRequestObject->getSession(); - $this->assertProtobufEquals($formattedSession, $actualValue); - $actualValue = $actualRequestObject->getResponseId(); - $this->assertProtobufEquals($responseId, $actualValue); - $actualValue = $actualRequestObject->getAnswerFeedback(); - $this->assertProtobufEquals($answerFeedback, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitAnswerFeedbackExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $responseId = 'responseId1847552473'; - $answerFeedback = new AnswerFeedback(); - $request = (new SubmitAnswerFeedbackRequest()) - ->setSession($formattedSession) - ->setResponseId($responseId) - ->setAnswerFeedback($answerFeedback); - try { - $gapicClient->submitAnswerFeedback($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function detectIntentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $responseId = 'responseId1847552473'; - $outputAudio = '24'; - $allowCancellation = false; - $expectedResponse = new DetectIntentResponse(); - $expectedResponse->setResponseId($responseId); - $expectedResponse->setOutputAudio($outputAudio); - $expectedResponse->setAllowCancellation($allowCancellation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSession = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[SESSION]'); - $queryInput = new QueryInput(); - $queryInputLanguageCode = 'queryInputLanguageCode478766695'; - $queryInput->setLanguageCode($queryInputLanguageCode); - $request = (new DetectIntentRequest()) - ->setSession($formattedSession) - ->setQueryInput($queryInput); - $response = $gapicClient->detectIntentAsync($request)->wait(); - $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.cx.v3.Sessions/DetectIntent', $actualFuncCall); - $actualValue = $actualRequestObject->getSession(); - $this->assertProtobufEquals($formattedSession, $actualValue); - $actualValue = $actualRequestObject->getQueryInput(); - $this->assertProtobufEquals($queryInput, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TestCasesClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TestCasesClientTest.php deleted file mode 100644 index ec73cf27a1ba..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TestCasesClientTest.php +++ /dev/null @@ -1,1318 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TestCasesClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TestCasesClient($options); - } - - /** @test */ - public function batchDeleteTestCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $formattedNames = [ - $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'), - ]; - $request = (new BatchDeleteTestCasesRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - $gapicClient->batchDeleteTestCases($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/BatchDeleteTestCases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNames(); - $this->assertProtobufEquals($formattedNames, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchDeleteTestCasesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); - $formattedNames = [ - $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'), - ]; - $request = (new BatchDeleteTestCasesRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - try { - $gapicClient->batchDeleteTestCases($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchRunTestCasesTest() - { - $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/batchRunTestCasesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchRunTestCasesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchRunTestCasesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $formattedTestCases = [ - $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'), - ]; - $request = (new BatchRunTestCasesRequest()) - ->setParent($formattedParent) - ->setTestCases($formattedTestCases); - $response = $gapicClient->batchRunTestCases($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/BatchRunTestCases', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTestCases(); - $this->assertProtobufEquals($formattedTestCases, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchRunTestCasesTest'); - $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 batchRunTestCasesExceptionTest() - { - $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/batchRunTestCasesTest'); - $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]', '[LOCATION]', '[AGENT]'); - $formattedTestCases = [ - $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'), - ]; - $request = (new BatchRunTestCasesRequest()) - ->setParent($formattedParent) - ->setTestCases($formattedTestCases); - $response = $gapicClient->batchRunTestCases($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchRunTestCasesTest'); - 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 calculateCoverageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $agent2 = 'agent2-1060986504'; - $expectedResponse = new CalculateCoverageResponse(); - $expectedResponse->setAgent($agent2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAgent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $type = CoverageType::COVERAGE_TYPE_UNSPECIFIED; - $request = (new CalculateCoverageRequest()) - ->setAgent($formattedAgent) - ->setType($type); - $response = $gapicClient->calculateCoverage($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/CalculateCoverage', $actualFuncCall); - $actualValue = $actualRequestObject->getAgent(); - $this->assertProtobufEquals($formattedAgent, $actualValue); - $actualValue = $actualRequestObject->getType(); - $this->assertProtobufEquals($type, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function calculateCoverageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAgent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $type = CoverageType::COVERAGE_TYPE_UNSPECIFIED; - $request = (new CalculateCoverageRequest()) - ->setAgent($formattedAgent) - ->setType($type); - try { - $gapicClient->calculateCoverage($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTestCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $notes = 'notes105008833'; - $expectedResponse = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setNotes($notes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $testCase = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); - $testCaseDisplayName = 'testCaseDisplayName1109893675'; - $testCase->setDisplayName($testCaseDisplayName); - $request = (new CreateTestCaseRequest()) - ->setParent($formattedParent) - ->setTestCase($testCase); - $response = $gapicClient->createTestCase($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/CreateTestCase', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTestCase(); - $this->assertProtobufEquals($testCase, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTestCaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); - $testCase = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); - $testCaseDisplayName = 'testCaseDisplayName1109893675'; - $testCase->setDisplayName($testCaseDisplayName); - $request = (new CreateTestCaseRequest()) - ->setParent($formattedParent) - ->setTestCase($testCase); - try { - $gapicClient->createTestCase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportTestCasesTest() - { - $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/exportTestCasesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $gcsUri2 = 'gcsUri21070344951'; - $expectedResponse = new ExportTestCasesResponse(); - $expectedResponse->setGcsUri($gcsUri2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportTestCasesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ExportTestCasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->exportTestCases($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/ExportTestCases', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportTestCasesTest'); - $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 exportTestCasesExceptionTest() - { - $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/exportTestCasesTest'); - $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]', '[LOCATION]', '[AGENT]'); - $request = (new ExportTestCasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->exportTestCases($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportTestCasesTest'); - 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 getTestCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $notes = 'notes105008833'; - $expectedResponse = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setNotes($notes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); - $request = (new GetTestCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->getTestCase($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/GetTestCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTestCaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); - $request = (new GetTestCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->getTestCase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTestCaseResultTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $environment = 'environment-85904877'; - $expectedResponse = new TestCaseResult(); - $expectedResponse->setName($name2); - $expectedResponse->setEnvironment($environment); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->testCaseResultName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]', '[RESULT]'); - $request = (new GetTestCaseResultRequest()) - ->setName($formattedName); - $response = $gapicClient->getTestCaseResult($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/GetTestCaseResult', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTestCaseResultExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->testCaseResultName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]', '[RESULT]'); - $request = (new GetTestCaseResultRequest()) - ->setName($formattedName); - try { - $gapicClient->getTestCaseResult($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importTestCasesTest() - { - $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/importTestCasesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportTestCasesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importTestCasesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ImportTestCasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importTestCases($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/ImportTestCases', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importTestCasesTest'); - $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 importTestCasesExceptionTest() - { - $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/importTestCasesTest'); - $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]', '[LOCATION]', '[AGENT]'); - $request = (new ImportTestCasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importTestCases($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importTestCasesTest'); - 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 listTestCaseResultsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $testCaseResultsElement = new TestCaseResult(); - $testCaseResults = [ - $testCaseResultsElement, - ]; - $expectedResponse = new ListTestCaseResultsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTestCaseResults($testCaseResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); - $request = (new ListTestCaseResultsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTestCaseResults($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTestCaseResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/ListTestCaseResults', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTestCaseResultsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); - $request = (new ListTestCaseResultsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTestCaseResults($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTestCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $testCasesElement = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); - $testCases = [ - $testCasesElement, - ]; - $expectedResponse = new ListTestCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTestCases($testCases); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ListTestCasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTestCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTestCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/ListTestCases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTestCasesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); - $request = (new ListTestCasesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTestCases($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTestCaseTest() - { - $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/runTestCaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RunTestCaseResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runTestCaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); - $request = (new RunTestCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->runTestCase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/RunTestCase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runTestCaseTest'); - $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 runTestCaseExceptionTest() - { - $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/runTestCaseTest'); - $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->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'); - $request = (new RunTestCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->runTestCase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runTestCaseTest'); - 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 updateTestCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $notes = 'notes105008833'; - $expectedResponse = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setNotes($notes); - $transport->addResponse($expectedResponse); - // Mock request - $testCase = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); - $testCaseDisplayName = 'testCaseDisplayName1109893675'; - $testCase->setDisplayName($testCaseDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateTestCaseRequest()) - ->setTestCase($testCase) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateTestCase($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/UpdateTestCase', $actualFuncCall); - $actualValue = $actualRequestObject->getTestCase(); - $this->assertProtobufEquals($testCase, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTestCaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $testCase = new \Google\Cloud\Dialogflow\Cx\V3\TestCase(); - $testCaseDisplayName = 'testCaseDisplayName1109893675'; - $testCase->setDisplayName($testCaseDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateTestCaseRequest()) - ->setTestCase($testCase) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateTestCase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchDeleteTestCasesAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $formattedNames = [ - $gapicClient->testCaseName('[PROJECT]', '[LOCATION]', '[AGENT]', '[TEST_CASE]'), - ]; - $request = (new BatchDeleteTestCasesRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - $gapicClient->batchDeleteTestCasesAsync($request)->wait(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TestCases/BatchDeleteTestCases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNames(); - $this->assertProtobufEquals($formattedNames, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TransitionRouteGroupsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TransitionRouteGroupsClientTest.php deleted file mode 100644 index 16f0ccaab272..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/TransitionRouteGroupsClientTest.php +++ /dev/null @@ -1,578 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TransitionRouteGroupsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TransitionRouteGroupsClient($options); - } - - /** @test */ - public function createTransitionRouteGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new TransitionRouteGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $transitionRouteGroup = new TransitionRouteGroup(); - $transitionRouteGroupDisplayName = 'transitionRouteGroupDisplayName-1406267262'; - $transitionRouteGroup->setDisplayName($transitionRouteGroupDisplayName); - $request = (new CreateTransitionRouteGroupRequest()) - ->setParent($formattedParent) - ->setTransitionRouteGroup($transitionRouteGroup); - $response = $gapicClient->createTransitionRouteGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TransitionRouteGroups/CreateTransitionRouteGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTransitionRouteGroup(); - $this->assertProtobufEquals($transitionRouteGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTransitionRouteGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $transitionRouteGroup = new TransitionRouteGroup(); - $transitionRouteGroupDisplayName = 'transitionRouteGroupDisplayName-1406267262'; - $transitionRouteGroup->setDisplayName($transitionRouteGroupDisplayName); - $request = (new CreateTransitionRouteGroupRequest()) - ->setParent($formattedParent) - ->setTransitionRouteGroup($transitionRouteGroup); - try { - $gapicClient->createTransitionRouteGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTransitionRouteGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->transitionRouteGroupName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[TRANSITION_ROUTE_GROUP]'); - $request = (new DeleteTransitionRouteGroupRequest()) - ->setName($formattedName); - $gapicClient->deleteTransitionRouteGroup($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TransitionRouteGroups/DeleteTransitionRouteGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTransitionRouteGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->transitionRouteGroupName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[TRANSITION_ROUTE_GROUP]'); - $request = (new DeleteTransitionRouteGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTransitionRouteGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTransitionRouteGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new TransitionRouteGroup(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->transitionRouteGroupName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[TRANSITION_ROUTE_GROUP]'); - $request = (new GetTransitionRouteGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getTransitionRouteGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TransitionRouteGroups/GetTransitionRouteGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTransitionRouteGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->transitionRouteGroupName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[TRANSITION_ROUTE_GROUP]'); - $request = (new GetTransitionRouteGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getTransitionRouteGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTransitionRouteGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $transitionRouteGroupsElement = new TransitionRouteGroup(); - $transitionRouteGroups = [ - $transitionRouteGroupsElement, - ]; - $expectedResponse = new ListTransitionRouteGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTransitionRouteGroups($transitionRouteGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new ListTransitionRouteGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTransitionRouteGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTransitionRouteGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TransitionRouteGroups/ListTransitionRouteGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTransitionRouteGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new ListTransitionRouteGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTransitionRouteGroups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTransitionRouteGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new TransitionRouteGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $transitionRouteGroup = new TransitionRouteGroup(); - $transitionRouteGroupDisplayName = 'transitionRouteGroupDisplayName-1406267262'; - $transitionRouteGroup->setDisplayName($transitionRouteGroupDisplayName); - $request = (new UpdateTransitionRouteGroupRequest()) - ->setTransitionRouteGroup($transitionRouteGroup); - $response = $gapicClient->updateTransitionRouteGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.TransitionRouteGroups/UpdateTransitionRouteGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getTransitionRouteGroup(); - $this->assertProtobufEquals($transitionRouteGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTransitionRouteGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $transitionRouteGroup = new TransitionRouteGroup(); - $transitionRouteGroupDisplayName = 'transitionRouteGroupDisplayName-1406267262'; - $transitionRouteGroup->setDisplayName($transitionRouteGroupDisplayName); - $request = (new UpdateTransitionRouteGroupRequest()) - ->setTransitionRouteGroup($transitionRouteGroup); - try { - $gapicClient->updateTransitionRouteGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTransitionRouteGroupAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new TransitionRouteGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $transitionRouteGroup = new TransitionRouteGroup(); - $transitionRouteGroupDisplayName = 'transitionRouteGroupDisplayName-1406267262'; - $transitionRouteGroup->setDisplayName($transitionRouteGroupDisplayName); - $request = (new CreateTransitionRouteGroupRequest()) - ->setParent($formattedParent) - ->setTransitionRouteGroup($transitionRouteGroup); - $response = $gapicClient->createTransitionRouteGroupAsync($request)->wait(); - $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.cx.v3.TransitionRouteGroups/CreateTransitionRouteGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTransitionRouteGroup(); - $this->assertProtobufEquals($transitionRouteGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/VersionsClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/VersionsClientTest.php deleted file mode 100644 index 4fe2a4f1d78d..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/VersionsClientTest.php +++ /dev/null @@ -1,848 +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 compareVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $baseVersionContentJson = 'baseVersionContentJson359428515'; - $targetVersionContentJson = 'targetVersionContentJson-1079099677'; - $expectedResponse = new CompareVersionsResponse(); - $expectedResponse->setBaseVersionContentJson($baseVersionContentJson); - $expectedResponse->setTargetVersionContentJson($targetVersionContentJson); - $transport->addResponse($expectedResponse); - // Mock request - $formattedBaseVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $formattedTargetVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new CompareVersionsRequest()) - ->setBaseVersion($formattedBaseVersion) - ->setTargetVersion($formattedTargetVersion); - $response = $gapicClient->compareVersions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Versions/CompareVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getBaseVersion(); - $this->assertProtobufEquals($formattedBaseVersion, $actualValue); - $actualValue = $actualRequestObject->getTargetVersion(); - $this->assertProtobufEquals($formattedTargetVersion, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function compareVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedBaseVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $formattedTargetVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new CompareVersionsRequest()) - ->setBaseVersion($formattedBaseVersion) - ->setTargetVersion($formattedTargetVersion); - try { - $gapicClient->compareVersions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createVersionTest() - { - $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/createVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Version(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createVersionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $version = new Version(); - $versionDisplayName = 'versionDisplayName1702521461'; - $version->setDisplayName($versionDisplayName); - $request = (new CreateVersionRequest()) - ->setParent($formattedParent) - ->setVersion($version); - $response = $gapicClient->createVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Versions/CreateVersion', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVersionTest'); - $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 createVersionExceptionTest() - { - $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/createVersionTest'); - $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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $version = new Version(); - $versionDisplayName = 'versionDisplayName1702521461'; - $version->setDisplayName($versionDisplayName); - $request = (new CreateVersionRequest()) - ->setParent($formattedParent) - ->setVersion($version); - $response = $gapicClient->createVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVersionTest'); - 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 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]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new DeleteVersionRequest()) - ->setName($formattedName); - $gapicClient->deleteVersion($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new DeleteVersionRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Version(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new GetVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->getVersion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new GetVersionRequest()) - ->setName($formattedName); - try { - $gapicClient->getVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new ListVersionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVersions($request); - $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.cx.v3.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->flowName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]'); - $request = (new ListVersionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVersions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function loadVersionTest() - { - $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/loadVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/loadVersionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new LoadVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->loadVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Versions/LoadVersion', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/loadVersionTest'); - $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 loadVersionExceptionTest() - { - $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/loadVersionTest'); - $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->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new LoadVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->loadVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/loadVersionTest'); - 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 updateVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Version(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $version = new Version(); - $versionDisplayName = 'versionDisplayName1702521461'; - $version->setDisplayName($versionDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateVersionRequest()) - ->setVersion($version) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateVersion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.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(); - $versionDisplayName = 'versionDisplayName1702521461'; - $version->setDisplayName($versionDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateVersionRequest()) - ->setVersion($version) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function compareVersionsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $baseVersionContentJson = 'baseVersionContentJson359428515'; - $targetVersionContentJson = 'targetVersionContentJson-1079099677'; - $expectedResponse = new CompareVersionsResponse(); - $expectedResponse->setBaseVersionContentJson($baseVersionContentJson); - $expectedResponse->setTargetVersionContentJson($targetVersionContentJson); - $transport->addResponse($expectedResponse); - // Mock request - $formattedBaseVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $formattedTargetVersion = $gapicClient->versionName('[PROJECT]', '[LOCATION]', '[AGENT]', '[FLOW]', '[VERSION]'); - $request = (new CompareVersionsRequest()) - ->setBaseVersion($formattedBaseVersion) - ->setTargetVersion($formattedTargetVersion); - $response = $gapicClient->compareVersionsAsync($request)->wait(); - $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.cx.v3.Versions/CompareVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getBaseVersion(); - $this->assertProtobufEquals($formattedBaseVersion, $actualValue); - $actualValue = $actualRequestObject->getTargetVersion(); - $this->assertProtobufEquals($formattedTargetVersion, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/WebhooksClientTest.php b/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/WebhooksClientTest.php deleted file mode 100644 index 7be29f279e90..000000000000 --- a/owl-bot-staging/DialogflowCx/v3/tests/Unit/V3/Client/WebhooksClientTest.php +++ /dev/null @@ -1,586 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WebhooksClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WebhooksClient($options); - } - - /** @test */ - public function createWebhookTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $disabled = true; - $expectedResponse = new Webhook(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $webhook = new Webhook(); - $webhookDisplayName = 'webhookDisplayName1755228022'; - $webhook->setDisplayName($webhookDisplayName); - $request = (new CreateWebhookRequest()) - ->setParent($formattedParent) - ->setWebhook($webhook); - $response = $gapicClient->createWebhook($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Webhooks/CreateWebhook', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getWebhook(); - $this->assertProtobufEquals($webhook, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createWebhookExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); - $webhook = new Webhook(); - $webhookDisplayName = 'webhookDisplayName1755228022'; - $webhook->setDisplayName($webhookDisplayName); - $request = (new CreateWebhookRequest()) - ->setParent($formattedParent) - ->setWebhook($webhook); - try { - $gapicClient->createWebhook($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteWebhookTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); - $request = (new DeleteWebhookRequest()) - ->setName($formattedName); - $gapicClient->deleteWebhook($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Webhooks/DeleteWebhook', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteWebhookExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); - $request = (new DeleteWebhookRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteWebhook($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWebhookTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $disabled = true; - $expectedResponse = new Webhook(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); - $request = (new GetWebhookRequest()) - ->setName($formattedName); - $response = $gapicClient->getWebhook($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Webhooks/GetWebhook', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWebhookExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->webhookName('[PROJECT]', '[LOCATION]', '[AGENT]', '[WEBHOOK]'); - $request = (new GetWebhookRequest()) - ->setName($formattedName); - try { - $gapicClient->getWebhook($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWebhooksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $webhooksElement = new Webhook(); - $webhooks = [ - $webhooksElement, - ]; - $expectedResponse = new ListWebhooksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setWebhooks($webhooks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $request = (new ListWebhooksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listWebhooks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getWebhooks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Webhooks/ListWebhooks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWebhooksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[AGENT]'); - $request = (new ListWebhooksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listWebhooks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateWebhookTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $disabled = true; - $expectedResponse = new Webhook(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $webhook = new Webhook(); - $webhookDisplayName = 'webhookDisplayName1755228022'; - $webhook->setDisplayName($webhookDisplayName); - $request = (new UpdateWebhookRequest()) - ->setWebhook($webhook); - $response = $gapicClient->updateWebhook($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dialogflow.cx.v3.Webhooks/UpdateWebhook', $actualFuncCall); - $actualValue = $actualRequestObject->getWebhook(); - $this->assertProtobufEquals($webhook, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateWebhookExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $webhook = new Webhook(); - $webhookDisplayName = 'webhookDisplayName1755228022'; - $webhook->setDisplayName($webhookDisplayName); - $request = (new UpdateWebhookRequest()) - ->setWebhook($webhook); - try { - $gapicClient->updateWebhook($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createWebhookAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $disabled = true; - $expectedResponse = new Webhook(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->agentName('[PROJECT]', '[LOCATION]', '[AGENT]'); - $webhook = new Webhook(); - $webhookDisplayName = 'webhookDisplayName1755228022'; - $webhook->setDisplayName($webhookDisplayName); - $request = (new CreateWebhookRequest()) - ->setParent($formattedParent) - ->setWebhook($webhook); - $response = $gapicClient->createWebhookAsync($request)->wait(); - $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.cx.v3.Webhooks/CreateWebhook', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getWebhook(); - $this->assertProtobufEquals($webhook, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}